public StateMachine() { ActiveState = MainMenu.GetInstance(); _eventBus = SpaceTaxiBus.GetBus(); _eventBus.Subscribe(GameEventType.InputEvent, this); _eventBus.Subscribe(GameEventType.GameStateEvent, this); }
public Game() { // window win = new Window("Space Taxi Game v0.1", 800, AspectRatio.R1X1); // level class level = new LevelParser(); // event bus eventBus = new GameEventBus <object>(); eventBus.InitializeEventBus(new List <GameEventType>() { GameEventType.InputEvent, // key press / key release GameEventType.WindowEvent, // messages to the window, e.g. CloseWindow() GameEventType.PlayerEvent // commands issued to the player object, e.g. move, destroy, receive health, etc. }); win.RegisterEventBus(eventBus); // game timer gameTimer = new GameTimer(60); // 60 UPS, no FPS limit // game assets backGroundImage = new Entity( new StationaryShape(new Vec2F(0.0f, 0.0f), new Vec2F(1.0f, 1.0f)), new Image(Path.Combine("Assets", "Images", "SpaceBackground.png")) ); // event delegation eventBus.Subscribe(GameEventType.InputEvent, this); eventBus.Subscribe(GameEventType.WindowEvent, this); eventBus.Subscribe(GameEventType.PlayerEvent, level.Player); }
public Game() { // window win = new Window("Space Taxi Game v0.1", 500, AspectRatio.R1X1); // event bus eventBus = EventBus.GetBus(); eventBus.InitializeEventBus(new List <GameEventType> { GameEventType.GameStateEvent, GameEventType.InputEvent, // key press / key release GameEventType.WindowEvent, // messages to the window, e.g. CloseWindow() GameEventType.PlayerEvent // commands issued to the player object, e.g. move, // destroy, receive health, etc. }); win.RegisterEventBus(eventBus); // game timer gameTimer = new GameTimer(60); // 60 UPS, no FPS limit stateMachine = new StateMachine(); // event delegation eventBus.Subscribe(GameEventType.InputEvent, this); eventBus.Subscribe(GameEventType.WindowEvent, this); eventBus.Subscribe(GameEventType.PlayerEvent, this); }
public Game() { gameTimer = new GameTimer(60, 60); win = new Window("Galaca", 500, AspectRatio.R1X1); backGround = new Image(Path.Combine("Assets", "Images", "SpaceBackground.png")); player = new Player(); enemies = new EntityContainer(); enemyStrides = ImageStride.CreateStrides(4, Path.Combine("Assets", "Images", "BlueMonster.png")); AddEnemies(); playerShots = new EntityContainer(); shotStride = new Image(Path.Combine("Assets", "Images", "BulletRed2.png")); explosionStrides = ImageStride.CreateStrides(8, Path.Combine("Assets", "Images", "Explosion.png")); explosions = new AnimationContainer(4); eventBus = new GameEventBus <object>(); eventBus.InitializeEventBus(new List <GameEventType>() { GameEventType.InputEvent, GameEventType.WindowEvent, GameEventType.PlayerEvent }); win.RegisterEventBus(eventBus); eventBus.Subscribe(GameEventType.InputEvent, this); eventBus.Subscribe(GameEventType.WindowEvent, this); }
/// <summary> /// Constructor for Game class /// </summary> public Game() { win = new Window("Galaga", 500, 500); gameTimer = new GameTimer(60, 60); player = new Player(this, new DynamicShape(new Vec2F(0.45f, 0.1f), new Vec2F(0.1f, 0.1f)), new Image(Path.Combine("Assets", "Images", "Player.png"))); eventBus = new GameEventBus <object>(); eventBus.InitializeEventBus(new List <GameEventType> { GameEventType.InputEvent, // key press / key release GameEventType.WindowEvent // messages to the window }); win.RegisterEventBus(eventBus); eventBus.Subscribe(GameEventType.InputEvent, this); eventBus.Subscribe(GameEventType.WindowEvent, this); enemyStrides = ImageStride.CreateStrides(4, Path.Combine("Assets", "Images", "BlueMonster.png")); enemies = new List <Enemy>(); playerShots = new List <PlayerShot>(); playerShotImage = new Image( Path.Combine("Assets", "Images", "BulletRed2.png")); explosionStrides = ImageStride.CreateStrides(8, Path.Combine("Assets", "Images", "Explosion.png")); explosions = new AnimationContainer(4); score = new Score(new Vec2F(0.01f, -0.25f), new Vec2F(0.3f, 0.3f)); }
public Game() { win = new Window("test", 500, 500); score = new Score(new Vec2F(0.0f, 0.0f), new Vec2F(0.2f, 0.2f)); gameTimer = new GameTimer(60, 60); enemyStrides = ImageStride.CreateStrides(4, Path.Combine("Assets", "Images", "BlueMonster.png")); enemies = new List <Enemy>(); player = new Player(this, new DynamicShape(new Vec2F(0.45f, 0.1f), new Vec2F(0.1f, 0.1f)), new Image(Path.Combine("Assets", "Images", "Player.png"))); moveDown = new MoveDown(); noMove = new NoMove(); zigZagDown = new ZigZagDown(); createEnemiesLine = new CreateEnemiesLine(this, enemies); createEnemiesLine.CreateEnemies(enemyStrides); shotImages = new Image(Path.Combine("Assets", "Images", "BulletRed2.png")); playerShots = new List <PlayerShot>(); eventBus = new GameEventBus <object>(); eventBus.InitializeEventBus(new List <GameEventType>() { GameEventType.InputEvent, GameEventType.WindowEvent, GameEventType.PlayerEvent }); win.RegisterEventBus(eventBus); eventBus.Subscribe(GameEventType.InputEvent, this); eventBus.Subscribe(GameEventType.WindowEvent, this); eventBus.Subscribe(GameEventType.PlayerEvent, player); explosionStrides = ImageStride.CreateStrides(8, Path.Combine("Assets", "Images", "Explosion.png")); explosions = new AnimationContainer(20); }
public Game() { win = new Window("galaga", 500, 500); gameTimer = new DIKUArcade.Timers.GameTimer(60, 60); player = new Player( new DynamicShape(new Vec2F(0.45f, 0.1f), new Vec2F(0.1f, 0.1f)), new Image(Path.Combine("Assets", "Images", "Player.png"))); eventBus = new GameEventBus <object>(); eventBus.InitializeEventBus(new List <GameEventType>() { GameEventType.InputEvent, // key press / key release GameEventType.WindowEvent, // messages to the window }); win.RegisterEventBus(eventBus); eventBus.Subscribe(GameEventType.InputEvent, this); eventBus.Subscribe(GameEventType.WindowEvent, this); enemyStrides = ImageStride.CreateStrides(4, Path.Combine("Assets", "Images", "BlueMonster.png")); enemies = new List <Enemy>(); Enemy.addEnemies(new ImageStride(80, enemyStrides)); PlayerShots = new List <PlayerShot>(); score = new Score(new Vec2F(0.9f, 0.9f), new Vec2F(0.1f, 0.1f)); }
// // //Enemies // private List<ISquadron> squadronContainer; // //Squadrons // private Squad squad; // private Boss boss; // private Invasion invasion; // //Movement // private Down down; // // // //Player // private Player player; // //Timer // //Explosions // private List<Image> explosionStrides; // private AnimationContainer explosions; // private int explosionLength = 500; // public Game() { win = new Window("Galaga", 500, AspectRatio.R16X9); state = new StateMachine(); //Player // player = new Player(); // // //Enemies // squadronContainer = new List<ISquadron>(); // // //Squadrons // squad = new Squad(); // squad.CreateEnemies(ImageStride.CreateStrides(4, // Path.Combine("Assets", "Images", "BlueMonster.png"))); // // boss = new Boss(); // boss.CreateEnemies(ImageStride.CreateStrides(4, // Path.Combine("Assets", "Images", "BlueMonster.png"))); // invasion = new Invasion(); // invasion.CreateEnemies(ImageStride.CreateStrides(4, // Path.Combine("Assets", "Images", "BlueMonster.png"))); // //Add to enemies // squadronContainer.Add(squad); // squadronContainer.Add(boss); //// squadronContainer.Add(invasion); //Explosiom // explosionStrides = ImageStride.CreateStrides(8, // Path.Combine("Assets","Images","Explosion.png")); // // explosions = new AnimationContainer(10); // // //Movement // down = new Down(); //Eventbus eventBus = new GameEventBus <object>(); eventBus.InitializeEventBus(new List <GameEventType>() { GameEventType.InputEvent, // key press / key release GameEventType.WindowEvent, // messages to the window GameEventType.PlayerEvent // commands issued to the player object, }); // e.g. move, destroy, receive health, etc. win.RegisterEventBus(eventBus); eventBus.Subscribe(GameEventType.InputEvent, this); eventBus.Subscribe(GameEventType.WindowEvent, this); //Gametimer gameTimer = new GameTimer(60, 60); }
public TestGameEvent() { _sender = new TestGameEventSender(); _receiver1 = new TestGameEventReceiver(); _receiver2 = new TestGameEventReceiver(); _receiverGetSender = new TestGameEventReceiverGetSender(); _eventBus = new GameEventBus(); _eventBus.InitializeEventBus(new List <GameEventType> { GameEventType.GraphicsEvent }); // arbitrary event type _eventBus.Subscribe(GameEventType.GraphicsEvent, _receiver1); _eventBus.Subscribe(GameEventType.GraphicsEvent, _receiver2); }
public void SetupEventBusForTests() { _eb = new GameEventBus <object>(); _eb.InitializeEventBus(_registeredEvents); _simpleEventProcessor = new SimpleEventProcessor(); _eb.Subscribe(GameEventType.ControlEvent, _simpleEventProcessor); _eb.Subscribe(GameEventType.SoundEvent, _simpleEventProcessor); _eventControl = GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.ControlEvent, this, "Test1", "test", "test"); _eventSound = GameEventFactory <object> .CreateGameEventForAllProcessors( GameEventType.SoundEvent, this, "Test2", "test", "test"); }
public void InitializeGameState() { //Player player = new Player(); //Enemies squadronContainer = new List <ISquadron>(); //Squadrons squad = new Squad(); squad.CreateEnemies(ImageStride.CreateStrides(4, Path.Combine("Assets", "Images", "BlueMonster.png"))); boss = new Boss(); boss.CreateEnemies(ImageStride.CreateStrides(4, Path.Combine("Assets", "Images", "BlueMonster.png"))); //Add to enemies squadronContainer.Add(squad); squadronContainer.Add(boss); // squadronContainer.Add(invasion); explosionStrides = ImageStride.CreateStrides(8, Path.Combine("Assets", "Images", "Explosion.png")); explosions = new AnimationContainer(10); //Movement down = new Down(); eventBus = GalagaBus.GetBus(); eventBus.Subscribe(GameEventType.PlayerEvent, player); }
public Game() { win = new Window("Galaga", 500, AspectRatio.R1X1); eventBus = GalagaBus.GetBus(); eventBus.InitializeEventBus(new List <GameEventType>() { GameEventType.InputEvent, GameEventType.WindowEvent, GameEventType.PlayerEvent, GameEventType.GameStateEvent }); win.RegisterEventBus(eventBus); stateMachine = new StateMachine(); gameTimer = new GameTimer(60, 60); eventBus.Subscribe(GameEventType.InputEvent, this); eventBus.Subscribe(GameEventType.WindowEvent, this); }
public Game() { // window _win = new Window("Space Taxi Game v0.1", 500, AspectRatio.R1X1); // event bus _eventBus = new GameEventBus <object>(); _eventBus.InitializeEventBus(new List <GameEventType>() { GameEventType.InputEvent, // key press / key release GameEventType.WindowEvent, // messages to the window, e.g. CloseWindow() GameEventType.PlayerEvent // commands issued to the player object, e.g. move, destroy, receive health, etc. }); _win.RegisterEventBus(_eventBus); // game timer _gameTimer = new GameTimer(60); // 60 UPS, no FPS limit // game assets _backGroundImage = new Entity( new StationaryShape(new Vec2F(0.0f, 0.0f), new Vec2F(1.0f, 1.0f)), new Image(Path.Combine("Assets", "Images", "SpaceBackground.png")) ); _backGroundImage.RenderEntity(); //SplattStuff maps = MapMaker.MapMaker.Maps(new List <String>() { "short-n-sweet", "the-beach" }); maps[0].RenderEntities(); // game entities _player = new Player(); _player.SetPosition(0.45f, 0.6f); _player.SetExtent(0.1f, 0.1f); // event delegation _eventBus.Subscribe(GameEventType.InputEvent, this); _eventBus.Subscribe(GameEventType.WindowEvent, this); _eventBus.Subscribe(GameEventType.PlayerEvent, _player); }
public Game() { //Window and timer win = new Window("Arcade Game", 500, 500); gameTimer = new GameTimer(60, 60); //Player player = new Player(this, new DynamicShape(new Vec2F(0.45f, 0.1f), new Vec2F(0.1f, 0.1f)), new Image(Path.Combine("Assets", "Images", "Player.png"))); player.Move(); //Eventbus eventBus = new GameEventBus <object>(); eventBus.InitializeEventBus(new List <GameEventType>() { GameEventType.InputEvent, // key press / key release GameEventType.WindowEvent, // messages to the window }); win.RegisterEventBus(eventBus); eventBus.Subscribe(GameEventType.InputEvent, this); eventBus.Subscribe(GameEventType.WindowEvent, this); //Enemies enemyStrides = ImageStride.CreateStrides(4, Path.Combine("Assets", "Images", "BlueMonster.png")); enemies = new List <Enemy>(); AddEnemies(); //Shots playerShots = new List <PlayerShot>(); //Explosions explosionStrides = ImageStride.CreateStrides(8, Path.Combine("Assets", "Images", "Explosion.png")); explosions = new AnimationContainer(10); //Max element of monsters //Score score = new Score(new Vec2F(0.5f, 0.7f), new Vec2F(0.5f, 0.3f)); }
public ContainerTest() { bus = new GameEventBus <object>(); bus.InitializeEventBus(new List <GameEventType>() { GameEventType.TimedEvent }); container = new TimedEventContainer(5); container.AttachEventBus(bus); processor = new MockupEventProcessor(); bus.Subscribe(GameEventType.TimedEvent, processor); }
public TestTimedEvents() { _helper = new Helper(); _eventBus = new GameEventBus(); _eventBus.InitializeEventBus(new List <GameEventType> { GameEventType.TimedEvent, GameEventType.StatusEvent, GameEventType.MovementEvent }); _eventBus.Subscribe(GameEventType.TimedEvent, _helper); }
public TestTimedEventsT() { _helper = new Helper(); _eventBus = new GameEventBus <TestTimedEventT>(); _eventBus.InitializeEventBus(new List <TestTimedEventT> { TestTimedEventT.TimedEvent, TestTimedEventT.StatusEvent, TestTimedEventT.MovementEvent }); _eventBus.Subscribe(TestTimedEventT.TimedEvent, _helper); }
public TestTimedEvent(WindowArgs windowArgs) : base(windowArgs) { window.SetKeyEventHandler(KeyHandler); random = new Random(); eventBus = new GameEventBus(); eventBus.InitializeEventBus(new List <GameEventType> { GameEventType.TimedEvent }); eventBus.Subscribe(GameEventType.TimedEvent, this); }
public void TestConcurrentListeners(int numListeners) { _eb.RegisterEvent(_eventControl); _eb.RegisterEvent(_eventSound); _eb.RegisterEvent(_eventControl); List <SimpleEventProcessor> listOfProcessors = new List <SimpleEventProcessor>(); for (int iter = 0; iter < numListeners; iter++) { var processor = new SimpleEventProcessor(); listOfProcessors.Add(processor); _eb.Subscribe(GameEventType.ControlEvent, processor); _eb.Subscribe(GameEventType.SoundEvent, processor); } _eb.ProcessEvents(); Assert.That(_simpleEventProcessor.EventCounterControl == 2); Assert.That(_simpleEventProcessor.EventCounterSound == 1); foreach (var processor in listOfProcessors) { Assert.That(processor.EventCounterControl == 2); Assert.That(processor.EventCounterSound == 1); } }
public Player() { Entity = new Entity( new DynamicShape(new Vec2F(0.45f, 0.1f), new Vec2F(0.1f, 0.1f)), new Image(Path.Combine("Assets", "Images", "Player.png"))); eventBus = new GameEventBus <object>(); eventBus.InitializeEventBus(new List <GameEventType>() { GameEventType.PlayerEvent }); eventBus.Subscribe(GameEventType.PlayerEvent, this); }
public Game() { win = new Window("Galaga Game", 500, 500); enemyStrides = ImageStride.CreateStrides(4, Path.Combine("Assets", "Images", "BlueMonster.png")); enemies = new EntityContainer(); imageShot = new Image(Path.Combine("Assets", "Images", "BulletRed2.png")); playerShots = new EntityContainer(); explosionStrides = ImageStride.CreateStrides(8, Path.Combine("Assets", "Images", "Explosion.png")); explosions = new AnimationContainer(explosionLength); eventBus = new GameEventBus <object>(); eventBus.InitializeEventBus(new List <GameEventType>() { GameEventType.InputEvent, GameEventType.WindowEvent, GameEventType.PlayerEvent }); player = new Player(); AddEnemies(); win.RegisterEventBus(eventBus); eventBus.Subscribe(GameEventType.InputEvent, this); eventBus.Subscribe(GameEventType.WindowEvent, this); eventBus.Subscribe(GameEventType.PlayerEvent, player); gameTimer = new GameTimer(60, 60); }
//CLASS CONSTRUCTOR public Game() { win = new Window("Galaga", 500, 500); gameTimer = new GameTimer(60, 60); player = new Player( new DynamicShape(new Vec2F(0.45f, 0.1f), new Vec2F(0.1f, 0.1f)), new Image(Path.Combine("Assets", "Images", "Player.png")), this); eventBus = new GameEventBus <object>(); //3.3 eventBus.InitializeEventBus(new List <GameEventType>() { GameEventType.InputEvent, // key press / key release GameEventType.WindowEvent, // messages to the window GameEventType.PlayerEvent, }); win.RegisterEventBus(eventBus); eventBus.Subscribe(GameEventType.InputEvent, this); eventBus.Subscribe(GameEventType.WindowEvent, this); eventBus.Subscribe(GameEventType.PlayerEvent, this.player); // Creating enemies enemyStrides = ImageStride.CreateStrides(4, Path.Combine("Assets", "Images", "BlueMonster.png")); enemies = AddEnemies(); // Shots playerShots = new List <PlayerShot>(); // Explosion explosionStrides = ImageStride.CreateStrides(8, Path.Combine("Assets", "Images", "Explosion.png")); explosions = new AnimationContainer(300); // Scoreboard score = new Score(new Vec2F(0.05F, -0.25F), new Vec2F(0.3F, 0.3F)); }
public Game() { // window _win = new Window("Space Taxi Game v0.1", 1000, AspectRatio.R4X3); // event bus _eventBus = SpaceTaxiBus.GetBus(); _eventBus.InitializeEventBus(new List <GameEventType>() { GameEventType.GameStateEvent, // control state event GameEventType.InputEvent, // key press / key release GameEventType.WindowEvent, // messages to the window, e.g. CloseWindow() GameEventType.PlayerEvent // commands issued to the player object, e.g. move, destroy, receive health, etc. }); _win.RegisterEventBus(_eventBus); // game timer Game.ScreenTimer = SpaceTimer.GetTimer; // game assets _backGroundImage = new Entity( new StationaryShape(new Vec2F(0.0f, 0.0f), new Vec2F(1.0f, 1.0f)), new Image(Path.Combine("Assets", "Images", "SpaceBackground.png")) ); _backGroundImage.RenderEntity(); // game entities _taxi = Player.GetInstance(); // event delegation _eventBus.Subscribe(GameEventType.WindowEvent, this); _eventBus.Subscribe(GameEventType.PlayerEvent, _taxi); StateMachine = new StateMachine(); }
public void SetupEventBusForTests() { _eb = new GameEventBus(); _eb.InitializeEventBus(_registeredEvents); _simpleEventProcessor = new SimpleEventProcessor(); _eb.Subscribe(GameEventType.ControlEvent, _simpleEventProcessor); _eb.Subscribe(GameEventType.SoundEvent, _simpleEventProcessor); _eventControl = new GameEvent { EventType = GameEventType.ControlEvent, From = this, Message = "Test2", StringArg1 = "test", StringArg2 = "test" }; _eventSound = new GameEvent { EventType = GameEventType.SoundEvent, From = this, Message = "Test2", StringArg1 = "test", StringArg2 = "test" }; }
public Game() { win = new Window("Mad man", 500, 500); gameTimer = new GameTimer(60, 60); score = new Score(new Vec2F(0.05f, 0.8f), new Vec2F(0.2f, 0.2f)); gameState = GameState.GamePlaying; GameOverDisPlay = new GameOverDisPlay(); player = new Player( new DynamicShape(new Vec2F(0.45f, 0.1f), new Vec2F(0.1f, 0.1f)), new Image(System.IO.Path.Combine("Assets", "Images", "Player.png")), this); enemyStrides = ImageStride.CreateStrides(4, System.IO.Path.Combine("Assets", "Images", "BlueMonster.png")); enemies = new EntityContainer <Enemy>(); AddEnemies(new Squadron.Formation(6)); currentMoveStrategy = new MovementStrategies.NoMove(); playerShots = new EntityContainer <PlayerShot>(); explosionStrides = ImageStride.CreateStrides(8, System.IO.Path.Combine("Assets", "Images", "Explosion.png")); explosions = new AnimationContainer(8); eventBus = new GameEventBus <object>(); eventBus.InitializeEventBus(new List <GameEventType>() { GameEventType.InputEvent, GameEventType.WindowEvent, GameEventType.PlayerEvent, }); win.RegisterEventBus(eventBus); eventBus.Subscribe(GameEventType.InputEvent, this); eventBus.Subscribe(GameEventType.WindowEvent, this); eventBus.Subscribe(GameEventType.PlayerEvent, player); }
public Game() { win = new Window("Galaga", 500, AspectRatio.R16X9); player = new Player(); enemies = new EntityContainer(); projtIteratorMethod = ProjectileIterator; destoryIterator = DestoryIterator; enemyStrides = new ImageStride(80, ImageStride.CreateStrides(4, Path.Combine("Assets", "Images", "BlueMonster.png"))); explosionStrides = ImageStride.CreateStrides(8, Path.Combine("Assets", "Images", "Explosion.png")); explosions = new AnimationContainer(10); AddEnemies(); eventBus = new GameEventBus <object>(); eventBus.InitializeEventBus(new List <GameEventType>() { GameEventType.InputEvent, // key press / key release GameEventType.WindowEvent, // messages to the window GameEventType.PlayerEvent // commands issued to the player object, }); // e.g. move, destroy, receive health, etc. win.RegisterEventBus(eventBus); eventBus.Subscribe(GameEventType.InputEvent, this); eventBus.Subscribe(GameEventType.WindowEvent, this); eventBus.Subscribe(GameEventType.PlayerEvent, player); gameTimer = new GameTimer(60, 60); }
public TestEventBusInputEvents() { win = new Window("TestEventBusInputEvents", 500, AspectRatio.R1X1); win.SetClearColor(Color.ForestGreen); // just listen to input events for now bus = new GameEventBus <object>(); bus.InitializeEventBus(new List <GameEventType>() { GameEventType.InputEvent }); bus.Subscribe(GameEventType.InputEvent, this); win.RegisterEventBus(bus); }
/// <summary> /// Constructor for Game class /// </summary> public Game() { win = new Window("Galaga", 500, 500); gameTimer = new GameTimer(60, 60); eventBus = GalagaBus.GetBus(); eventBus.InitializeEventBus(new List <GameEventType> { GameEventType.InputEvent, // key press / key release GameEventType.WindowEvent, // messages to the window GameEventType.PlayerEvent, GameEventType.GameStateEvent }); win.RegisterEventBus(eventBus); eventBus.Subscribe(GameEventType.WindowEvent, this); stateMachine = new StateMachine(); }
public TestAabbCollision() { win = new Window("TestAabbCollision", 500, AspectRatio.R1X1); win.SetClearColor(System.Drawing.Color.Black); // just listen to input events for now bus = new GameEventBus <object>(); bus.InitializeEventBus(new List <GameEventType>() { GameEventType.InputEvent }); bus.Subscribe(GameEventType.InputEvent, this); win.RegisterEventBus(bus); player = new Entity(new DynamicShape(new Vec2F(0.5f, 0.5f), new Vec2F(0.1f, 0.1f)), new Image("Taxi.png")); wall = new Entity(new StationaryShape(new Vec2F(0.25f, 0.5f), new Vec2F(0.15f, 0.15f)), new Image("wall.jpeg")); }
/// <summary> /// Initialize level properties /// </summary> public void InitializeLevel() { spaceTaxibus = SpaceTaxiBus.GetBus(); spaceTaxibus.Subscribe(GameEventType.TimedEvent, this); levelManager = LevelManager.GetInstance(); //setting text sizes scoreText = new Text("", new Vec2F(0.43f, -0.26f), new Vec2F(Constants.EXTENT_X * 17, Constants.EXTENT_Y * 14)); customerDestination = new Text("", new Vec2F(0.37f, -0.30f), new Vec2F(Constants.EXTENT_X * 17, Constants.EXTENT_Y * 14)); scoreText.SetFontSize(23); scoreText.SetColor(new Vec3I(255, 255, 255)); customerDestination.SetFontSize(23); customerDestination.SetColor(new Vec3I(255, 255, 255)); background = new Entity( new StationaryShape(0.0f, 0.0f, 1f, 1f), ImageContainer.GetInstance().GetImageByName("SpaceBackground.png")); PlayerScore = 0; }