public bool Init(BattleUnit battleUnit) { owner = battleUnit; StrategyDataCenter.Instance.onBattleAction -= HandleBattleAction; StrategyDataCenter.Instance.onBattleAction += HandleBattleAction; battleStrategy = ScriptableObject.CreateInstance <BattleStrategy>(); battleStrategy.InitWithBrain(this); currentState = BattleState.Default; return(true); }
public void CleanUp() { this.currentState = null; this.battleStrategy = null; StrategyDataCenter.Instance.onBattleAction += HandleBattleAction; }