Beispiel #1
0
 private void ControllListener()
 {
     if (isPlaying)
     {
         if (Input.GetKey(keybinder.binding[Enumerators.Action.start]))
         {
             //Show inventory
             keybinder.ExportBinding(postfix);
             Debug.Log("start triggered by " + name);
         }
         if (Input.GetKey(keybinder.binding[Enumerators.Action.cancel]))
         {
             //Interact
             Debug.Log("Cancel triggered by " + name);
         }
         if (!isShooting && Input.GetKey(keybinder.binding[Enumerators.Action.confirm]))
         {
             //Fire
             Debug.Log("Player attaked with: " + Dice.Roll((int)Enumerators.Dices.W6, 1));
             Debug.Log("confirm triggered by " + name);
             AddExperience(200);
             isShooting = true;
         }
         if (isShooting && !Input.GetKey(keybinder.binding[Enumerators.Action.confirm]))
         {
             //Reset Fire when button is released
             isShooting = false;
         }
     }
 }