Inheritance: MonoBehaviour
示例#1
0
 private void PresenceListenerWantsRespawnFor(PlayerPresence presence)
 {
     if (IsMapLoaded && IsRoundInProgress)
     {
         presence.SpawnCharacter(RespawnZone.GetRespawnPoint());
     }
 }
示例#2
0
    public void StartRound()
    {
        IsRoundInProgress   = true;
        Server.IsGameActive = true;
        PeakScoreThisRound  = 0;
        LastLeader          = null;
        AnnouncedFirstKill  = false;
        foreach (var presence in Server.Combatants)
        {
            presence.SpawnCharacter(RespawnZone.GetRespawnPoint());
            presence.SetScorePoints(0);
        }
        //Server.BroadcastMessageFromServer("Round start.");

        var sb = new StringBuilder();

        sb.AppendLine("Deathmatch");
        if (ScoreLimit > 0)
        {
            sb.Append("First to " + ScoreLimit);
        }
        else
        {
            sb.Append("No limit");
        }
        Server.StatusMessage = sb.ToString().ToUpper();
        Server.BroadcastMessageFromServer(sb.ToString(), Server.BannerMessageType);
    }
示例#3
0
 private void OnActivateZone(RespawnZone zone)
 {
     LastZone = zone;
 }