示例#1
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);
         }
     }
 }
示例#2
0
 public void itemSelected(Item item)
 {
     state_machine.setCurrItem(item);
     state_machine.setState(7);
 }