using System.Collections.Generic; using UnityEngine; namespace Entity { public abstract class AIBase { public virtual bool Run(Entity target) { foreach (var aiBase in children) { if (aiBase.Run(target)) return true; } return false; } public List children=new(); } public class ContinuousMove : AIBase { override public bool Run(Entity target) { target.gameObject.transform.position += Time.deltaTime * target.runtimeAttributes.moveSpeed * target.direction; return true; } } public class TrackPlayer : AIBase { } }