OldBlueWater/BlueWater/Assets/02.Scritps/Ai/AiController.cs
NTG_Lenovo 7380e480cc closed #1 add prefab of ai(Pirate, Enemy)
#7 add AiController and fixing script
2023-08-02 16:45:11 +09:00

36 lines
661 B
C#

using System;
using UnityEngine;
// ReSharper disable once CheckNamespace
namespace BlueWater
{
[Serializable]
public abstract class AiController : MonoBehaviour, IAiStat
{
#region interface property
[field: SerializeField] public AiStat AiStat { get; set; } = new();
#endregion
#region Unity built-in function
private void Awake()
{
SetCurrentHp(AiStat.maxHp);
}
private void Start()
{
}
#endregion
#region Function
public void SetCurrentHp(float value) => AiStat.currentHp = value;
#endregion
}
}