36 lines
661 B
C#
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
|
|
}
|
|
} |