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