public ProjectileSpriteFactory(ZeldaGame game)
 {
     this.game = game;
     game.spriteSheets.TryGetValue("Bosses", out bossSpriteSheet);
     game.spriteSheets.TryGetValue("DungeonEnemies", out enemySpriteSheet);
     game.spriteSheets.TryGetValue("Link", out linkSpriteSheet);
 }
Exemplo n.º 2
0
 public ModeSelectWorld(ZeldaGame game, SpriteBatch spriteBatch)
 {
     _spriteBatch        = spriteBatch;
     _mainMenu           = new MainMenu(game);
     _controllerKeyboard = new MainMenuControllerKeyboard(_mainMenu);
     MusicManager.Instance.PlayIntroMusic();
 }
 public RedeadSpriteFactory(ZeldaGame game)
 {
     this.redead = new RedeadHelper();
     this.game   = game;
     game.spriteSheets.TryGetValue("DungeonEnemies", out enemySpriteSheet);
     game.spriteSheets.TryGetValue("Link", out linkSpriteSheet);
 }
Exemplo n.º 4
0
 public WallmasterSpriteFactory(ZeldaGame game)
 {
     this.wallmaster = new WallmasterHelper();
     this.game       = game;
     game.spriteSheets.TryGetValue("DungeonEnemies", out enemySpriteSheet);
     game.spriteSheets.TryGetValue("Link", out linkSpriteSheet);
 }
 public BladeTrapSpriteFactory(ZeldaGame game)
 {
     this.game      = game;
     this.bladetrap = new BladeTrapHelper();
     game.spriteSheets.TryGetValue("DungeonEnemies", out enemySpriteSheet);
     game.spriteSheets.TryGetValue("Link", out linkSpriteSheet);
 }
 public KeeseSpriteFactory(ZeldaGame game)
 {
     this.keese = new KeeseHelper();
     this.game  = game;
     game.spriteSheets.TryGetValue("DungeonEnemies", out enemySpriteSheet);
     game.spriteSheets.TryGetValue("Link", out linkSpriteSheet);
 }
 public AquamentusSpriteFactory(ZeldaGame game)
 {
     this.aquamentus = new AquamentusHelper();
     this.game       = game;
     game.spriteSheets.TryGetValue("Bosses", out bossSpriteSheet);
     game.spriteSheets.TryGetValue("Link", out linkSpriteSheet);
 }
Exemplo n.º 8
0
 public LinkOnTile(Link link, ITile tile, Collision.Collision.Direction direction)
 {
     this.game      = link.game;
     this.link      = link;
     this.tile      = tile;
     this.direction = direction;
 }
Exemplo n.º 9
0
        public Background(ZeldaGame game, int roomNumber)
        {
            this.roomNumber = roomNumber;
            this.game       = game;
            RoomTextureStorage roomTextures = new RoomTextureStorage(this.game);

            game.spriteSheets.TryGetValue("DungeonTileset", out itemSpriteSheet);

            windowWidth  = game.GraphicsDevice.Viewport.Width;
            windowHeight = game.GraphicsDevice.Viewport.Height;

            int windowHeightFloor = ((windowHeight / ParserUtility.SCALE_FACTOR - ParserUtility.WINDOW_X_ADJUST / ParserUtility.SCALE_FACTOR) / ParserUtility.GEN_ADJUST) + ParserUtility.GAME_FRAME_ADJUST;
            int windowWidthFloor  = (windowWidth / ParserUtility.SCALE_FACTOR - ParserUtility.WINDOW_Y_ADJUST / ParserUtility.SCALE_FACTOR) / ParserUtility.GEN_ADJUST;

            drawLocationInterior = new Vector2(windowWidthFloor + storage.drawOffset, windowHeightFloor + storage.drawOffset);
            drawLocationExterior = new Vector2(windowWidthFloor, windowHeightFloor);

            roominterior = roomTextures.getRoom(roomNumber);
            if (roomNumber == storage.specialRoomNumber)
            {
                roomexterior = new UniversalSprite(game, itemSpriteSheet, storage.ROOM_RECTANGLE, Color.White, SpriteEffects.None, Vector2.One, storage.roomLimiter, storage.LAYERDEPTH);
                roominterior = new UniversalSprite(game, itemSpriteSheet, storage.ROOM_RECTANGLE, Color.Transparent, SpriteEffects.None, Vector2.One, storage.roomLimiter, storage.LAYERDEPTH);
            }
            else
            {
                roomexterior = new UniversalSprite(game, itemSpriteSheet, storage.ROOM_EXTERIOR_RECTANGLE, Color.White, SpriteEffects.None, Vector2.One, storage.roomLimiter, storage.LAYERDEPTH);
            }
        }
