Exemplo n.º 1
0
        private int runSpeed = -5; //how fast minion moves, and in which direction

        #endregion Fields

        #region Constructors

        public WalkingMinion(Player p,int spawnX, int spawnY)
            : base(p,spawnX,spawnY)
        {
            Image = ImageBank.walkingMinion[0];

            animationSpeed = 15;
        }
Exemplo n.º 2
0
 public Map(Player player)
 {
     //default constructor, takes player
     p = player;
     p.Map = this;
     movables = new List<Movable>();
 }
Exemplo n.º 3
0
        private int runSpeed = -5; //how fast minion moves, and in which direction

        #endregion Fields

        #region Constructors

        public LampMinion(Player p,int spawnX, int spawnY)
            : base(p,spawnX,spawnY)
        {
            Image = ImageBank.lampMinion[0];

            animationSpeed = 15;
        }
Exemplo n.º 4
0
        public InputWindow(Player p)
        {
            player = p;
            Image = ImageBank.square;
            col = Color.Black;

            Location = new Rectangle(50, 200, 700, 50);
        }
Exemplo n.º 5
0
 public Enemy(Player p, int x, int y)
 {
     faceLeft = true;
     Location = new Rectangle(x, y, 50, 55);
     spawnX = x;
     spawnY = y;
     player = p;
     health = 1;
 }
Exemplo n.º 6
0
        //constructor takes x&y spawn coords and a player
        public ShootingMinion(Player p,int spawnX, int spawnY)
            : base(p,spawnX,spawnY-=100)
        {
            //spawn coords offset since this minion is TALL

               Image = ImageBank.shootingMinion[0];
               Location = new Rectangle(spawnX, spawnY, 65, 104);
               faceLeft = false;
               bullet = new Projectile(0, 0, true);
               bullet.Active = false;

               bulletY = 10;
        }
Exemplo n.º 7
0
        public Boss(Player p, int x, int y)
            : base(p,x,y)
        {
            Location = new Rectangle(x, y, 185, 151);

            Image = ImageBank.bossIdle[0];
            health = BOSS_HEALTH;
            current = Enemystate.notSpawned;

            bulletImage = ImageBank.bossLaser[0];

            rand = new Random();
        }
Exemplo n.º 8
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            base.Initialize();

            //spawn a player and a wall here for testing purposes
            pausemessagething = new GameObject();
            pausemessagething.Location = new Rectangle(170, 100, 500, 200);
            pausemessagething.Image = ImageBank.pausemessage;

            player = new Player();

            textBox = new InputWindow(player);

            //set up winscreen
            winscreenpopup = new GameObject();
            winscreenpopup.Location = new Rectangle(170,100,500,400);
            winscreenpopup.Image = ImageBank.winscreen;

            //set up lose screen
            loosescreenpopup = new GameObject();
            loosescreenpopup.Location = new Rectangle(170, 100, 500, 400);
            loosescreenpopup.Image = ImageBank.looseScreen;

            //set up reset and continue buttons
            resetButton = new GameObject();
            resetButton.Location = new Rectangle(370,380,80,35);

            continueButton = new GameObject();
            continueButton.Location = new Rectangle(resetButton.Location.Right+0, 380, 80, 40);

            //load list of levels
               // levels.Add("testLevel");
              // /*
            levels.Add("levelOne");
            levels.Add("levelTwo");
            levels.Add("levelThree");
            levels.Add("levelFour");
            levels.Add("levelFive");
            levels.Add("levelSix");
            levels.Add("levelSeven");//*/
            levels.Add("bossLevel");

            //create new map
            map = new Map(player);
            map.Load(levels[0]);

            //load background, set it in place
            background = new GameObject();
            background.Location = new Rectangle(0, 0, 800, 600);
            background.Image = ImageBank.background;
        }