Esempio n. 1
0
        public Bullet(Map map, Vector2 loc, Game1.Directions dir, Game1.Aspects asp)
        {
            currentMap = map;
            location = loc;
            moveDir = dir;
            aspect = asp;
            inert = false;

            texture = new Rectangle(0, (int)asp * 6, 6, 6);
        }
Esempio n. 2
0
        public Player(Texture2D texture, Vector2 loc, Map map)
        {
            currentMap = map;

            Texture = texture;
            location = loc;
            currentFrame = 0;
            stallCount = 0;

            faceDir = Game1.Directions.Down;
            moving = false;

            aspect = Game1.Aspects.Blue;
        }
Esempio n. 3
0
        public Enemy(EnemyDef ident, Vector2 loc, Map map, GameScreen screen, Game1.Aspects aspect = Game1.Aspects.None)
        {
            this.identity = ident;
            this.location = loc;
            this.currentMap = map;
            this.currentScreen = screen;

            this.faceDir = Game1.Directions.Down;
            this.currentFrame = 0;
            this.stallCount = 0;

            if (aspect == Game1.Aspects.None)
                this.aspect = (Game1.Aspects)r.Next(0, 3);
            else
                this.aspect = aspect;
        }
Esempio n. 4
0
        void loadNewLevel()
        {
            LevelDef level = Level.getLevel(currentLevel, this);

            if (currentLevel > Level.levelMax)
            {
                game.YouWin();
                return;
            }

            this.enemyList = level.enemyList;
            this.currentMap = level.levelMap;
            this.bulletList = new List<Bullet>();

            // Load in player
            player = new Player(Game1.texCollection.texNadine, new Vector2(400, 200), currentMap);

            runState = GameState.FadeIn;
            animCount = 50;
        }