Exemplo n.º 1
0
 //Met à jour quel joueur interagit avec la porte
 public void  UpdateGate(string player, bool isOpening)
 {
     if (!_unlocked)
     {
         bool possessKey = _itemReceiver.Interact(player);
         if (possessKey)
         {
             _unlocked = true;
         }
         else
         {
             return;
         }
     }
     else
     {
         if (player == "Player1")
         {
             player1IsOpening = isOpening;
         }
         else
         {
             player2IsOpening = isOpening;
         }
     }
 }
Exemplo n.º 2
0
 public void UpdateGate(bool isOpening, string player, Vector3 playerPosition)
 {
     if (!_unlocked)
     {
         bool possessKey = _itemReceiver.Interact(player);
         if (possessKey)
         {
             _unlocked = true;
         }
         else
         {
             return;
         }
     }
     else if (isOpening)
     {
         _opening = !_opening;
         interactGate(playerPosition);
     }
 }
Exemplo n.º 3
0
 private bool keyUpdate(string playerName)
 {
     return(_itemReceiver.Interact(playerName));
 }