Beispiel #1
0
 public bool execute()
 {
     if (done.isSet())
     {
         return(true);
     }
     return(false);
 }
Beispiel #2
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.Alpha1) && isChoosing.isSet())
     {
         playerChoice = attack;
         isChoosing.resetFlag();
     }
     else if (Input.GetKeyDown(KeyCode.Alpha2) && isChoosing.isSet())
     {
         playerChoice = wait;
         isChoosing.resetFlag();
     }
     else
     {
         playerChoice = undecided;
     }
     Loop();
 }
 // Update is called once per frame
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.Alpha1) && isChoosing.isSet())
     {
         playerChoice = correct;
         isChoosing.resetFlag();
     }
     else if (Input.GetKeyDown(KeyCode.Alpha2) && isChoosing.isSet())
     {
         playerChoice = neutral;
         isChoosing.resetFlag();
     }
     else if (Input.GetKeyDown(KeyCode.Alpha3) && isChoosing.isSet())
     {
         playerChoice = incorrect;
         isChoosing.resetFlag();
     }
     else
     {
         playerChoice = undecided;
     }
     CyclopsChoice();
 }