예제 #1
0
        public Player(Texture2D inTexture, Vector2 position, Texture2D inProjectiles, Sounds sounds)
        {
            texture     = inTexture;
            X           = (int)position.X;
            Y           = (int)position.Y;
            Rupees      = 25;
            attack      = false;
            projectiles = inProjectiles;
            state       = new LeftMovingPlayerState(texture, new Vector2(X, Y), this, inProjectiles);
            AttackCount = 0;
            Map         = false;
            Compass     = false;

            ObtainItem("Bomb");
            ObtainItem("Bomb");
            ObtainItem("Arrow");

            SelectItem(0);

            health = maxHealth;
            sound1 = sounds;
        }
예제 #2
0
        public GameManager(Game1 game, Dictionary <String, Texture2D> spriteSheet, SpriteFont font, SpriteFont header, Sounds sounds)
        {
            this.game = game;
            sprites   = spriteSheet;
            state     = GameState.PLAYING;

            //load room 17 first

            sound = sounds;

            roomLoad = new RoomLoader(sprites);
            rooms.Add("Room17", roomLoad.Load("Room17.txt"));
            roomKey = "Room17";

            player     = new Player(spriteSheet["playersheet"], new Vector2(500, 200), spriteSheet["PlayerProjectiles"], sound);
            hud        = new HUD(spriteSheet["hudSheet"], font);
            itemScreen = new ItemSelectionScreen(spriteSheet["ItemSelection"]);
            pause      = new PauseScreen(spriteSheet["MenuScreens"], font, header);
            gameOver   = new GameOverScreen(spriteSheet["MenuScreens"], font, header);
            win        = new WinScreen(spriteSheet["MenuScreens"]);


            EPCol = new EnemyProjectileCollisionHandler(this);
        }