protected override void Initialize() { base.Initialize(); collisionManager = new CollisionManager(); projectileSpriteFactory = new ProjectileSpriteFactory(this); projectileHandler = new ProjectileHandler(this); link = new Classes.Link(this); linkStateMachine = new LinkStateMachine(link); link.SetState(linkStateMachine); hudSpriteFactory = new HudSpriteFactory(this); enemySpriteFactory = new EnemySpriteFactory(this); controllerList.Add(new CKeyboard(this)); controllerList.Add(new CMouse(this)); controllerList.Add(new ItemSelectionController(this)); neighbors = Parser.ParseNeighborCSV(); roomList = new List <Room>(); util.roomNumber = util.startingRoomNumber(); for (int i = 1; i < util.numberOfRooms() + 1; i++) { roomList.Add(Parser.ParseRoomCSV(this, i)); } foreach (Room r in roomList) { if (r.getRoomNumber() == util.roomNumber) { currentRoom = r; } } currentRoom.Initialize(); currentMainGameState = new MainState(this, currentRoom); currentGameState = currentMainGameState; MediaPlayer.Play(song); MediaPlayer.IsRepeating = true; }
public LinkBoomerangProjectile(Link link, LinkStateMachine linkState) { this.link = link; this.game = link.game; this.linkState = linkState; this.spriteFactory = linkState.spriteFactory; this.drawLocation = link.drawLocation; this.spawnLocation = link.drawLocation; this.spriteScalar = link.game.util.spriteScalar; this.myState = new LinkBoomerangStateMachine(this); }
public LinkIdle(Link link, LinkSpriteFactory spriteFactory, LinkStateMachine linkStateMachine) { this.link = link; this.spriteFactory = spriteFactory; this.linkStateMachine = linkStateMachine; }
public DamagedLink(LinkStateMachine linkState) { this.linkState = linkState; }
public SecondaryWeaponSelect(LinkStateMachine state, LinkStateMachine.Weapon weapon) { this.state = state; this.weapon = weapon; }
public IdleLink(LinkStateMachine linkState) { this.linkState = linkState; }
public SecondaryWeaponLink(LinkStateMachine linkState) { this.linkState = linkState; }
public ItemSelectionController(ZeldaGame game) { this.game = game; keyBinds.Add(0, new ShutDownGame(game)); linkState = game.linkStateMachine; }
public PortalGunLink(ZeldaGame game, LinkStateMachine linkState) { this.game = game; this.linkState = linkState; }
public PrimaryWeaponLink(LinkStateMachine linkState) { this.linkState = linkState; }
public RollLink(LinkStateMachine linkState) { this.linkState = linkState; }
public MoveLink(LinkStateMachine linkState, LinkStateMachine.Direction direction) { this.linkState = linkState; this.direction = direction; }