示例#1
0
    public void RoundStart()
    {
        if (onRoundStart != null)
        {
            onRoundStart.Invoke();
        }

        GameIsPaused = false;

        roundTimer.StartTimer();
    }
示例#2
0
        void StartRoundTimers(bool initialRound)
        {
            if (gameEnding)
            {
                return;
            }
            if (initialRound)
            {
                roundTimer = new GameObject().AddComponent <RoundTimer>();
                roundTimer.StartTimer(configData.GameSettings.GameTimer_Slasher, configData.GameSettings.GameTimer_Player);
                foreach (var player in SlasherPlayers)
                {
                    player.player.inventory.Strip();
                    string msg;
                    if (player.team == Team.SLASHER)
                    {
                        foreach (var item in configData.Slashers.Clothing)
                        {
                            CreateItem(player.player, item.Key, 1, item.Value, "wear", null, null);
                        }

                        var weapon = configData.Slashers.Weapon;
                        CreateItem(player.player, weapon.Shortname, weapon.Amount, 0, "belt", weapon.AmmoType, weapon.Attachments);
                        CreateItem(player.player, weapon.AmmoType, weapon.AmmoAmount, 0, "main", null, null);

                        msg = "Kill the <color=#cc0000>Hunted</color>";
                    }
                    else
                    {
                        foreach (var item in configData.Players.Clothing)
                        {
                            CreateItem(player.player, item.Key, 1, item.Value, "wear", null, null);
                        }

                        var weapon = configData.Players.Weapon;
                        CreateItem(player.player, weapon.Shortname, weapon.Amount, 0, "belt", weapon.AmmoType, weapon.Attachments);
                        CreateItem(player.player, weapon.AmmoType, weapon.AmmoAmount, 0, "main", null, null);

                        msg = "Hide from the <color=#cc0000>Slasher</color>";
                    }
                    PopupMessage(player.player, msg);
                }
            }
            else
            {
                foreach (var player in SlasherPlayers)
                {
                    string msg;
                    if (player.team == Team.SLASHER)
                    {
                        msg = "The hunter has become the <color=#cc0000>Hunted</color>";
                    }
                    else
                    {
                        var weapon = configData.Slashers.Weapon;
                        CreateItem(player.player, weapon.Shortname, weapon.Amount, 0, "belt", weapon.AmmoType, weapon.Attachments);
                        CreateItem(player.player, weapon.AmmoType, weapon.AmmoAmount, 0, "main", null, null);

                        msg = "Hunt down the <color=#cc0000>Slasher</color>";
                    }
                    PopupMessage(player.player, msg);
                }
            }
        }