Exemplo n.º 10
0
 public DeathState(ZeldaGame game)
 {
     this.game = game;
     game.spriteSheets.TryGetValue("GameOver", out gameOverSpriteSheet);
     texture = new UniversalSprite(game, gameOverSpriteSheet, new Rectangle(36, 126, WIDTH, HEIGHT), Color.White, SpriteEffects.None, new Vector2(1, 1), 10, itemDepth);
     this.game.link.drawLocation = new Vector2(this.game.GraphicsDevice.Viewport.Width / 2, this.game.GraphicsDevice.Viewport.Height / 2 + ParserUtility.GAME_FRAME_ADJUST);
 }
Exemplo n.º 11
0
 public GoriyaSpriteFactory(ZeldaGame game)
 {
     this.goriya = new GoriyaHelper();
     this.game   = game;
     game.spriteSheets.TryGetValue("DungeonEnemies", out enemySpriteSheet);
     game.spriteSheets.TryGetValue("Link", out linkSpriteSheet);
 }
Exemplo n.º 12
0
 public StalfosSpriteFactory(ZeldaGame game)
 {
     this.stalfos = new StalfosHelper();
     this.game    = game;
     game.spriteSheets.TryGetValue("DungeonEnemies", out enemySpriteSheet);
     game.spriteSheets.TryGetValue("Link", out linkSpriteSheet);
 }
Exemplo n.º 13
0
 public RoshiStateMachineHelper(EnemyRoshi roshi, RoshiStateMachine roshiState)
 {
     this.game       = roshi.game;
     this.roshi      = roshi;
     this.roshiState = roshiState;
     spriteFactory   = new RoshiSpriteFactory(game);
 }
Exemplo n.º 14
0
 public WinState(ZeldaGame game)
 {
     this.game  = game;
     position.X = game.link.drawLocation.X + (3 * game.link.spriteScalar);
     position.Y = game.link.drawLocation.Y - (10 * game.link.spriteScalar);
     triforce   = new Triforce(this.game, new ItemSpriteFactory(this.game), position);
 }
Exemplo n.º 15
0
 public RoomTextureStorage(ZeldaGame game)
 {
     this.game = game;
     game.spriteSheets.TryGetValue("DungeonBackgrounds", out roomSpriteSheet);
     game.spriteSheets.TryGetValue("DungeonTileset", out tileSpriteSheet);
     game.spriteSheets.TryGetValue("ItemsAndWeapons", out itemSpriteSheet);
     game.spriteSheets.TryGetValue("Link", out portalSpriteSheet);
 }
Exemplo n.º 16
0
 public WallTile(ZeldaGame game, TileSpriteFactory tileFactory, Vector2 location)
 {
     this.game         = game;
     this.position     = location;
     this.tileFactory  = tileFactory;
     this.tileSprite   = tileFactory.WallTile();
     this.spriteScalar = game.util.spriteScalar;
 }
Exemplo n.º 17
0
 public Link(ZeldaGame game)
 {
     helper            = new LinkHelper();
     this.Y_ADJUST     = (game.GraphicsDevice.Viewport.Bounds.Height / 4) - 2 * CENTER;
     this.game         = game;
     this.spriteScalar = game.util.spriteScalar;
     drawLocation      = new Vector2((game.GraphicsDevice.Viewport.Bounds.Width / 2) - CENTER, (game.GraphicsDevice.Viewport.Bounds.Height / 2) + Y_ADJUST);
 }
Exemplo n.º 18
0
 public LittleHelper(ZeldaGame game)
 {
     this.game         = game;
     this.spriteScalar = game.util.spriteScalar;
     drawLocation      = new Vector2(Mouse.GetState().X, Mouse.GetState().Y);
     this.myState      = new LittleHelperStateMachine(this);
     game.collisionManager.collisionEntities.Add(this, this.CollisionRectangle());
 }
Exemplo n.º 19
0
 public EventTile(ZeldaGame game, TileSpriteFactory tileFactory, Vector2 location)
 {
     this.game         = game;
     this.position     = location;
     this.tileFactory  = tileFactory;
     this.tileSprite   = tileFactory.BlockTile();
     this.spriteScalar = game.util.spriteScalar;
     this.used         = false;
 }
Exemplo n.º 20
0
 public FogOfWar(ZeldaGame game)
 {
     this.game             = game;
     this.spriteScalar     = game.util.spriteScalar;
     drawLocation.X        = game.link.drawLocation.X + (game.link.spriteSize.X / 2) - (spriteSize.X / 2);
     drawLocation.Y        = game.link.drawLocation.Y + (game.link.spriteSize.Y / 2) - (spriteSize.Y / 2);
     fogOfWarSpriteFactory = new FogOfWarSpriteFactory(this);
     mySprite = fogOfWarSpriteFactory.FogOfWar();
 }
