public PlayersController(IPlayersRepository playersRepository, IMapper mapper, IGameStateManager gameStateManager, AppSettings appSettings) { this.playersRepository = playersRepository; this.appSettings = appSettings; this.mapper = mapper; this.gameStateManager = gameStateManager; }
public MainWindow(IGameStateManager gameStateManager, World world) : base(1280, 720, GraphicsMode.Default, "ft_vox", GameWindowFlags.Default, DisplayDevice.Default, 4, 0, GraphicsContextFlags.Default) { VSync = VSyncMode.Off; _gameStateManager = gameStateManager; _gameStateManager.OnGameStateChanged += OnGameStateChanged; }
public PawnsController(IPawnsRepository pawnsRepository, IMapper mapper, IGameStateManager gameStateManager, IBattleActionSimulator battleActionSimulator) { this.pawnsRepository = pawnsRepository; this.mapper = mapper; this.gameStateManager = gameStateManager; this.battleActionSimulator = battleActionSimulator; }
public GameState(Game game) : base(game) { StateManager = (IGameStateManager)game.Services.GetService(typeof( IGameStateManager)); Input = (IInputHandler)game.Services.GetService(typeof( IInputHandler)); }
public MarketSimulator(ILogService logService, IGameStateManager gameStateManager, IGameFactory gameFactory, IRandomService randomService) { this.logService = logService; this.gameStateManager = gameStateManager; this.gameFactory = gameFactory; this.randomService = randomService; }
public GameState(Game game) : base(game) { GameManager = (IGameStateManager)game.Services.GetService( typeof(IGameStateManager)); Input = (IInputHandler)game.Services.GetService( typeof(IInputHandler)); }
public void Inject(IContainer container) { _playerTargetingService = container.Get <IPlayerTargetingService>(); _playerMovementService = container.Get <IPlayerMovementService>(); _playerCollisionService = container.Get <IPlayerCollisionService>(); _gameStateManager = container.Get <IGameStateManager>(); _configStorage = container.Get <IConfigStorage>(); }
public FourPlayerLevel( IPongGame pongGame, ISettings settings, IGameStateManager gameStateManager) : base(pongGame, gameStateManager) { _settings = settings; }
public RuntimeInstancesManager(IGameStateManager gameStateManager, IAssetResolver assetResolver) { _gameStateManager = gameStateManager; _assetResolver = assetResolver; _sceneRuntimeInstancesManagers = new Dictionary <int, ISceneRuntimeInstancesManager>(); SceneManager.sceneLoaded += SceneManagerOnSceneLoaded; SceneManager.sceneUnloaded += SceneManagerOnSceneUnloaded; }
protected AbstractGameState(Game game) : base(game) { tag = this; childComponents = new List <GameComponent>(); content = game.Content; manager = (IGameStateManager)Game.Services.GetService(typeof(IGameStateManager)); }
public StatefulUIManager( IInputManager inputManager, IBatchedDrawingService drawingService, IGameWindowService windowService, ContentManager contentManager, IGameStateManager stateManager) : base(inputManager, drawingService, windowService, contentManager) { this.stateManager = stateManager; }
public GameProcessManager( IClientManager clientManager, IConnectionManager connectionManager, IGameStateManager gameStateManager, ISocketManager socketManager) { _clientManager = clientManager; _connectionManager = connectionManager; _gameStateManager = gameStateManager; _socketManager = socketManager; }
public TrixelParticleSystem(Game game, TrixelParticleSystem.Settings settings) : base(game) { this.settings = settings; this.DrawOrder = 10; this.PhysicsManager = ServiceHelper.Get <IPhysicsManager>(); this.CameraManager = ServiceHelper.Get <IGameCameraManager>(); this.GameState = ServiceHelper.Get <IGameStateManager>(); this.LightingPostProcess = ServiceHelper.Get <ILightingPostProcess>(); this.CollisionManager = ServiceHelper.Get <ICollisionManager>(); }
/// <summary> /// Initializes the game state /// </summary> /// <param name="manager">Game state manager</param> /// <param name="name">Name of the game state</param> /// <param name="blockDrawing">Whether or not to block other states from drawing</param> /// <param name="blockUpdate">Whether or not to block other states from updating</param> public GameState(IGameStateManager manager, string name, bool blockDrawing, bool blockUpdate) { Trace.Info("new GameState(name = {0}, BlockDrawing = {1}, BlockUpdates = {2}", name, blockDrawing, blockUpdate); manager.Add(name, this); BlockDrawing = blockDrawing; BlockUpdates = blockUpdate; OnUpdate = FireUpdate; Update += UpdateBitmaps; Draw = DrawBitmaps; }
public TrixelParticleSystem(Game game, TrixelParticleSystem.Settings settings) : base(game) { this.settings = settings; this.DrawOrder = 10; this.PhysicsManager = ServiceHelper.Get<IPhysicsManager>(); this.CameraManager = ServiceHelper.Get<IGameCameraManager>(); this.GameState = ServiceHelper.Get<IGameStateManager>(); this.LightingPostProcess = ServiceHelper.Get<ILightingPostProcess>(); this.CollisionManager = ServiceHelper.Get<ICollisionManager>(); }
public ChessMatchState(Game game) { //Managers m_inputManger = (IInputManager)game.Services.GetService(typeof(IInputManager)); m_gameStateManager = (IGameStateManager)game.Services.GetService(typeof(IGameStateManager)); m_graphicsManager = (IGraphicsManager)game.Services.GetService(typeof(IGraphicsManager)); m_resourceManager = (IResourceManager)game.Services.GetService(typeof(IResourceManager)); m_audioManager = (IAudioManager)game.Services.GetService(typeof(IAudioManager)); //Chess match stuff m_matchState = WhitePiecePicking.GetMatchState(this); m_chessMatch = new ChessMatch(this); }
public MenuGameState(Game game) { m_gameStateManager = (IGameStateManager)game.Services.GetService(typeof(IGameStateManager)); m_resourceManager = (IResourceManager)game.Services.GetService(typeof(IResourceManager)); m_audioManager = (IAudioManager)game.Services.GetService(typeof(IAudioManager)); m_graphicsManager = (IGraphicsManager)game.Services.GetService(typeof(IGraphicsManager)); m_serviceHelper = new ServiceHelper(); m_serviceHelper.Initialize(m_graphicsManager.GraphicsDevice, game.Content); m_forms = new FormCollection(); InitializeUI(); }
public void Initalise(IGameStateManager stateManager) { this.stateManager = stateManager; //display an incredibly complex line of text this.menuText = new TextElementRect(new Vector2(400, 100)); this.menuText.Text.SetText("Press a button to start a new game!"); this.menuText.VerticalAlignment = VerticalAlignment.Centre; this.menuText.HorizontalAlignment = HorizontalAlignment.Centre; this.menuText.TextHorizontalAlignment = TextHorizontalAlignment.Centre; //set the text font (using global content) stateManager.Application.Content.Add(this); }
public void Initalise(IGameStateManager stateManager) { this.stateManager = stateManager; //Put up a beautiful and intricate loading bar (a green box on top of a black box) this.loadingBar = new SolidColourElement(Color.Lime, new Vector2(0, 0.15f), true); this.loadingBackground = new SolidColourElement(Color.Black, new Vector2(0.52f, 0.17f), true); this.loadingBar.Position = new Vector2(0.25f, 0.35f); this.loadingBackground.Position = new Vector2(0.24f, 0.34f); //tell the next state (in this case, it'll be the game) to begin loading this.stateToLoad.BeginLoad(); }
public GlitchyRespawner(Game game, TrileInstance instance, bool soundEmitter) : base(game) { this.UpdateOrder = -2; this.DrawOrder = 10; this.Instance = instance; this.EmitOrNot = soundEmitter; this.TargetRenderer = ServiceHelper.Get <ITargetRenderingManager>(); this.LightingPostProcess = ServiceHelper.Get <ILightingPostProcess>(); this.LevelMaterializer = ServiceHelper.Get <ILevelMaterializer>(); this.GameState = ServiceHelper.Get <IGameStateManager>(); this.CameraManager = ServiceHelper.Get <IDefaultCameraManager>(); this.LevelManager = ServiceHelper.Get <IGameLevelManager>(); this.CMProvider = ServiceHelper.Get <IContentManagerProvider>(); }
public GameStateMainMenu(Game game, IBatchedDrawingService drawingService, IInputManager inputManager, IGameStateManager stateService, IGameWindowService windowService) : base(drawingService) { this.frameRateCalculator = new FrameRateCalculator(); this.inputManager = inputManager; this.stateService = stateService; this.windowService = windowService; Game = game; styles = new List <StyleDefinition>(); }
public GlitchyRespawner(Game game, TrileInstance instance, bool soundEmitter) : base(game) { this.UpdateOrder = -2; this.DrawOrder = 10; this.Instance = instance; this.EmitOrNot = soundEmitter; this.TargetRenderer = ServiceHelper.Get<ITargetRenderingManager>(); this.LightingPostProcess = ServiceHelper.Get<ILightingPostProcess>(); this.LevelMaterializer = ServiceHelper.Get<ILevelMaterializer>(); this.GameState = ServiceHelper.Get<IGameStateManager>(); this.CameraManager = ServiceHelper.Get<IDefaultCameraManager>(); this.LevelManager = ServiceHelper.Get<IGameLevelManager>(); this.CMProvider = ServiceHelper.Get<IContentManagerProvider>(); }
public void Initalise(IGameStateManager stateManager) { this.stateManager = stateManager; //put some text up... this.startText = new TextElementRect(new Vector2(400, 100)); this.startText.Text.SetText("Press the START button to begin"); this.startText.VerticalAlignment = VerticalAlignment.Centre; this.startText.HorizontalAlignment = HorizontalAlignment.Centre; this.startText.TextHorizontalAlignment = TextHorizontalAlignment.Centre; this.startText.Colour = Color.Red; //set the text font stateManager.Application.Content.Add(this); }
public GameStateNetworkingManager( int managerID, IGameStateManager gameStateManager, LidgrenNetworkingService networkingService, MessageService_ToServer messageManager ) { _gameStateManager = gameStateManager; _networkingService = networkingService; _messageManager = messageManager; _messageHandlerID = new MessageHandlerID(managerID); _networkingService.RegisterMessageHandler(this, _GameStateNetworkingManager_MessageReceived); }
public Server(Container container, ServerConfig config) { Log.Info($"Starting the server on {config.Port} port with rate {config.Rate}"); _queue = new ConcurrentQueue <Packet>(); _socketManager = container.GetInstance <ISocketManager>(); _clientManager = container.GetInstance <IClientManager>(); _gameStateManager = container.GetInstance <IGameStateManager>(); _gameProcessManager = container.GetInstance <IGameProcessManager>(); _config = config; Log.Info($"Configuring..."); _socketManager.Configure(config); Log.Info($"Done"); }
public MainMenuGui( IPongGame pongGame, IGameStateManager gameStateManager) { var resume = Button("Resume", pongGame.ResumeGame, pongGame.IsInGame || gameStateManager.HasSavedGame()); var start = Button("Start 4 Player", pongGame.StartGame4Player); var start2 = Button("Start 2 Player", pongGame.StartGameClassic); var startTeams = Button("Start 4 Player Teams", pongGame.StartGameTeams); //var host = Button("Host", pongGame.HostGame); //var join = Button("Join", pongGame.JoinGame); var settings = Button("Settings", pongGame.ShowSettings); var quit = Button("Quit", pongGame.Exit); var src = new Screen() { Content = new StackPanel() { Margin = new Thickness(10), Items = { new Label() { Name = "winner" }, resume, start, start2, startTeams, settings, //host, //join, quit, }, HorizontalAlignment = HorizontalAlignment.Centre, VerticalAlignment = VerticalAlignment.Centre } }; label = src.FindControl <Label>("winner"); start.IsPressed = true; Screen = src; }
//this will be called once this game state is up and running. public void Initalise(IGameStateManager stateManager) { this.stateManager = stateManager; //create the sprites, which will bounce around the screen //sprite drawer this.spriteElement = new SpriteElement(); //the sprite positions / velocities for (int i = 0; i < SpriteCount; i++) { this.spritePosition[i] = new Vector2((float)rand.NextDouble() * stateManager.Application.WindowWidth * 0.25f, (float)rand.NextDouble() * stateManager.Application.WindowHeight * 0.25f); this.spriteVelocity[i] = new Vector2((float)rand.NextDouble() * 2000 - 1000, (float)rand.NextDouble() * 2000 - 1000); //add a sprite for each to the sprite drawer this.spriteElement.AddSprite(spritePosition[i], new Vector2(1.5f, 1.5f)); } }
public MainManager(BloomComponent bloom, TextDrawingService textDrawingService, Game game, IGameStateManager gameStateManager, GraphicsDeviceManager graphics, MainNetworkingManager mainNetworkingManager) { _textDrawingService = textDrawingService; _game = game; _gameStateManager = gameStateManager; _graphics = graphics; _mainNetworkingManager = mainNetworkingManager; _drawsPerSecondCounter = new OPSCounter(5); _updatesPerSecondCounter = new OPSCounter(5); }
public Chess() { Content.RootDirectory = "Content"; new GraphicsDeviceManager(this); m_inputManager = InputManagerFactory.GetInputManager(this); Components.Add(m_inputManager); m_audioManager = AudioManagerFactory.GetAudioManager(this); Components.Add(m_audioManager); m_resourceManager = ResourceManagerFactory.GetResourceManager(this); Components.Add(m_resourceManager); m_graphicsManager = GraphicsManagerFactory.GetGraphicsManager(this); Components.Add(m_graphicsManager); m_gameStateManager = GameStateManagerFactory.GetGameStateManager(this); Components.Add(m_gameStateManager); }
public ControlsMenuLevel(MenuBase menuBase) { this.InputManager = ServiceHelper.Get <IInputManager>(); this.GameState = ServiceHelper.Get <IGameStateManager>(); this.KeyboardManager = ServiceHelper.Get <IKeyboardStateManager>(); this.MouseState = ServiceHelper.Get <IMouseStateManager>(); this.menuBase = menuBase; this.IsDynamic = true; Dictionary <MappedAction, Keys> kmap = SettingsManager.Settings.KeyboardMapping; Dictionary <MappedAction, int> gmap = SettingsManager.Settings.GamepadMapping; for (int index = 0; index < 9; ++index) { this.AddItem((string)null, MenuBase.SliderAction, -1).Selectable = false; } this.otherGamepadsStart = this.Items.Count; MenuItem gjmi = this.AddItem("ControlsJump", -1); gjmi.Selected = (Action)(() => this.ChangeButton(gjmi)); gjmi.SuffixText = (Func <string>)(() => " : " + this.Buttonize(gmap[MappedAction.Jump])); MenuItem gami = this.AddItem("ControlsAction", -1); gami.Selected = (Action)(() => this.ChangeButton(gami)); gami.SuffixText = (Func <string>)(() => " : " + this.Buttonize(gmap[MappedAction.GrabThrow])); MenuItem gtmi = this.AddItem("ControlsTalk", -1); gtmi.Selected = (Action)(() => this.ChangeButton(gtmi)); gtmi.SuffixText = (Func <string>)(() => " : " + this.Buttonize(gmap[MappedAction.CancelTalk])); MenuItem gmami = this.AddItem("Map_Title", -1); gmami.Selected = (Action)(() => this.ChangeButton(gmami)); gmami.SuffixText = (Func <string>)(() => " : " + this.Buttonize(gmap[MappedAction.OpenMap])); MenuItem gimi = this.AddItem("ControlsInventory", -1); gimi.Selected = (Action)(() => this.ChangeButton(gimi)); gimi.SuffixText = (Func <string>)(() => " : " + this.Buttonize(gmap[MappedAction.OpenInventory])); MenuItem gpmi = this.AddItem("ControlsPause", -1); gpmi.Selected = (Action)(() => this.ChangeButton(gpmi)); gpmi.SuffixText = (Func <string>)(() => " : " + this.Buttonize(gmap[MappedAction.Pause])); MenuItem grlmi = this.AddItem("ControlsRotateLeft", -1); grlmi.Selected = (Action)(() => this.ChangeButton(grlmi)); grlmi.SuffixText = (Func <string>)(() => " : " + this.Buttonize(gmap[MappedAction.RotateLeft])); MenuItem grrmi = this.AddItem("ControlsRotateRight", -1); grrmi.Selected = (Action)(() => this.ChangeButton(grrmi)); grrmi.SuffixText = (Func <string>)(() => " : " + this.Buttonize(gmap[MappedAction.RotateRight])); MenuItem gclmi = this.AddItem("ControlsClampLook", -1); gclmi.Selected = (Action)(() => this.ChangeButton(gclmi)); gclmi.SuffixText = (Func <string>)(() => " : " + this.Buttonize(gmap[MappedAction.ClampLook])); MenuItem gmzimi = this.AddItem("ControlsMapZoomIn", -1); gmzimi.Selected = (Action)(() => this.ChangeButton(gmzimi)); gmzimi.SuffixText = (Func <string>)(() => " : " + this.Buttonize(gmap[MappedAction.MapZoomIn])); MenuItem gmzomi = this.AddItem("ControlsZoomOut", -1); gmzomi.Selected = (Action)(() => this.ChangeButton(gmzomi)); gmzomi.SuffixText = (Func <string>)(() => " : " + this.Buttonize(gmap[MappedAction.MapZoomOut])); if (this.GameState.SaveData.HasFPView) { MenuItem gtfvmi = this.AddItem("ControlsToggleFpView", -1); gtfvmi.Selected = (Action)(() => this.ChangeButton(gtfvmi)); gtfvmi.SuffixText = (Func <string>)(() => " : " + this.Buttonize(gmap[MappedAction.FpViewToggle])); } this.AddItem((string)null, MenuBase.SliderAction, -1).Selectable = false; this.AddItem("ResetToDefault", (Action)(() => this.ResetToDefault(false, true)), -1); this.keyboardStart = this.Items.Count; MenuItem jmi = this.AddItem("ControlsJump", -1); jmi.Selected = (Action)(() => this.ChangeKey(jmi)); jmi.SuffixText = (Func <string>)(() => " : " + this.Localize((object)kmap[MappedAction.Jump])); MenuItem ami = this.AddItem("ControlsAction", -1); ami.Selected = (Action)(() => this.ChangeKey(ami)); ami.SuffixText = (Func <string>)(() => " : " + this.Localize((object)kmap[MappedAction.GrabThrow])); MenuItem tmi = this.AddItem("ControlsTalk", -1); tmi.Selected = (Action)(() => this.ChangeKey(tmi)); tmi.SuffixText = (Func <string>)(() => " : " + this.Localize((object)kmap[MappedAction.CancelTalk])); this.AddItem <ControlsMenuLevel.ArrowKeyMapping>("ControlsMove", MenuBase.SliderAction, false, (Func <ControlsMenuLevel.ArrowKeyMapping>)(() => this.UpToAKM(kmap[MappedAction.Up])), (Action <ControlsMenuLevel.ArrowKeyMapping, int>)((lastValue, change) => { ControlsMenuLevel.ArrowKeyMapping local_0_1 = this.UpToAKM(kmap[MappedAction.Up]) + change; if (local_0_1 == (ControlsMenuLevel.ArrowKeyMapping) 5) { local_0_1 = ControlsMenuLevel.ArrowKeyMapping.WASD; } if (local_0_1 < ControlsMenuLevel.ArrowKeyMapping.WASD) { local_0_1 = ControlsMenuLevel.ArrowKeyMapping.Arrows; } kmap[MappedAction.Up] = this.AKMToKey(local_0_1, 0); kmap[MappedAction.Left] = this.AKMToKey(local_0_1, 1); kmap[MappedAction.Down] = this.AKMToKey(local_0_1, 2); kmap[MappedAction.Right] = this.AKMToKey(local_0_1, 3); this.KeyboardManager.UpdateMapping(); }), -1).SuffixText = (Func <string>)(() => " : " + this.Localize((object)this.UpToAKM(kmap[MappedAction.Up]))); this.AddItem <ControlsMenuLevel.ArrowKeyMapping>("ControlsLook", MenuBase.SliderAction, false, (Func <ControlsMenuLevel.ArrowKeyMapping>)(() => this.UpToAKM(kmap[MappedAction.LookUp])), (Action <ControlsMenuLevel.ArrowKeyMapping, int>)((lastValue, change) => { ControlsMenuLevel.ArrowKeyMapping local_0_1 = this.UpToAKM(kmap[MappedAction.LookUp]) + change; if (local_0_1 == (ControlsMenuLevel.ArrowKeyMapping) 5) { local_0_1 = ControlsMenuLevel.ArrowKeyMapping.WASD; } if (local_0_1 < ControlsMenuLevel.ArrowKeyMapping.WASD) { local_0_1 = ControlsMenuLevel.ArrowKeyMapping.Arrows; } kmap[MappedAction.LookUp] = this.AKMToKey(local_0_1, 0); kmap[MappedAction.LookLeft] = this.AKMToKey(local_0_1, 1); kmap[MappedAction.LookDown] = this.AKMToKey(local_0_1, 2); kmap[MappedAction.LookRight] = this.AKMToKey(local_0_1, 3); this.KeyboardManager.UpdateMapping(); }), -1).SuffixText = (Func <string>)(() => " : " + this.Localize((object)this.UpToAKM(kmap[MappedAction.LookUp]))); MenuItem mami = this.AddItem("Map_Title", -1); mami.Selected = (Action)(() => this.ChangeKey(mami)); mami.SuffixText = (Func <string>)(() => " : " + this.Localize((object)kmap[MappedAction.OpenMap])); MenuItem imi = this.AddItem("ControlsInventory", -1); imi.Selected = (Action)(() => this.ChangeKey(imi)); imi.SuffixText = (Func <string>)(() => " : " + this.Localize((object)kmap[MappedAction.OpenInventory])); MenuItem pmi = this.AddItem("ControlsPause", -1); pmi.Selected = (Action)(() => this.ChangeKey(pmi)); pmi.SuffixText = (Func <string>)(() => " : " + this.Localize((object)kmap[MappedAction.Pause])); MenuItem rlmi = this.AddItem("ControlsRotateLeft", -1); rlmi.Selected = (Action)(() => this.ChangeKey(rlmi)); rlmi.SuffixText = (Func <string>)(() => " : " + this.Localize((object)kmap[MappedAction.RotateLeft])); MenuItem rrmi = this.AddItem("ControlsRotateRight", -1); rrmi.Selected = (Action)(() => this.ChangeKey(rrmi)); rrmi.SuffixText = (Func <string>)(() => " : " + this.Localize((object)kmap[MappedAction.RotateRight])); MenuItem clmi = this.AddItem("ControlsClampLook", -1); clmi.Selected = (Action)(() => this.ChangeKey(clmi)); clmi.SuffixText = (Func <string>)(() => " : " + this.Localize((object)kmap[MappedAction.ClampLook])); MenuItem mzimi = this.AddItem("ControlsMapZoomIn", -1); mzimi.Selected = (Action)(() => this.ChangeKey(mzimi)); mzimi.SuffixText = (Func <string>)(() => " : " + this.Localize((object)kmap[MappedAction.MapZoomIn])); MenuItem mzomi = this.AddItem("ControlsZoomOut", -1); mzomi.Selected = (Action)(() => this.ChangeKey(mzomi)); mzomi.SuffixText = (Func <string>)(() => " : " + this.Localize((object)kmap[MappedAction.MapZoomOut])); if (this.GameState.SaveData.HasFPView) { MenuItem tfvmi = this.AddItem("ControlsToggleFpView", -1); tfvmi.Selected = (Action)(() => this.ChangeKey(tfvmi)); tfvmi.SuffixText = (Func <string>)(() => " : " + this.Localize((object)kmap[MappedAction.FpViewToggle])); } this.AddItem((string)null, MenuBase.SliderAction, -1).Selectable = false; this.AddItem("ResetToDefault", (Action)(() => this.ResetToDefault(true, false)), -1); this.selectorStart = this.Items.Count; this.AddItem("XboxGamepad", MenuBase.SliderAction, true, -1).UpperCase = true; this.AddItem("OtherGamepad", MenuBase.SliderAction, true, -1).UpperCase = true; this.AddItem("Keyboard", MenuBase.SliderAction, true, -1).UpperCase = true; }
public override void Initialize() { base.Initialize(); this.Title = "SaveSlotTitle"; this.AButtonString = "ChooseWithGlyph"; this.BButtonString = "ExitWithGlyph"; this.GameState = ServiceHelper.Get<IGameStateManager>(); for (int index = 0; index < 3; ++index) { // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type SaveSlotSelectionLevel.\u003C\u003Ec__DisplayClassa cDisplayClassa = new SaveSlotSelectionLevel.\u003C\u003Ec__DisplayClassa(); // ISSUE: reference to a compiler-generated field cDisplayClassa.\u003C\u003E4__this = this; // ISSUE: reference to a compiler-generated field cDisplayClassa.slot = this.Slots[index] = new SaveSlotInfo() { Index = index }; PCSaveDevice pcSaveDevice = new PCSaveDevice("FEZ"); string fileName = "SaveSlot" + (object) index; if (!pcSaveDevice.FileExists(fileName)) { // ISSUE: reference to a compiler-generated field cDisplayClassa.slot.Empty = true; } else { // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type SaveSlotSelectionLevel.\u003C\u003Ec__DisplayClassc cDisplayClassc = new SaveSlotSelectionLevel.\u003C\u003Ec__DisplayClassc(); // ISSUE: reference to a compiler-generated field cDisplayClassc.CS\u0024\u003C\u003E8__localsb = cDisplayClassa; // ISSUE: reference to a compiler-generated field cDisplayClassc.saveData = (SaveData) null; // ISSUE: reference to a compiler-generated method // ISSUE: reference to a compiler-generated field if (!pcSaveDevice.Load(fileName, new LoadAction(cDisplayClassc.\u003CInitialize\u003Eb__4)) || cDisplayClassc.saveData == null) { // ISSUE: reference to a compiler-generated field cDisplayClassa.slot.Empty = true; } else { // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field cDisplayClassa.slot.Percentage = (float) (((double) (cDisplayClassc.saveData.CubeShards + cDisplayClassc.saveData.SecretCubes + cDisplayClassc.saveData.PiecesOfHeart) + (double) cDisplayClassc.saveData.CollectedParts / 8.0) / 32.0); // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field cDisplayClassa.slot.PlayTime = new TimeSpan(cDisplayClassc.saveData.PlayTime); } } if (this.Slots[index].Empty) { // ISSUE: reference to a compiler-generated method this.AddItem((string) null, new Action(cDisplayClassa.\u003CInitialize\u003Eb__5), -1).SuffixText = (Func<string>) (() => StaticText.GetString("NewSlot")); } else { // ISSUE: reference to a compiler-generated method // ISSUE: reference to a compiler-generated method this.AddItem("SaveSlotPrefix", new Action(cDisplayClassa.\u003CInitialize\u003Eb__7), -1).SuffixText = new Func<string>(cDisplayClassa.\u003CInitialize\u003Eb__8); } } }
public DefaultCommandsExecutor(IGameStateManager gameStateManager) { _gameStateManager = gameStateManager; _stateUpdated = new Subject <GameState>(); }
public void Inject(IContainer container) { _gameStateManager = container.Get <IGameStateManager>(); _configs = container.Get <IConfigStorage>(); }
//public bool HasTeams { get; set; } public RegularPongLevel( IPongGame pongGame, IGameStateManager gameStateManager) : base(pongGame) { _gameStateManager = gameStateManager; }
public ControlsMenuLevel(MenuBase menuBase) { this.InputManager = ServiceHelper.Get<IInputManager>(); this.GameState = ServiceHelper.Get<IGameStateManager>(); this.KeyboardManager = ServiceHelper.Get<IKeyboardStateManager>(); this.MouseState = ServiceHelper.Get<IMouseStateManager>(); this.menuBase = menuBase; this.IsDynamic = true; Dictionary<MappedAction, Keys> kmap = SettingsManager.Settings.KeyboardMapping; Dictionary<MappedAction, int> gmap = SettingsManager.Settings.GamepadMapping; for (int index = 0; index < 9; ++index) this.AddItem((string) null, MenuBase.SliderAction, -1).Selectable = false; this.otherGamepadsStart = this.Items.Count; MenuItem gjmi = this.AddItem("ControlsJump", -1); gjmi.Selected = (Action) (() => this.ChangeButton(gjmi)); gjmi.SuffixText = (Func<string>) (() => " : " + this.Buttonize(gmap[MappedAction.Jump])); MenuItem gami = this.AddItem("ControlsAction", -1); gami.Selected = (Action) (() => this.ChangeButton(gami)); gami.SuffixText = (Func<string>) (() => " : " + this.Buttonize(gmap[MappedAction.GrabThrow])); MenuItem gtmi = this.AddItem("ControlsTalk", -1); gtmi.Selected = (Action) (() => this.ChangeButton(gtmi)); gtmi.SuffixText = (Func<string>) (() => " : " + this.Buttonize(gmap[MappedAction.CancelTalk])); MenuItem gmami = this.AddItem("Map_Title", -1); gmami.Selected = (Action) (() => this.ChangeButton(gmami)); gmami.SuffixText = (Func<string>) (() => " : " + this.Buttonize(gmap[MappedAction.OpenMap])); MenuItem gimi = this.AddItem("ControlsInventory", -1); gimi.Selected = (Action) (() => this.ChangeButton(gimi)); gimi.SuffixText = (Func<string>) (() => " : " + this.Buttonize(gmap[MappedAction.OpenInventory])); MenuItem gpmi = this.AddItem("ControlsPause", -1); gpmi.Selected = (Action) (() => this.ChangeButton(gpmi)); gpmi.SuffixText = (Func<string>) (() => " : " + this.Buttonize(gmap[MappedAction.Pause])); MenuItem grlmi = this.AddItem("ControlsRotateLeft", -1); grlmi.Selected = (Action) (() => this.ChangeButton(grlmi)); grlmi.SuffixText = (Func<string>) (() => " : " + this.Buttonize(gmap[MappedAction.RotateLeft])); MenuItem grrmi = this.AddItem("ControlsRotateRight", -1); grrmi.Selected = (Action) (() => this.ChangeButton(grrmi)); grrmi.SuffixText = (Func<string>) (() => " : " + this.Buttonize(gmap[MappedAction.RotateRight])); MenuItem gclmi = this.AddItem("ControlsClampLook", -1); gclmi.Selected = (Action) (() => this.ChangeButton(gclmi)); gclmi.SuffixText = (Func<string>) (() => " : " + this.Buttonize(gmap[MappedAction.ClampLook])); MenuItem gmzimi = this.AddItem("ControlsMapZoomIn", -1); gmzimi.Selected = (Action) (() => this.ChangeButton(gmzimi)); gmzimi.SuffixText = (Func<string>) (() => " : " + this.Buttonize(gmap[MappedAction.MapZoomIn])); MenuItem gmzomi = this.AddItem("ControlsZoomOut", -1); gmzomi.Selected = (Action) (() => this.ChangeButton(gmzomi)); gmzomi.SuffixText = (Func<string>) (() => " : " + this.Buttonize(gmap[MappedAction.MapZoomOut])); if (this.GameState.SaveData.HasFPView) { MenuItem gtfvmi = this.AddItem("ControlsToggleFpView", -1); gtfvmi.Selected = (Action) (() => this.ChangeButton(gtfvmi)); gtfvmi.SuffixText = (Func<string>) (() => " : " + this.Buttonize(gmap[MappedAction.FpViewToggle])); } this.AddItem((string) null, MenuBase.SliderAction, -1).Selectable = false; this.AddItem("ResetToDefault", (Action) (() => this.ResetToDefault(false, true)), -1); this.keyboardStart = this.Items.Count; MenuItem jmi = this.AddItem("ControlsJump", -1); jmi.Selected = (Action) (() => this.ChangeKey(jmi)); jmi.SuffixText = (Func<string>) (() => " : " + this.Localize((object) kmap[MappedAction.Jump])); MenuItem ami = this.AddItem("ControlsAction", -1); ami.Selected = (Action) (() => this.ChangeKey(ami)); ami.SuffixText = (Func<string>) (() => " : " + this.Localize((object) kmap[MappedAction.GrabThrow])); MenuItem tmi = this.AddItem("ControlsTalk", -1); tmi.Selected = (Action) (() => this.ChangeKey(tmi)); tmi.SuffixText = (Func<string>) (() => " : " + this.Localize((object) kmap[MappedAction.CancelTalk])); this.AddItem<ControlsMenuLevel.ArrowKeyMapping>("ControlsMove", MenuBase.SliderAction, false, (Func<ControlsMenuLevel.ArrowKeyMapping>) (() => this.UpToAKM(kmap[MappedAction.Up])), (Action<ControlsMenuLevel.ArrowKeyMapping, int>) ((lastValue, change) => { ControlsMenuLevel.ArrowKeyMapping local_0_1 = this.UpToAKM(kmap[MappedAction.Up]) + change; if (local_0_1 == (ControlsMenuLevel.ArrowKeyMapping) 5) local_0_1 = ControlsMenuLevel.ArrowKeyMapping.WASD; if (local_0_1 < ControlsMenuLevel.ArrowKeyMapping.WASD) local_0_1 = ControlsMenuLevel.ArrowKeyMapping.Arrows; kmap[MappedAction.Up] = this.AKMToKey(local_0_1, 0); kmap[MappedAction.Left] = this.AKMToKey(local_0_1, 1); kmap[MappedAction.Down] = this.AKMToKey(local_0_1, 2); kmap[MappedAction.Right] = this.AKMToKey(local_0_1, 3); this.KeyboardManager.UpdateMapping(); }), -1).SuffixText = (Func<string>) (() => " : " + this.Localize((object) this.UpToAKM(kmap[MappedAction.Up]))); this.AddItem<ControlsMenuLevel.ArrowKeyMapping>("ControlsLook", MenuBase.SliderAction, false, (Func<ControlsMenuLevel.ArrowKeyMapping>) (() => this.UpToAKM(kmap[MappedAction.LookUp])), (Action<ControlsMenuLevel.ArrowKeyMapping, int>) ((lastValue, change) => { ControlsMenuLevel.ArrowKeyMapping local_0_1 = this.UpToAKM(kmap[MappedAction.LookUp]) + change; if (local_0_1 == (ControlsMenuLevel.ArrowKeyMapping) 5) local_0_1 = ControlsMenuLevel.ArrowKeyMapping.WASD; if (local_0_1 < ControlsMenuLevel.ArrowKeyMapping.WASD) local_0_1 = ControlsMenuLevel.ArrowKeyMapping.Arrows; kmap[MappedAction.LookUp] = this.AKMToKey(local_0_1, 0); kmap[MappedAction.LookLeft] = this.AKMToKey(local_0_1, 1); kmap[MappedAction.LookDown] = this.AKMToKey(local_0_1, 2); kmap[MappedAction.LookRight] = this.AKMToKey(local_0_1, 3); this.KeyboardManager.UpdateMapping(); }), -1).SuffixText = (Func<string>) (() => " : " + this.Localize((object) this.UpToAKM(kmap[MappedAction.LookUp]))); MenuItem mami = this.AddItem("Map_Title", -1); mami.Selected = (Action) (() => this.ChangeKey(mami)); mami.SuffixText = (Func<string>) (() => " : " + this.Localize((object) kmap[MappedAction.OpenMap])); MenuItem imi = this.AddItem("ControlsInventory", -1); imi.Selected = (Action) (() => this.ChangeKey(imi)); imi.SuffixText = (Func<string>) (() => " : " + this.Localize((object) kmap[MappedAction.OpenInventory])); MenuItem pmi = this.AddItem("ControlsPause", -1); pmi.Selected = (Action) (() => this.ChangeKey(pmi)); pmi.SuffixText = (Func<string>) (() => " : " + this.Localize((object) kmap[MappedAction.Pause])); MenuItem rlmi = this.AddItem("ControlsRotateLeft", -1); rlmi.Selected = (Action) (() => this.ChangeKey(rlmi)); rlmi.SuffixText = (Func<string>) (() => " : " + this.Localize((object) kmap[MappedAction.RotateLeft])); MenuItem rrmi = this.AddItem("ControlsRotateRight", -1); rrmi.Selected = (Action) (() => this.ChangeKey(rrmi)); rrmi.SuffixText = (Func<string>) (() => " : " + this.Localize((object) kmap[MappedAction.RotateRight])); MenuItem clmi = this.AddItem("ControlsClampLook", -1); clmi.Selected = (Action) (() => this.ChangeKey(clmi)); clmi.SuffixText = (Func<string>) (() => " : " + this.Localize((object) kmap[MappedAction.ClampLook])); MenuItem mzimi = this.AddItem("ControlsMapZoomIn", -1); mzimi.Selected = (Action) (() => this.ChangeKey(mzimi)); mzimi.SuffixText = (Func<string>) (() => " : " + this.Localize((object) kmap[MappedAction.MapZoomIn])); MenuItem mzomi = this.AddItem("ControlsZoomOut", -1); mzomi.Selected = (Action) (() => this.ChangeKey(mzomi)); mzomi.SuffixText = (Func<string>) (() => " : " + this.Localize((object) kmap[MappedAction.MapZoomOut])); if (this.GameState.SaveData.HasFPView) { MenuItem tfvmi = this.AddItem("ControlsToggleFpView", -1); tfvmi.Selected = (Action) (() => this.ChangeKey(tfvmi)); tfvmi.SuffixText = (Func<string>) (() => " : " + this.Localize((object) kmap[MappedAction.FpViewToggle])); } this.AddItem((string) null, MenuBase.SliderAction, -1).Selectable = false; this.AddItem("ResetToDefault", (Action) (() => this.ResetToDefault(true, false)), -1); this.selectorStart = this.Items.Count; this.AddItem("XboxGamepad", MenuBase.SliderAction, true, -1).UpperCase = true; this.AddItem("OtherGamepad", MenuBase.SliderAction, true, -1).UpperCase = true; this.AddItem("Keyboard", MenuBase.SliderAction, true, -1).UpperCase = true; }
public void Initalise(IGameStateManager stateManager) { this.stateManager = stateManager; //put some text up... this.startText = new TextElementRect(new Vector2(400,100)); this.startText.Text.SetText("Press the START button to begin"); this.startText.VerticalAlignment = VerticalAlignment.Centre; this.startText.HorizontalAlignment = HorizontalAlignment.Centre; this.startText.TextHorizontalAlignment = TextHorizontalAlignment.Centre; this.startText.Colour = Color.Red; //set the text font stateManager.Application.Content.Add(this); }
public MarketController(IGameStateManager gameStateManager) { this.gameStateManager = gameStateManager; }
public override void Initialize() { // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type SaveManagementLevel.\u003C\u003Ec__DisplayClassd cDisplayClassd = new SaveManagementLevel.\u003C\u003Ec__DisplayClassd(); // ISSUE: reference to a compiler-generated field cDisplayClassd.\u003C\u003E4__this = this; base.Initialize(); this.FontManager = ServiceHelper.Get<IFontManager>(); this.GameState = ServiceHelper.Get<IGameStateManager>(); this.ReloadSlots(); this.Title = "SaveManagementTitle"; // ISSUE: reference to a compiler-generated field cDisplayClassd.sf = this.FontManager.Small; // ISSUE: reference to a compiler-generated field cDisplayClassd.changeLevel = new MenuLevel() { Title = "SaveChangeSlot", AButtonString = "ChangeWithGlyph" }; // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated method cDisplayClassd.changeLevel.OnPostDraw = new Action<SpriteBatch, SpriteFont, GlyphTextRenderer, float>(cDisplayClassd.\u003CInitialize\u003Eb__4); // ISSUE: reference to a compiler-generated field cDisplayClassd.changeLevel.Parent = (MenuLevel) this; // ISSUE: reference to a compiler-generated field cDisplayClassd.changeLevel.Initialize(); // ISSUE: reference to a compiler-generated field cDisplayClassd.copySrcLevel = new MenuLevel() { Title = "SaveCopySourceTitle", AButtonString = "ChooseWithGlyph" }; // ISSUE: reference to a compiler-generated field cDisplayClassd.copySrcLevel.Parent = (MenuLevel) this; // ISSUE: reference to a compiler-generated field cDisplayClassd.copySrcLevel.Initialize(); this.CopyDestLevel = new MenuLevel() { Title = "SaveCopyDestTitle", AButtonString = "ChooseWithGlyph" }; // ISSUE: reference to a compiler-generated method this.CopyDestLevel.OnPostDraw = new Action<SpriteBatch, SpriteFont, GlyphTextRenderer, float>(cDisplayClassd.\u003CInitialize\u003Eb__5); // ISSUE: reference to a compiler-generated field this.CopyDestLevel.Parent = cDisplayClassd.copySrcLevel; this.CopyDestLevel.Initialize(); // ISSUE: reference to a compiler-generated field cDisplayClassd.clearLevel = new MenuLevel() { Title = "SaveClearTitle", AButtonString = "ChooseWithGlyph" }; // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated method cDisplayClassd.clearLevel.OnPostDraw = new Action<SpriteBatch, SpriteFont, GlyphTextRenderer, float>(cDisplayClassd.\u003CInitialize\u003Eb__6); // ISSUE: reference to a compiler-generated field cDisplayClassd.clearLevel.Parent = (MenuLevel) this; // ISSUE: reference to a compiler-generated field cDisplayClassd.clearLevel.Initialize(); // ISSUE: reference to a compiler-generated method this.AddItem("SaveChangeSlot", new Action(cDisplayClassd.\u003CInitialize\u003Eb__7), -1); // ISSUE: reference to a compiler-generated method this.AddItem("SaveCopyTitle", new Action(cDisplayClassd.\u003CInitialize\u003Eb__9), -1); // ISSUE: reference to a compiler-generated method this.AddItem("SaveClearTitle", new Action(cDisplayClassd.\u003CInitialize\u003Eb__b), -1); }