Exemplo n.º 1
0
 public override Attack CreateClient(int objectID, Microsoft.Xna.Framework.Vector2 dir, Microsoft.Xna.Framework.Point position, string info)
 {
     AttackInfo aInfo = new AttackInfo();
     aInfo.CollisionDespawn = false;
     aInfo.Physics = true;
     aInfo.bounceFactor = 0.4f;
     aInfo.LifeTime = 2.5f;
     return new Grenade(Content.ContentInterface.LoadTexture("Egg"), new Microsoft.Xna.Framework.Rectangle(position.X, position.Y, 6, 6), dir, objectID, aInfo);
 }
Exemplo n.º 2
0
 public override Attack CreateClient(int objectID, Microsoft.Xna.Framework.Vector2 dir, Microsoft.Xna.Framework.Point position, string info)
 {
     AttackInfo aInfo = new AttackInfo();
     aInfo.CollisionDespawn = true;
     aInfo.HitDespawn = true;
     aInfo.LifeTime = 2.2f;
     aInfo.Physics = false;
     return new Attack(Content.ContentInterface.LoadTexture("Attack"), new Microsoft.Xna.Framework.Rectangle(position.X, position.Y, 5, 8), dir, objectID, aInfo);
 }
Exemplo n.º 3
0
 public Attack(Texture2D tex, Rectangle rect, Vector2 mov, int id, AttackInfo info)
     : base(tex, rect, id)
 {
     _info = info;
     Movement = mov;
     _size.X = tex.Width;
     _size.Y = tex.Height;
     _rect = rect;
     lifeTime = _info.LifeTime;
     _angle = (float)Math.Atan2(Movement.Y, Movement.X);
 }
Exemplo n.º 4
0
 public SlimeShot(Microsoft.Xna.Framework.Graphics.Texture2D tex, Microsoft.Xna.Framework.Rectangle rect, Microsoft.Xna.Framework.Vector2 dir, int id, AttackInfo info)
     : base(tex, rect, dir, id, info)
 {
 }
Exemplo n.º 5
0
        private void SetUpAttacks()
        {
            _attackTypes = new Dictionary<int, AttackInfo>();
            AttackInfo info = new AttackInfo();

            info.CollisionDespawn = true;
            info.LifeTime = 0.1f;
            _attackTypes.Add(1, info);

            info.CollisionDespawn = false;
            info.LifeTime = 0.2f;
            _attackTypes.Add(2, info);

            info.CollisionDespawn = false;
            info.Physics = true;
            info.bounceFactor = 0.4f;
            info.LifeTime = 2.5f;
            _attackTypes.Add(3, info);
            _attackTypes.Add(4, info);
            info.Physics = false;
            info.CollisionDespawn = true;
            info.LifeTime = 0.1f;
            _attackTypes.Add(5003, info);

            info.CollisionDespawn = true;
            info.LifeTime = 0.4f;
            _attackTypes.Add(5006, info);

            info.CollisionDespawn = true;
            info.LifeTime = 0.5f;
            _attackTypes.Add(5004, info);

            info.CollisionDespawn = true;
            info.LifeTime = 2.2f;
            _attackTypes.Add(5005, info);
        }