64 lines
1.3 KiB
C#
64 lines
1.3 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;using BITFALL.Entities.Equipment;
|
|
using BITKit;
|
|
using BITKit.Entities;
|
|
using Cysharp.Threading.Tasks;
|
|
using UnityEngine;
|
|
using IEntity = BITKit.Entities.IEntity;
|
|
|
|
namespace BITFALL.Entities.Equipment
|
|
{
|
|
public class AIEquipController : MonoBehaviour,IEquipBase
|
|
{
|
|
[SerializeField] protected AssetableItem assetableItem;
|
|
public bool IsEntered { get; set; }
|
|
|
|
public virtual void Entry()
|
|
{
|
|
UnityEntity.AddListener<string>(Constant.Animation.OnEvent, OnAnimationEvent);
|
|
}
|
|
|
|
protected virtual void OnAnimationEvent(string animationEventName)
|
|
{
|
|
}
|
|
public virtual UniTask EntryAsync()
|
|
{
|
|
return UniTask.CompletedTask;
|
|
}
|
|
|
|
public virtual void Exit()
|
|
{
|
|
UnityEntity.RemoveListener<string>(Constant.Animation.OnEvent, OnAnimationEvent);
|
|
}
|
|
|
|
public virtual UniTask ExitAsync()
|
|
{
|
|
return UniTask.CompletedTask;
|
|
}
|
|
|
|
public virtual void OnAwake()
|
|
{
|
|
}
|
|
|
|
public virtual void OnStart()
|
|
{
|
|
}
|
|
|
|
public virtual void OnUpdate(float deltaTime)
|
|
{
|
|
}
|
|
|
|
public string AddressablePath => assetableItem.AddressablePath;
|
|
public IEntity Entity { get; set; }
|
|
public Entity UnityEntity=>Entity as Entity;
|
|
public IBasicItem Item { get; set; }
|
|
|
|
public bool IsSupportItem(IBasicItem item) => item?.AddressablePath == AddressablePath;
|
|
|
|
public void PlayAudio(string name)
|
|
{
|
|
}
|
|
}
|
|
|
|
}
|