Beispiel #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();
 }
Beispiel #2
0
        public void Initialize(Animation animation, Vector2 angle)
        {
            this.Animation = animation;
            this.Animation.angle = angle;

            Alive = true;

            base.HP = 150;
        }
Beispiel #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;
        }
Beispiel #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;
        }
Beispiel #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);
 }
 public abstract void Move(int value, Animation.Way way, Rectangle display);
Beispiel #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);
 }
Beispiel #9
0
 public override void Move(int value, Animation.Way way, Rectangle display)
 {
     Animation.Move(value, way, display);
 }
Beispiel #10
0
 public Enemy(Animation animation, Vector2 angle)
 {
     this.Initialize(animation, angle);
 }
Beispiel #11
0
 public Player(Animation animation, Texture2D leftTexture, Texture2D rightTexture)
 {
     this.Initialize(animation, leftTexture, rightTexture);
 }