예제 #1
0
        public override void getEaten(Player thePlayer)
        {
            Explosion theExplosion = new Explosion(xPos, yPos, Game1.explosionTexture, false);
            Game1.explosions.Add(theExplosion);

            Game1.explosion.Play();
        }
예제 #2
0
파일: Trap.cs 프로젝트: DevinP/gamedesign
        public override void getEaten(Player thePlayer)
        {
            thePlayer.Health -= damageDone;

            Explosion theExplosion = new Explosion(xPos, yPos, explosionTexture, true);
            Game1.explosions.Add(theExplosion);

            Game1.explosion.Play();
        }
예제 #3
0
파일: Prey.cs 프로젝트: DevinP/gamedesign
 public abstract void getEaten(Player thePlayer);
예제 #4
0
파일: Animal.cs 프로젝트: DevinP/gamedesign
        public override void getEaten(Player thePlayer)
        {
            thePlayer.Meat += meatReward;

            Game1.chomp.Play();
        }
예제 #5
0
파일: Game1.cs 프로젝트: DevinP/gamedesign
        void startNewGame(bool nuxMode)
        {
            victory = false;

            //Add the wyrm head segment texture to the wyrm textures list
            List<Texture2D> wyrmTextures = new List<Texture2D>();

            if (!nuxMode)
                wyrmTextures.Add(t2dWyrmHead);
            else
                wyrmTextures.Add(Content.Load<Texture2D>(@"Textures\nux_head"));

            //Add on the wyrm segment textures
            //We want to subtract two from the total segments since the head and tail are not this texture
            //derp
            for (int i = 0; i < WYRMSEGS - 2; i++)
            {
                wyrmTextures.Add(t2dWyrmSeg);
            }

            //Lastly, add the wyrm tail texture
            wyrmTextures.Add(t2dWyrmTail);
            thePlayer = new Player(0, wyrmTextures, scoreFont, healthBase, health, stamina, regenBar);

            if (nuxMode)
                thePlayer.nuxMode = true;

            theBackground = new Background(t2dbackground, t2dforeground);

            prey = new List<Prey>();

            bullets = new List<Bullet>();
            explosions = new List<Explosion>();

            m_gameStarted = true;
            currWave = 1;

            levelPrey = new List<List<int>>();
            numWaves = 0;

            makeLevels();

            elapsedTimeGameEnd = 0;

            regenCost = DEFAULT_REGEN_COST;
            digSpeedCost = DEFAULT_DIGSPEED_COST;
            staminaCost = DEFAULT_STAMINA_COST;
            maxHealthCost = DEFAULT_MAXHEALTH_COST;

            startNewWave(currWave - 1);
        }