Exemple #1
0
 public void SetInput(ActorCommands commands)
 {
     if (queueInput.Count >= _actor.numberOfPreviousInputs)
     {
         queueInput.RemoveAt(0);
         queueInput.Add(commands);
     }
     else
     {
         queueInput.Add(commands);
     }
 }
 // If the player runs into a ghost, send one of them to the ActorCommands script for destruction, unless the player is immune due to recent death.
 // ReSharper disable once UnusedMember.Local
 private void OnTriggerEnter(Component other)
 {
     if (!(this.killTimer >= 1))
     {
         if (other.tag == "Ghost" && this.isPlayer)
         {
             if (this.ghostKiller)
             {
                 ActorCommands.GhostKill(other.gameObject);
             }
             else
             {
                 ActorCommands.PlayerKill(this.gameObject);
             }
         }
     }
 }