Beispiel #1
0
        public void Load(ContentManager content)
        {
            playerTexture = content.Load <Texture2D>("player");
            playerAnimation.Load(content, "player", 1, 1);
            playerAnimation.Origin = new Vector2(playerTexture.Width / 2, playerTexture.Height / 2);
            playerSprite.Add(playerAnimation, playerTexture.Width / 2, playerTexture.Height / 2);
            playerSprite.Pause();

            crosshairTexture = content.Load <Texture2D>("crosshair");
            crosshairAnimation.Load(content, "crosshair", 1, 1);
            //crosshairAnimation.Origin = new Vector2(crosshairTexture.Width / 2, crosshairTexture.Height / 2);
            crosshair.Add(crosshairAnimation, 0, 0);
            crosshair.Pause();

            fireballTexture = (content.Load <Texture2D>("fireball"));

            dustParticle = content.Load <Texture2D>("dust");
            dustEmitter  = new Emitter(dustParticle, playerSprite.position);

            footstepSound         = content.Load <SoundEffect>("footstep");
            footstepSoundInstance = footstepSound.CreateInstance();

            fireballSound         = content.Load <SoundEffect>("fireballSound");
            fireballSoundInstance = fireballSound.CreateInstance();
        }
Beispiel #2
0
        public void Load(ContentManager content)
        {
            coin = content.Load <Texture2D>("coin");
            AnimatedTexture animation = new AnimatedTexture(Vector2.Zero, 0, 1, 1);

            animation.Load(content, "coin", 1, 1);
            animation.Origin = new Vector2(0, 0);
            coinSprite.Add(animation, -coin.Width / 2, -coin.Height / 2);
            coinSprite.Pause();
        }
Beispiel #3
0
        public void Load(ContentManager content)
        {
            zombie = content.Load <Texture2D>("zombie");

            zombieAnimation.Load(content, "zombie", 1, 1);

            zombieAnimation.Origin = new Vector2(zombie.Width / 2, zombie.Height / 2);

            zombieSprite.Add(zombieAnimation, zombie.Width / 2, zombie.Height / 2);
            zombieSprite.Pause();
        }
Beispiel #4
0
        public void Load(ContentManager content)
        {
            skeleton = content.Load <Texture2D>("skeleton");

            skeletonAnimation.Load(content, "skeleton", 1, 1);

            skeletonAnimation.Origin = new Vector2(skeleton.Width / 2, skeleton.Height / 2);

            skeletonSprite.Add(skeletonAnimation, skeleton.Width / 2, skeleton.Height / 2);
            skeletonSprite.Pause();
        }
Beispiel #5
0
        public void Load(ContentManager content)
        {
            fireParticle = content.Load <Texture2D>("fireball");

            fireballAnimation.Load(content, "fireball", 1, 1);

            fireballAnimation.Origin = new Vector2(texture.Width / 2, texture.Height / 2);

            fireballSprite.Add(fireballAnimation, 0, 0);
            fireballSprite.Pause();

            fireEmitter = new Emitter(fireParticle, new Vector2(10, 10));
        }
Beispiel #6
0
        public void Load(ContentManager content)
        {
            turret = content.Load <Texture2D>("turret");

            turretAnimation.Load(content, "turret", 1, 1);

            turretAnimation.Origin = new Vector2(turret.Width / 2, turret.Height / 2);

            turretSprite.Add(turretAnimation, turret.Width / 2, turret.Height / 2);
            turretSprite.Pause();

            bluefireballTexture = (content.Load <Texture2D>("fireball2"));

            fireballSound         = content.Load <SoundEffect>("fireballSound");
            fireballSoundInstance = fireballSound.CreateInstance();
        }