public LogicHandler(ResourceManager resourceManager, InputHandler inputHandler) { _resourceManager = resourceManager; _inputHandler = inputHandler; _playerLogicHandler = new PlayerLogicHandler(); _roamLogicHandler = new RoamLogicHandler(resourceManager); _startAndExitMenuLogicHandler = new StartAndExitMenuLogicHandler(resourceManager, inputHandler); _transitionHandler = new TransitionHandler(resourceManager, _playerLogicHandler, _roamLogicHandler, _startAndExitMenuLogicHandler); GameStateHelper.ChangeState(GameStates.Start); }
public TransitionHandler(ResourceManager resourceManager, PlayerLogicHandler playerLogicHandler, RoamLogicHandler roamLogicHandler, StartAndExitMenuLogicHandler startAndExitMenuLogicHandler) { _resourceManager = resourceManager; _playerLogicHandler = playerLogicHandler; _roamLogicHandler = roamLogicHandler; _startAndExitMenuLogicHandler = startAndExitMenuLogicHandler; _transitioning = false; _fadeCounter = 0; _drawColor = WHITE_COLOR; _fadeColors = new List <Color>(); _fadeColors.Add(Color.White); _fadeColors.Add(new Color(225, 225, 225)); _fadeColors.Add(new Color(225, 225, 225)); _fadeColors.Add(new Color(200, 200, 200)); _fadeColors.Add(new Color(200, 200, 200)); _fadeColors.Add(new Color(175, 175, 175)); _fadeColors.Add(new Color(175, 175, 175)); _fadeColors.Add(new Color(150, 150, 150)); _fadeColors.Add(new Color(150, 150, 150)); _fadeColors.Add(new Color(125, 125, 125)); _fadeColors.Add(new Color(125, 125, 125)); _fadeColors.Add(new Color(100, 100, 100)); _fadeColors.Add(new Color(100, 100, 100)); _fadeColors.Add(new Color(75, 75, 75)); _fadeColors.Add(new Color(75, 75, 75)); _fadeColors.Add(new Color(50, 50, 50)); _fadeColors.Add(new Color(50, 50, 50)); _fadeColors.Add(new Color(25, 25, 25)); _fadeColors.Add(new Color(25, 25, 25)); _fadeColors.Add(Color.Black); _roamLogicHandler.InitiateTransition += TransitionRequested; _startAndExitMenuLogicHandler.InitiateTransition += TransitionRequested; }