Ejemplo n.º 1
0
    public void AssignPoints()
    {
        BaseGameMode activeGameMode = BaseGameMode.GetActiveGameMode(true);

        if (activeGameMode == null || !activeGameMode.IsMatchActive())
        {
            return;
        }
        if (activeGameMode.IsTeamGame())
        {
            if (captureTeam != -1 && captureFraction == 1f)
            {
                activeGameMode.ModifyTeamScore(captureTeam, scorePerSecond);
            }
        }
        else if (capturedPlayer.IsValid(true))
        {
            activeGameMode.ModifyPlayerGameScore(capturedPlayer.Get(true).GetComponent <BasePlayer>(), "score", scorePerSecond);
        }
    }