예제 #1
0
        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);
        }
예제 #2
0
 public void CleanUp()
 {
     this.currentState   = null;
     this.battleStrategy = null;
     StrategyDataCenter.Instance.onBattleAction += HandleBattleAction;
 }