コード例 #1
0
ファイル: GameLogic.cs プロジェクト: rroveri/triolozzi
        public GameLogic(int[] crucialPoints, int pointsCount)
        {
            Laps = 0;

            // Set up the reference points in the track
            _crucialPoints = crucialPoints;
            _pointsCount = pointsCount;
            didReachCrucialPoint = new Dictionary<int, bool>(4);
            ResetCrucialPoints();

            // Set up the ranking and elimination lists
            taken = new int[kMaximumPlayers];
            _eliminatedCars = 0;

            Ranking = new int[kMaximumPlayers];
            isMiniRaceOver = false;

            _eliminatedCarEvent = new EliminatedCarEventArgs(0);
            _finishedLapEvent = new FinishedLapEventArgs(0);
        }
コード例 #2
0
ファイル: ScreenRenderer.cs プロジェクト: rroveri/triolozzi
        public void setSadToPlayer(object sender, EliminatedCarEventArgs e)
        {
            cryingSound.Play(1f, 0, 0);

            for (int c = 0; c < 6; c++)
                postitVertices[e.EliminatedCarIndex * 6 + c].Color = Color.Black;
        }