Esempio n. 1
0
 public void Initialize(Animation anim, int timeOflife, SoundEffect sound)
 {
     this.EffectAnimation = anim;
     this.TimeOfLiving = timeOflife;
     VisualEffectSound = sound;
     Alive = true;
     if (VisualEffectSound != null) VisualEffectSound.Play();
 }
Esempio n. 2
0
        public void Initialize(Animation animation, Vector2 angle)
        {
            this.Animation = animation;
            this.Animation.angle = angle;

            Alive = true;

            base.HP = 150;
        }
Esempio n. 3
0
        // Initialize the player
        public void Initialize(Animation animation, Texture2D leftTexture, Texture2D rightTexture)
        {
            base.Animation = animation;

            // Set the player to be active
            Alive = true;

            // Set the player health
            base.HP = 150;

            commonTex = animation.ObjectTexture;
            leftTex = leftTexture;
            rightTex = rightTexture;
        }
Esempio n. 4
0
        // Initialize the player
        public void Initialize(Animation animation, int inflictDmg, Vector2 angle, int speed, Vector2 basis)
        {
            MissleAnimation = animation;

            // Set the player to be active
            Alive = true;
            MissleAnimation.angle = angle;

            // Set the player health
            RemoveValue = inflictDmg;

            Speed = speed;
            MissleAnimation.speed = speed;
            MissleAnimation.angle = basis;
        }
Esempio n. 5
0
 public override void Move(int value, Animation.Way way, Rectangle display)
 {
     if (way == Animation.Way.Left)
     {
         Animation.ObjectTexture = leftTex;
     }
     if (way == Animation.Way.Right)
     {
         Animation.ObjectTexture = rightTex;
     }
     if (way == Animation.Way.Down || way == Animation.Way.Up)
     {
         Animation.ObjectTexture = commonTex;
     }
     Animation.Move(value, way, display);
 }
Esempio n. 6
0
 public abstract void Move(int value, Animation.Way way, Rectangle display);
Esempio n. 7
0
 public override void Move(int value, Animation.Way way, Microsoft.Xna.Framework.Rectangle display)
 {
     throw new NotImplementedException();
 }
 /// <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();
     Loading = new Animation(Resources.Textures["Loading"], new Vector2(map.GameScreenRect.Width/2f - 200f, map.GameScreenRect.Height/2f - 20f), 100, 100, 7, 40, Color.White, 1.0f, true);
 }
Esempio n. 9
0
 public override void Move(int value, Animation.Way way, Rectangle display)
 {
     Animation.Move(value, way, display);
 }
Esempio n. 10
0
 public Enemy(Animation animation, Vector2 angle)
 {
     this.Initialize(animation, angle);
 }
Esempio n. 11
0
 public Player(Animation animation, Texture2D leftTexture, Texture2D rightTexture)
 {
     this.Initialize(animation, leftTexture, rightTexture);
 }