예제 #1
0
        private void AttachPlayerToMap([NotNull] Player.Player p)
        {
            p.transform.parent = this._map.transform;
            var playerPosition = p.transform.position;

            p.transform.localPosition = new Vector3(playerPosition.x, p.transform.localScale.y / 2, playerPosition.z);
        }
예제 #2
0
 private void HandlePlayer(Player.Player player)
 {
     if (player.Health <= 0)
     {
         this.RemoveTerminatedPlayer(player);
     }
     else
     {
         player.Attack();
         player.UpdateHealthBar();
     }
 }
예제 #3
0
 private void RemoveTerminatedPlayer([NotNull] Player.Player player)
 {
     player.DropWeapons();
     this._players.Remove(player);
     Destroy(player.gameObject);
 }