Exemple #1
0
        /*public void Draw(GameTime gameTime, Matrix View, Matrix Projection, Vector3 CameraPosition)
        {
            base.Draw(View, Projection, CameraPosition);

            engineTrailEffect.Draw(View, Projection, level.camera.Up, level.camera.Right, CameraPosition);
        }*/
        // Constructor
        public Fighter(Vector3 position, Vector3 target, float scale, string filePath)
            : base(position, scale, filePath)
        {
            this.StartPosition = position;
            this.Target = target;
            //this.State = FighterState.Move;
            this.State = FighterState.MoveToAttack;

            positions = new List<Vector3>();
            engineTrailEffect = new BillboardStrip(Level.graphicsDevice, content, content.Load<Texture2D>("Textures\\Lines\\Line2T1"),//"Textures\\Lines\\Line2T1"
                new Vector2(10, 100), positions);
            shootSound = content.Load<SoundEffect>("SoundEffects\\License\\LAAT1");

            Initialize();
        }
Exemple #2
0
        public ArmedSatellite(SatelliteWeapon weaponType, Vector3 position, Vector3 center, float scale, string fileName, string SEPath)
            : base(true, position, center, scale, fileName)
        {
            //random = new Random();
            this.Weapon = weaponType;
            chargeTime = weaponType == SatelliteWeapon.Laser ? random.Next(10, 70) : random.Next(60, 120);
            shootSound = content.Load<SoundEffect>(SEPath);
            shieldEffect = new EnergyShieldEffect(content, game.GraphicsDevice, Position, new Vector2(150), 100);//300,250
            level.transparentEffects.Add(shieldEffect);

            positions = new List<Vector3>();
            billboardStrip = new BillboardStrip(Level.graphicsDevice, content, content.Load<Texture2D>("Textures\\Lines\\Line1T1"), new Vector2(10, 200), positions);//Line1T1

            visibleEnemies = new List<Object>();
            sensorSphere = new BoundingSphere(Position, 1000);
            RenderBoudingSphere = false;
        }
Exemple #3
0
        public Missile(IFF identification, Object user, Object target, float speed, Vector3 direction, Vector3 position, float scale, string filePath)
            : base(identification, position, direction, speed)
        {
            /*this.Position = position;
            startPosition = position;
            this.Speed = speed;
            this.Direction = direction;
            Direction.Normalize();
            this.Right = user.Right;
            this.Up = user.Up;
            this.Velocity = Direction * speed;
            Load(filePath);*/

            MAX_DISTANCE = 2000;
            this.Target = target;
            Position = position;
            upPosition = position + Vector3.Up;

            positions = new List<Vector3>();
            Renderer = new Object(position, scale, filePath);
            billboardStrip = new BillboardStrip(Level.graphicsDevice, content,
                content.Load<Texture2D>("Textures\\Lines\\smoke"), new Vector2(10, 30), positions, true);
        }