Exemple #1
0
            internal override void OnPlayerDeath(EventManager.BaseEventPlayer attacker = null, float respawnTime = 5)
            {
                AddPlayerDeath();

                DestroyUI();

                string message = string.Empty;

                if (LivesRemaining <= 0)
                {
                    int position = Event.GetAlivePlayerCount();

                    message = IsOutOfBounds ? string.Format(GetMessage("UI.Death.OOB.Kicked", Player.userID), ToOrdinal(position + 1), position) :
                              string.Format(GetMessage("UI.Death.Killed.Kicked", Player.userID), ToOrdinal(position + 1), position);
                }
                else
                {
                    _respawnDurationRemaining = respawnTime;

                    InvokeHandler.InvokeRepeating(this, RespawnTick, 1f, 1f);

                    message = IsOutOfBounds ? GetMessage("UI.Death.OOB", Player.userID) :
                              GetMessage("UI.Death.Killed", Player.userID);
                }

                EMInterface.DisplayDeathScreen(this, message, LivesRemaining > 0);
            }
Exemple #2
0
            internal override void OnPlayerDeath(EventManager.BaseEventPlayer attacker = null, float respawnTime = 5)
            {
                AddPlayerDeath(attacker);

                DestroyUI();

                int position = Event.GetAlivePlayerCount();

                string message = attacker != null?string.Format(GetMessage("UI.Death.Killed", Player.userID), attacker.Player.displayName, ToOrdinal(position + 1), position) :
                                     IsOutOfBounds?string.Format(GetMessage("UI.Death.OOB", Player.userID), ToOrdinal(position + 1), position) :
                                         string.Format(GetMessage("UI.Death.Suicide", Player.userID), ToOrdinal(position + 1), position);

                EMInterface.DisplayDeathScreen(this, message, false);
            }