Example #1
0
    public void Score(GameObject goal)
    {
        if (GameState.PLAY != current)
        {
            return;
        }

        if (goal.Equals(blueGoal))
        {
            blueScore += 1;
        }
        if (goal.Equals(redGoal))
        {
            blueScore += 1;
        }

        current = GameState.SCORE;
        interrupt.Begin(5.0f);
        GameInfo("goal " + gameObject.name);
        board.MakeAnnouncement("GOAL !!!", 5);
        GameInfo("score: blue: " + blueScore);
        GameInfo("score: red: " + redScore);
    }