示例#1
0
    public override bool UpdateScore(Enumerables.ETeam team, int value)
    {
        switch (team)
        {
        // it increments the opposing team (this way the inspector variables make more sense,
        // and all the reverse logic is done in the code)
        case ETeam.RedTeam:
            blueTeamScore += value;
            gameData.SetBlueScore(blueTeamScore);
            BlueTeamText.text = blueTeamScore.ToString();
            return(CheckWin(blueTeamScore));

        case ETeam.BlueTeam:
            redTeamScore += value;
            gameData.SetRedScore(redTeamScore);
            RedTeamText.text = redTeamScore.ToString();
            return(CheckWin(redTeamScore));
        }
        return(false);
    }
示例#2
0
 public abstract bool UpdateScore(Enumerables.ETeam team, int value);