2022-03-20 23:24:29 +08:00
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
public class Interacter : Interactable
|
|
|
|
{
|
|
|
|
protected int interactState = 0;
|
|
|
|
protected bool interating = false;
|
|
|
|
|
|
|
|
override protected void Start()
|
|
|
|
{
|
|
|
|
base.Start();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
protected void ResetInteracting()
|
|
|
|
{
|
|
|
|
interating = false;
|
|
|
|
player.ToMap("Normal");
|
|
|
|
}
|
|
|
|
|
|
|
|
protected virtual void ChangesDuringIntertacting(float time)
|
|
|
|
{
|
|
|
|
if (interating == false)
|
|
|
|
{
|
|
|
|
player.ToMap("Null");
|
|
|
|
interactState++;
|
|
|
|
interating = true;
|
|
|
|
Invoke(nameof(ResetInteracting), time);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public void ChangeToLastWeapon()
|
|
|
|
{
|
|
|
|
ItemController.Instance.ToLastestItem();
|
|
|
|
}
|
2022-03-21 19:49:15 +08:00
|
|
|
|
|
|
|
|
2022-03-20 23:24:29 +08:00
|
|
|
}
|