Ejemplo n.º 1
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);
        }
Ejemplo n.º 2
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);
        }