public Player(Vec2F position, Vec2F extent) { player = new Entity( new DynamicShape(position, extent), new Image(Path.Combine("Assets", "Images", "Player.png"))); GalagaBus.GetBus().Subscribe(GameEventType.PlayerEvent, this); }
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); }