コード例 #1
0
 // The turn order goes like this:
 // Start: this is the start of the battle, only once per battle
 // repeat Upkeep, UnitSelectAction, UnitSelectTarget, AttackPhase, CleanUp,
 // Select target: only when some skill is used that requires a target.
 // if one team is out of health Won/Lost state
 void Start()
 {
     winLoseElement.SetActive(false);
     commandSelector = GameObject.FindObjectOfType <BattleCommandSelector>().GetComponent <BattleCommandSelector>();
     targetSelector  = GameObject.FindObjectOfType <BattleTargetSelector>().GetComponent <BattleTargetSelector>();
     itemSelector    = GameObject.FindObjectOfType <BattleItemSelector>().GetComponent <BattleItemSelector>();
     currentState    = new StartState(this);
     SetupBattle();
     HideCommandSelector();
     targetSelector.Hide();
     itemSelector.Hide();
 }
コード例 #2
0
 public SelectItemState(BattleSystem owner, InventorySO inventory, CommandParams commandParams) : base(owner)
 {
     this.commandParams = commandParams;
     this.inventory     = inventory;
     itemSelector       = GameObject.FindObjectOfType <BattleItemSelector>().GetComponent <BattleItemSelector>();
 }