Пример #1
0
 public void attackSelected(Skill skill)
 {
     state_machine.setAbility(skill);
     if (skill.isSupport)
     {
         state_machine.setState(5);
     }
     else
     {
         state_machine.setState(2);
     }
 }
Пример #2
0
 void Update()
 {
     if (Input.GetMouseButtonDown(1))
     {
         if (state_machine.getState() == 1 || state_machine.getState() == 2)
         {
             state_machine.setState(0);
             bmm.closeAttackMenu();
             state_machine.setAbility(null);
         }
         else if (state_machine.getState() == 3 || state_machine.getState() == 4 || state_machine.getState() == 5)
         {
             state_machine.setState(0);
             bmm.closeSpellMenu();
             state_machine.setAbility(null);
         }
         else if (state_machine.getState() == 6 || state_machine.getState() == 7)
         {
             state_machine.setState(0);
             bmm.closeItemMenu();
             state_machine.setCurrItem(null);
         }
     }
 }
Пример #3
0
 public void closeMenu()
 {
     gameObject.SetActive(false);
     state_machine.setState(0);
 }