Ejemplo n.º 1
0
 public SharkLevelTwo(Texture2D tex, Vector2 centre, Vector2 pos, Rectangle sourceRect, Vector2 vel, geraldLevelTwo food) :
     base(tex, centre, pos, sourceRect, vel)
 {
     // Pass the player as a parameter so the shark can track the movement.
     this.food = food;
     health    = 100;
     weapon    = new sharkCannon();
     Velocity  = new Vector2(300, 0);
 }
Ejemplo n.º 2
0
 public SharkLevelTwo(Texture2D tex, Vector2 centre, Vector2 pos, Rectangle sourceRect, Vector2 vel, geraldLevelTwo food) :
     base(tex, centre, pos, sourceRect, vel)
 {
     // Pass the player as a parameter so the shark can track the movement.
     this.food = food;
     health = 100;
     weapon = new sharkCannon();
     Velocity = new Vector2(300, 0);
 }
Ejemplo n.º 3
0
        public override void LoadContent()
        {
            gameText = theGame.Content.Load <SpriteFont>("Fonts\\gameText");

            /* load textures */
            textureManager.Instance.LoadTexture("ink");
            textureManager.Instance.LoadTexture("laser");
            textureManager.Instance.LoadTexture("laserBeam");
            textureManager.Instance.LoadTexture("Gerald2");
            textureManager.Instance.LoadTexture("Squid");
            textureManager.Instance.LoadTexture("jellyfish");
            textureManager.Instance.LoadTexture("hermitcrab");
            textureManager.Instance.LoadTexture("chum");
            textureManager.Instance.LoadTexture("Bomb");
            textureManager.Instance.LoadTexture("explosion");
            textureManager.Instance.LoadTexture("shell");
            textureManager.Instance.LoadTexture("novaBall");
            textureManager.Instance.LoadTexture("sharkleveltwo");
            textureManager.Instance.LoadTexture("background");

            /* Load sound */
            soundManager.Instance.LoadSound("8bit-Space-Travel");
            soundManager.Instance.LoadSound("Laser_Shoot");
            soundManager.Instance.LoadSound("Hurt");
            soundManager.Instance.LoadSound("rocketShot");
            soundManager.Instance.LoadSound("inkShot");
            soundManager.Instance.LoadSound("novaShot");

            /* assign textures*/
            sharkTexture      = textureManager.Instance.useTexture("sharkleveltwo");
            squidTexture      = textureManager.Instance.useTexture("Squid");
            geraldTexture     = textureManager.Instance.useTexture("Gerald2");
            jellyTexture      = textureManager.Instance.useTexture("jellyfish");
            crabTexture       = textureManager.Instance.useTexture("hermitcrab");
            chumTexture       = textureManager.Instance.useTexture("chum");
            explosionTexture  = textureManager.Instance.useTexture("explosion");
            backgroundTexture = textureManager.Instance.useTexture("background");

            /* assign sound instances */
            ambience = soundManager.Instance.getInstance("8bit-Space-Travel");

            /* Add objects*/
            Gerald = new geraldLevelTwo(geraldTexture,
                                        new Vector2(geraldTexture.Width / 2, geraldTexture.Height / 2),
                                        new Vector2(350, 700),
                                        new Rectangle(0, 0, geraldTexture.Width, geraldTexture.Height),
                                        new Vector2(8, 0));
            levelCreatures.Add(Gerald);

            levelObjects.AddRange(levelCreatures);
        }
Ejemplo n.º 4
0
 public Chum(Texture2D tex, Vector2 centre, Vector2 pos, Rectangle sourceRect, geraldLevelTwo Gerald)
     : base(tex, centre, pos, sourceRect)
 {
     this.Gerald = Gerald;
     Velocity    = new Vector2(200, 200);
 }
Ejemplo n.º 5
0
 public Chum(Texture2D tex, Vector2 centre, Vector2 pos, Rectangle sourceRect, geraldLevelTwo Gerald)
     : base(tex, centre, pos, sourceRect)
 {
     this.Gerald = Gerald;
     Velocity = new Vector2(200, 200);
 }
Ejemplo n.º 6
0
        public override void LoadContent()
        {
            gameText = theGame.Content.Load<SpriteFont>("Fonts\\gameText");

            /* load textures */
            textureManager.Instance.LoadTexture("ink");
            textureManager.Instance.LoadTexture("laser");
            textureManager.Instance.LoadTexture("laserBeam");
            textureManager.Instance.LoadTexture("Gerald2");
            textureManager.Instance.LoadTexture("Squid");
            textureManager.Instance.LoadTexture("jellyfish");
            textureManager.Instance.LoadTexture("hermitcrab");
            textureManager.Instance.LoadTexture("chum");
            textureManager.Instance.LoadTexture("Bomb");
            textureManager.Instance.LoadTexture("explosion");
            textureManager.Instance.LoadTexture("shell");
            textureManager.Instance.LoadTexture("novaBall");
            textureManager.Instance.LoadTexture("sharkleveltwo");
            textureManager.Instance.LoadTexture("background");

            /* Load sound */
            soundManager.Instance.LoadSound("8bit-Space-Travel");
            soundManager.Instance.LoadSound("Laser_Shoot");
            soundManager.Instance.LoadSound("Hurt");
            soundManager.Instance.LoadSound("rocketShot");
            soundManager.Instance.LoadSound("inkShot");
            soundManager.Instance.LoadSound("novaShot");

            /* assign textures*/
            sharkTexture = textureManager.Instance.useTexture("sharkleveltwo");
            squidTexture = textureManager.Instance.useTexture("Squid");
            geraldTexture = textureManager.Instance.useTexture("Gerald2");
            jellyTexture = textureManager.Instance.useTexture("jellyfish");
            crabTexture = textureManager.Instance.useTexture("hermitcrab");
            chumTexture = textureManager.Instance.useTexture("chum");
            explosionTexture = textureManager.Instance.useTexture("explosion");
            backgroundTexture = textureManager.Instance.useTexture("background");

            /* assign sound instances */
            ambience = soundManager.Instance.getInstance("8bit-Space-Travel");

            /* Add objects*/
            Gerald = new geraldLevelTwo(geraldTexture,
                new Vector2(geraldTexture.Width / 2, geraldTexture.Height / 2),
                new Vector2(350, 700),
                new Rectangle(0, 0, geraldTexture.Width, geraldTexture.Height),
                new Vector2(8, 0));
            levelCreatures.Add(Gerald);

            levelObjects.AddRange(levelCreatures);
        }