OldBlueWater/BlueWater/Assets/02.Scritps/Ai/AiController.cs

36 lines
661 B
C#
Raw Normal View History

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
}
}