Ejemplo n.º 1
0
        void HandleCarButtonInput()
        {
            int Level = 1;

            for (int i = 0; i < menu [0].Length; i++)
            {
                if (SwinGame.MouseClicked(MouseButton.LeftButton) &&
                    UtilityFunction.IsMouseInRectangle(ButtonX + (Spacing + ButtonWidth) * (Level), ButtonY + (Spacing + ButtonHeight) * i,
                                                       ButtonWidth, ButtonHeight, SwinGame.MousePosition()))
                {
                    PerformCarSelectionChanges(i);
                    break;
                }
            }
            while (UtilityFunction.gameStateStack.Peek() == GameState.ChangingCar)
            {
                UtilityFunction.gameStateStack.Pop();
            }
        }