protected EnemyButton(AbstractEntity aEntity, Keys aHotKey)
        {
            mEntity = aEntity;
            mHotKey = ((char)((int)aHotKey));

            theButtonManager.Add(this);
        }
Exemplo n.º 2
0
        private EnemyShell(Vector2 aVelocity, Vector2 aWorldCoordinate, AbstractEntity aShooter)
        {
            mCollisionMachine = new ProjectileCollision(this);
            mVelocity = aVelocity;
            WorldPosition = aWorldCoordinate;
            mShooter = aShooter;

            Speed = 20;
            MaxDistance = 3000;
            FilePathToGraphic = "Bullet";

            Manager.Add(this);
        }
Exemplo n.º 3
0
        private TankShell(Vector2 aScreenCoordinate, Vector2 aWorldCoordinate, AbstractEntity aShooter)
        {
            mCollisionMachine = new ProjectileCollision(this);
            WorldPosition = aWorldCoordinate + aScreenCoordinate;
            mStartinPosition = WorldPosition;
            mShooter = aShooter;

            Speed = 20;
            MaxDistance = 3000;
            FilePathToGraphic = "Bullet";
            Velocity = thePlayerManager.List[0].Velocity;

            float e = thePlayerManager.List[0].GunDirection;

            Velocity = new Vector2((float)Math.Sin(e), -(float)Math.Cos(e));

            Velocity.Normalize();

            Manager.Add(this);
        }
 public override void Add(AbstractEntity aEntity)
 {
     List.Add(aEntity as Tile);
 }
 public override void Remove(AbstractEntity aEntity)
 {
     List.Remove(aEntity as Tile);
 }
 public EntityCollision(AbstractEntity aEntity)
 {
     mEntity = aEntity;
     UpdateCollision();
 }
 public virtual void Remove(AbstractEntity aEntity)
 {
 }
 public virtual void Add(AbstractEntity aEntity)
 {
 }
Exemplo n.º 9
0
 public static void CreateProjectile(Vector2 aVelocity, Vector2 aWorldCoordinate, AbstractEntity aShooter)
 {
     new EnemyShell(aVelocity, aWorldCoordinate, aShooter);
 }
Exemplo n.º 10
0
 public static void Create(AbstractEntity aEntity, Keys aHotKey)
 {
     new EnemyButton(aEntity, aHotKey);
 }
 public void SetTile(AbstractEntity aEntity)
 {
 }
 public override void Remove(AbstractEntity aEntity)
 {
     List.Remove(aEntity as Player);
 }
 public override void Add(AbstractEntity aEntity)
 {
     List.Add(aEntity as Player);
 }
Exemplo n.º 14
0
 public static void CreateProjectile(Vector2 aScreenCoordinate, Vector2 aWorldCoordinate, AbstractEntity aShooter)
 {
     new TankShell(aScreenCoordinate, aWorldCoordinate, aShooter);
 }