Exemplo n.º 21
0
 public PushableTile(ZeldaGame game, TileSpriteFactory tileFactory, Vector2 location)
 {
     this.game         = game;
     this.drawLocation = location;
     this.tileFactory  = tileFactory;
     this.tileSprite   = tileFactory.PushableTile();
     this.spriteScalar = game.util.spriteScalar;
     this.pushed       = false;
 }
Exemplo n.º 22
0
 public Bomb(ZeldaGame game, Vector2 drawLocation, ProjectileHandler projectileHandler)
 {
     this.game                    = game;
     this.spriteScalar            = game.util.spriteScalar;
     this.projectileSpriteFactory = game.projectileSpriteFactory;
     this.drawLocation            = drawLocation;
     this.projectileHandler       = projectileHandler;
     myState = new BombStateMachine(this);
 }
Exemplo n.º 23
0
 public Fairy(ZeldaGame game, ItemSpriteFactory itemFactory, Vector2 location)
 {
     this.game         = game;
     this.spriteScalar = game.util.spriteScalar;
     this.position     = location;
     this.itemFactory  = itemFactory;
     this.itemSprite   = itemFactory.Fairy();
     game.collisionManager.collisionEntities.Add(this, CollisionRectangle());
 }
Exemplo n.º 24
0
 public HeartContainer(ZeldaGame game, ItemSpriteFactory itemFactory, Vector2 location)
 {
     this.game         = game;
     this.spriteScalar = game.util.spriteScalar;
     this.position     = location;
     this.itemFactory  = itemFactory;
     this.itemSprite   = itemFactory.HeartContainer();
     game.collisionManager.collisionEntities.Add(this, hitbox);
 }
Exemplo n.º 25
0
 public Kamehameha(ZeldaGame game, EnemyRoshi roshi, RoshiStateMachine roshiState)
 {
     this.game          = game;
     this.roshi         = roshi;
     this.roshiState    = roshiState;
     this.spriteFactory = roshi.spriteFactory;
     this.drawLocation  = Vector2.Add(roshi.drawLocation, new Vector2(40 * 3, -24 * 3));
     this.spriteScalar  = game.util.spriteScalar;
 }
Exemplo n.º 26
0
 public Arrow(ZeldaGame game, Vector2 drawLocation, ProjectileHandler projectileHandler, Direction direction)
 {
     this.game                    = game;
     this.spriteScalar            = game.util.spriteScalar;
     this.projectileSpriteFactory = game.projectileSpriteFactory;
     this.drawLocation            = drawLocation;
     this.projectileHandler       = projectileHandler;
     this.direction               = direction;
     myState = new ArrowStateMachine(this);
 }
Exemplo n.º 27
0
 public EnemyBladeTrap(ZeldaGame game, Vector2 spawnLocation, Vector2 range, Link link)
 {
     this.game          = game;
     this.spawnLocation = spawnLocation;
     this.range         = range;
     drawLocation       = spawnLocation;
     myState            = new BladeTrapStateMachine(this, link);
     this.spriteScalar  = game.util.spriteScalar;
     game.collisionManager.collisionEntities.Add(this, CollisionRectangle());
 }
Exemplo n.º 28
0
 public GateKeeperTile(ZeldaGame game, TileSpriteFactory tileFactory, Vector2 location, Boolean locked, Boolean isLockedDoor, Boolean isPortal)
 {
     this.game         = game;
     this.position     = location;
     this.tileFactory  = tileFactory;
     this.tileSprite   = tileFactory.GatekeeperTile();
     this.spriteScalar = game.util.spriteScalar;
     this.locked       = locked;
     this.isLockedDoor = isLockedDoor;
     this.isPortal     = isPortal;
 }
Exemplo n.º 29
0
 public EnemyRedead(ZeldaGame game, Vector2 spawnLocation)
 {
     this.game               = game;
     this.spriteScalar       = game.util.spriteScalar;
     this.enemySpriteFactory = new RedeadSpriteFactory(game);
     this.mySprite           = this.enemySpriteFactory.RedeadIdle();
     drawLocation            = spawnLocation;
     myState = new RedeadStateMachine(this);
     game.collisionManager.collisionEntities.Add(this, this.CollisionRectangle());
     health = health * game.util.difficultyMult;
 }
Exemplo n.º 30
0
 public Fireball(ZeldaGame game, EnemyAquamentus aquamentus, AquamentusStateMachine aquamentusState, Vector2 trajectory)
 {
     this.game            = game;
     this.aquamentus      = aquamentus;
     this.aquamentusState = aquamentusState;
     this.spriteFactory   = game.enemySpriteFactory;
     this.drawLocation    = aquamentus.drawLocation;
     this.myState         = new FireballStateMachine(this);
     this.spriteScalar    = game.util.spriteScalar;
     this.trajectory      = trajectory;
 }