private void KeyPress(string key) { switch (key) { case "KEY_ESCAPE": eventBus.RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.WindowEvent, this, "CLOSE_WINDOW", "", "")); break; case "KEY_A": eventBus.RegisterEvent( GameEventFactory <object> .CreateGameEventForSpecificProcessor( GameEventType.PlayerEvent, this, player, "move left", "", "")); break; case "KEY_D": eventBus.RegisterEvent( GameEventFactory <object> .CreateGameEventForSpecificProcessor( GameEventType.PlayerEvent, this, player, "move right", "", "")); break; case "KEY_SPACE": player.CreateShot(); break; } }
public void HandleKeyEvent(string keyValue, string keyAction) { switch (keyValue) { // create a playerEvent of the with keyValue = messege and KeyAction = Parameter1 // in case of the to cases belove. case "KEY_UP": case "KEY_LEFT": case "KEY_RIGHT": SpaceTaxiBus.GetBus().RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.PlayerEvent, this, keyValue, keyAction, "")); break; case "KEY_ESCAPE": if (keyAction == "KEY_RELEASE") { SpaceTaxiBus.GetBus().RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.GameStateEvent, this, "CHANGE_STATE", "GAME_PAUSED", "")); } break; } }
/// <summary> /// Handles the key events. For key up, key down and enter. /// </summary> /// <param name="keyValue">The given key pressed</param> /// <param name="keyAction">Registers if a certain button is pressed or released</param> public void HandleKeyEvent(string keyValue, string keyAction) { if (keyAction == "KEY_PRESS") { } switch (keyValue) { case "KEY_UP": SpaceBus.GetBus().RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.PlayerEvent, this, "BOOSTER_UPWARDS", "", "")); break; case "KEY_LEFT": SpaceBus.GetBus().RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.PlayerEvent, this, "BOOSTER_TO_LEFT", "", "")); break; case "KEY_RIGHT": SpaceBus.GetBus().RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.PlayerEvent, this, "BOOSTER_TO_RIGHT", "", "")); break; case "KEY_ESCAPE": SpaceBus.GetBus().RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.GameStateEvent, this, "GAME_PAUSED", "", "")); break; } if (keyAction == "KEY_RELEASE") { switch (keyValue) { case "KEY_LEFT": SpaceBus.GetBus().RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.PlayerEvent, this, "STOP_ACCELERATE_LEFT", "", "")); break; case "KEY_RIGHT": SpaceBus.GetBus().RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.PlayerEvent, this, "STOP_ACCELERATE_RIGHT", "", "")); break; case "KEY_UP": SpaceBus.GetBus().RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.PlayerEvent, this, "STOP_ACCELERATE_UP", "", "")); break; default: break; } } }
public void KeyPress(string key) { switch (key) { case "KEY_SPACE": playerShots.AddDynamicEntity( new DynamicShape(player.Entity.Shape.Position + new Vec2F(0.046f, 0.09f), new Vec2F(0.008f, 0.027f), new Vec2F(0.0f, 0.01f)), shotStride); break; case "KEY_RIGHT": player.MoveRight(); break; case "KEY_LEFT": player.MoveLeft(); break; case "KEY_ESCAPE": GalagaBus.GetBus().RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.GameStateEvent, this, "CHANGE_STATE", "GAME_PAUSED", "")); break; } }
public void KeyPress(string key) { switch (key) { case "KEY_RIGHT": GalagaBus.GetBus().RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.PlayerEvent, this, "MOVE_RIGHT", "", "")); break; case "KEY_LEFT": GalagaBus.GetBus().RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.PlayerEvent, this, "MOVE_LEFT", "", "")); break; case "KEY_SPACE": GalagaBus.GetBus().RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.PlayerEvent, this, "SHOOT", "", "")); break; case "KEY_ESCAPE": GalagaBus.GetBus().RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.GameStateEvent, this, "CHANGE_STATE", "GAME_PAUSED", "")); break; } }
public void KeyRelease(string key) { switch (key) { case "KEY_UP": _eventBus.RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.PlayerEvent, this, "STOP_ACCELERATE_UP", "", "")); break; case "KEY_LEFT": _eventBus.RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.PlayerEvent, this, "STOP_ACCELERATE_LEFT", "", "")); break; case "KEY_RIGHT": _eventBus.RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.PlayerEvent, this, "STOP_ACCELERATE_RIGHT", "", "")); break; case "KEY_P": _eventBus.RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.GameStateEvent, this, "GAME_PAUSED", "", "")); break; } }
public void KeyPress(string key) { switch (key) { case "KEY_ESCAPE": win.CloseWindow(); break; case "KEY_F12": Console.WriteLine("Saving screenshot"); win.SaveScreenShot(); break; case "KEY_UP": SpaceBus.GetBus().RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.PlayerEvent, this, "BOOSTER_UPWARDS", "", "")); break; case "KEY_LEFT": SpaceBus.GetBus().RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.PlayerEvent, this, "BOOSTER_TO_LEFT", "", "")); break; case "KEY_RIGHT": SpaceBus.GetBus().RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.PlayerEvent, this, "BOOSTER_TO_RIGHT", "", "")); break; } }
public void TestCreationOfEventForAllProcessorsToTest() { var res = GameEventFactory <object> .CreateGameEventForAllProcessors(GameEventType.ControlEvent, this, "test data", "param1", "param2"); Assert.That(res.To == null); }
public void HandleKeyEvent(string keyValue, string keyAction) { switch (keyAction) { case "KEY_PRESS": switch (keyValue) { case "KEY_ESCAPE": GalagaBus.GetBus().RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors(GameEventType.WindowEvent, this, "CLOSE_WINDOW", "", "")); break; case "KEY_H": GalagaBus.GetBus().RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors(GameEventType.MovementEvent, this, "MOVE_RIGHT", "", "")); break; case "KEY_L": GalagaBus.GetBus().RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors(GameEventType.MovementEvent, this, "MOVE_LEFT", "", "")); break; case "KEY_SPACE": playerShots.Add(new PlayerShot( new DynamicShape( new Vec2F(player.Entity.Shape.Position.X + 0.05f, player.Entity.Shape.Position.Y + 0.1f), new Vec2F(0.008f, 0.027f), new Vec2F(0.0f, 0.01f) ), bullet)); break; case "KEY_P": GalagaBus.GetBus().RegisterEvent(GameEventFactory <object> .CreateGameEventForAllProcessors(GameEventType.GameStateEvent, this, "CHANGE_STATE", "GAME_PAUSED", "")); break; } break; case "KEY_RELEASE": switch (keyValue) { case "KEY_H": GalagaBus.GetBus().RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors(GameEventType.MovementEvent, this, "MOVE_STOP", "", "")); break; case "KEY_L": GalagaBus.GetBus().RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors(GameEventType.MovementEvent, this, "MOVE_STOP", "", "")); break; } break; } }
public void HandleKeyEvent(string keyValue, string keyAction) { switch (keyValue) { case "KEY_Q": SpaceTaxiBus.GetBus().RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.WindowEvent, this, "CLOSE_WINDOW", "", "")); break; case "KEY_P": if (keyAction == "KEY_RELEASE") { SpaceTaxiBus.GetBus().RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.GameStateEvent, this, "GAME_RUNNING", "", "")); } break; case "KEY_N": SpaceTaxiBus.GetBus().RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.GameStateEvent, this, "NEW_GAME", "CHANGE_STATE", "")); break; } }
public void HandleKeyEvent(string keyValue, string keyAction) { switch (keyAction) { case "KEY_PRESS": switch (keyValue) { case "KEY_ESCAPE": eventBus.RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.WindowEvent, this, "CLOSE_WINDOW", "", "")); break; case "KEY_P": eventBus.RegisterEvent(GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.GameStateEvent, this, "CHANGE_STATE", "GAME_RUNNING", "")); break; } break; case "KEY_RELEASE": break; } }
public void KeyPress(string key) { switch (key) { case "KEY_ESCAPE": eventBus.RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.WindowEvent, this, "CLOSE_WINDOW", "", "")); break; case "KEY_A": KEY_A = true; player.direction(new Vec2F(-0.01f, 0.0f)); break; case "KEY_D": KEY_D = true; player.direction(new Vec2F(0.01f, 0.0f)); break; case "KEY_SPACE": player.shot(); break; } }
public void KeyRelease(string key) { switch (key) { case "KEY_ESCAPE": eventBus.RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.WindowEvent, this, "CLOSE_WINDOW", "", "")); break; case "KEY_A": if (KEY_D) { KeyPress("KEY_D"); KEY_A = false; break; } player.direction(new Vec2F(0.0f, 0.0f)); KEY_A = false; break; case "KEY_D": if (KEY_A) { KeyPress("KEY_A"); KEY_D = false; break; } player.direction(new Vec2F(0.0f, 0.0f)); KEY_D = false; break; } }
/// <summary> /// Method that updates all logic features, which could be gravity. /// </summary> public void UpdateGameLogic() { if (player.GetsShape().Position.Y >= 0.98f && GameRunning.levelCounter == levelInfo.Count - 1) { AddCash(); SpaceBus.GetBus().RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.GameStateEvent, this, "GAME_VICTORY", "", "")); } CheckGameOver(GameRunning.levelCounter); RenderState(); player.Physics(); AddCash(); foreach (Passenger passenger in levelPassengers[GameRunning.levelCounter]) { passenger.PassengerMove(); } levelCollisionCheckers[GameRunning.levelCounter].CheckCollsion(); timerHandlers[GameRunning.levelCounter].SpawnPassengerTimer(); timerHandlers[GameRunning.levelCounter].SetPickUpTimer(); CheckGameOver(GameRunning.levelCounter); if (player.GetsShape().Position.Y >= 1.0f) { GameRunning.levelCounter++; player.SetPosition(playerXcoordinates[GameRunning.levelCounter], playerYcoordinates[GameRunning.levelCounter]); } }
public void TestCreationOfEventForAllProcessorsInstanceTest() { var res = GameEventFactory <object> .CreateGameEventForAllProcessors(GameEventType.ControlEvent, this, "test data", "param1", "param2"); Assert.IsInstanceOf(typeof(GameEvent <object>), res); }
public void HandleKeyEvent(string keyValue, string keyAction) { if (keyAction == "KEY_RELEASE") { if (keyValue == "KEY_ENTER") { if (activeMenuButton == 0) { GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.GameStateEvent, this, "CHANGE_STATE", "GAME_RUNNING", ""); } else { GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.GameStateEvent, this, "CHANGE_STATE", "GAME_PAUSED", ""); } } } }
public void KeyRelease(string key) { switch (key) { case "KEY_UP": eventBus.RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.PlayerEvent, this, "KEY_UP", "KEY_RELEASE", "")); break; case "KEY_DOWN": eventBus.RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.PlayerEvent, this, "KEY_DOWN", "KEY_RELEASE", "")); break; case "KEY_LEFT": eventBus.RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.PlayerEvent, this, "KEY_LEFT", "KEY_RELEASE", "")); break; case "KEY_RIGHT": eventBus.RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.PlayerEvent, this, "KEY_RIGHT", "KEY_RELEASE", "")); break; default: break; } }
public void KeyPress(string key) { switch (key) { case "KEY_ESCAPE": eventBus.RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.WindowEvent, this, "CLOSE_WINDOW", "", "")); break; case "KEY_SPACE": playerShots.AddDynamicEntity( new DynamicShape(player.Entity.Shape.Position + new Vec2F(0.046f, 0.09f), new Vec2F(0.008f, 0.027f), new Vec2F(0.0f, 0.01f)), shotStride); break; case "KEY_RIGHT": player.MoveRight(); break; case "KEY_LEFT": player.MoveLeft(); break; } }
public void KeyRelease(string key) { switch (key) { case "KEY_LEFT": if (key.Equals("KEY_LEFT") || key.Equals("KEY_RIGHT")) { GalagaBus.GetBus().RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.PlayerEvent, this, "NO_MOVE", "", "")); } break; case "KEY_RIGHT": if (key.Equals("KEY_RIGHT") || key.Equals("KEY_LEFT")) { GalagaBus.GetBus().RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.PlayerEvent, this, "NO_MOVE", "", "")); } break; } }
public void HandleKeyEvent(string keyValue, string keyAction) { switch (keyAction) { case "KEY_PRESS": switch (keyValue) { case "KEY_ESCAPE": GalagaBus.GetBus().RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.GameStateEvent, this, "CHANGE_STATE", "GAME_PAUSED", "")); break; case "KEY_A": GalagaBus.GetBus().RegisterEvent( GameEventFactory <object> .CreateGameEventForSpecificProcessor( GameEventType.PlayerEvent, this, player, "move left", "", "")); break; case "KEY_D": GalagaBus.GetBus().RegisterEvent( GameEventFactory <object> .CreateGameEventForSpecificProcessor( GameEventType.PlayerEvent, this, player, "move right", "", "")); break; } break; } }
private void KeyPress(string key) { switch (key) { case "KEY_ESCAPE": eventBus.RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.WindowEvent, this, "CLOSE_WINDOW", "", "")); break; case "KEY_LEFT": eventBus.RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.PlayerEvent, this.player, "MOVE_LEFT", "", "")); break; case "KEY_RIGHT": eventBus.RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.PlayerEvent, this.player, "MOVE_RIGHT", "", "")); break; case "KEY_SPACE": eventBus.RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.PlayerEvent, this.player, "SHOOT", "", "")); break; default: break; } }
private void EnemyCollision(EntityContainer <Enemy> squadron) { squadron.Iterate(delegate(Enemy enemy) { if (CollisionDetection.Aabb(player.Shape.AsDynamicShape(), enemy.Shape).Collision) { enemy.DeleteEntity(); GalagaBus.GetBus().RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.PlayerEvent, this, "LOSE_LIFE", "", "")); } if (enemy.Shape.Position.Y + enemy.Shape.Extent.Y <= 0.0f) { enemy.DeleteEntity(); GalagaBus.GetBus().RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.PlayerEvent, this, "LOSE_LIFE", "", "")); } }); }
private void Collision() { foreach (Entity entity in paintBoard.Images) { switch (CollisionDetection.Aabb( (DynamicShape)player.Entity.Shape, entity.Shape).Collision) { case true: AddExplosion(player.Entity.Shape.Position, player.Entity.Shape.Extent); player.Entity.DeleteEntity(); break; } var newPlayerList = new List <Player>(); foreach (var player in playerList) { if (!player.Entity.IsDeleted()) { newPlayerList.Add(player); } if (player.Entity.IsDeleted()) { SpaceBus.GetBus().RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors (GameEventType.GameStateEvent, this, "CHANGE_STATE", "GAME_OVER", "")); } } playerList = newPlayerList; } }
public void HandleKeyEvent(string keyValue, string keyAction) { if (keyAction == "KEY_PRESS") { switch (keyValue) { case "KEY_UP": if (activeMenuButton > 0) { menuButtons[activeMenuButton].SetColor(new Vec3F(1.0f, 1.0f, 1.0f)); activeMenuButton--; menuButtons[activeMenuButton].SetColor(new Vec3F(0.0f, 1.0f, 0.0f)); } break; case "KEY_DOWN": if (activeMenuButton < maxMenuButtons - 1) { menuButtons[activeMenuButton].SetColor(new Vec3F(1.0f, 1.0f, 1.0f)); activeMenuButton++; menuButtons[activeMenuButton].SetColor(new Vec3F(0.0f, 1.0f, 0.0f)); } break; case "KEY_ENTER": switch (activeMenuButton) { case 1: TaxiBus.GetBus().RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.GameStateEvent, this, "CHANGE_STATE", "SELECT_LEVEL", "")); break; case 2: TaxiBus.GetBus().RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.WindowEvent, this, "CLOSE_WINDOW", "", "")); break; default: //GameRunning.NewInstance(); GameRunning.NewInstance(); TaxiBus.GetBus().RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.GameStateEvent, this, "CHANGE_STATE", "GAME_RUNNING", "")); break; } break; } } }
/// <summary> /// Handles the key events. For key up, key down and enter. /// </summary> /// <param name="keyValue">The given key pressed</param> /// <param name="keyAction">Registers if a certain button is pressed or released</param> public void HandleKeyEvent(string keyValue, string keyAction) { if (keyAction == "KEY_PRESS") { switch (keyValue) { case "KEY_UP": if (activeMenuButton == 0) { activeMenuButton = maxMenuButtons - 1; } else { activeMenuButton -= 1; } break; case "KEY_DOWN": if (activeMenuButton == maxMenuButtons - 1) { activeMenuButton = 0; } else { activeMenuButton += 1; } break; case "KEY_ENTER": switch (activeMenuButton) { case 0: GameRunning.ResetGameRunning(); GameLevels.Levelcount = 0; SpaceBus.GetBus().RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.GameStateEvent, this, "GAME_RUNNING", "", "")); break; case 1: SpaceBus.GetBus().RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.GameStateEvent, this, "MAIN_MENU", "", "")); break; default: break; } break; default: break; } } }
private void RegisterEvent(object sender, KeyboardKeyEventArgs e) { var keyAction = (e.Keyboard.IsKeyDown(e.Key)) ? "KEY_PRESS" : "KEY_RELEASE"; var newEvent = GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.InputEvent, this, Input.KeyTransformer.GetKeyString(e.Key), keyAction, ""); eventBus.RegisterEvent(newEvent); }
/// <summary> /// Handles the key events. Such as the key enter, sets the player back to main menu. /// </summary> /// <param name="keyValue">The given key pressed</param> /// <param name="keyAction">Registers if a certain button is pressed or released</param> public void HandleKeyEvent(string keyValue, string keyAction) { if (keyAction == "KEY_PRESS") { switch (keyValue) { case "KEY_UP": if (activeMenuButton == 0) { activeMenuButton = maxMenuButtons - 1; } else { activeMenuButton -= 1; } break; case "KEY_DOWN": if (activeMenuButton == maxMenuButtons - 1) { activeMenuButton = 0; } else { activeMenuButton += 1; } break; case "KEY_ENTER": switch (activeMenuButton) { case 0: GameRunning.ResetGameRunning(); SpaceBus.GetBus().RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.GameStateEvent, this, "GAME_LEVELS", "", "")); break; case 1: GameRunning.ResetGameRunning(); SpaceBus.GetBus().RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.GameStateEvent, this, "GAME_CONTROLS", "", "")); break; case 2: SpaceBus.GetBus().RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.WindowEvent, this, "CLOSE_WINDOW", "", "")); break; } break; } } }
public void RenderState() { player.RenderPlayer(); explosions.RenderAnimations(); if (!isOnPlatform) { currentVelocity = (gravity + player.thrust) * game.gameTimer.CapturedUpdates + currentVelocity; player.Entity.Shape.AsDynamicShape().ChangeDirection(new Vec2F(currentVelocity.X, currentVelocity.Y)); } if (!isOnPlatform) { player.Entity.Shape.Move(currentVelocity); } foreach (var obstacle in currentLevel.obstacles) { obstacle.RenderEntity(); } singletonScore.RenderScore(); if (first) { stopwatch = Stopwatch.StartNew(); first = false; } if (customer != null) { if (singletonTimer.stopwatch.Elapsed.Seconds > customer.droptime && customer != null) { singletonTimer.stopwatch.Reset(); ChoseLevel.GetInstance().Customer = null; //END GAME singletonScore.PointChanger("Reset"); SpaceTaxiBus.GetBus().RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.GameStateEvent, this, "CHANGE_STATE", "GAME_OVER", "")); } } //renders customers in current level foreach (var cus in currentLevel.cusList) { if (stopwatch.Elapsed.Seconds + (stopwatch.Elapsed.Minutes * 60) >= cus.spawntime) { if (!cus.entity.IsDeleted()) { cus.RenderCustomer(); } } } }
private void Quit() { GalagaBus.GetBus().RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.WindowEvent, this, "CLOSE_WINDOW", "", "")); }
private void NewGame() { GalagaBus.GetBus().RegisterEvent( GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.GameStateEvent, this, "CHANGE_STATE", "GAME_RUNNING", "")); }