Exemplo n.º 1
0
Arquivo: AI.cs Projeto: HazWard/Tank3D
        void GestionProjectile()
        {
            ProjectileTank = new Projectile(Game, "Projectile", 0.1f, Rotation,
                                            new Vector3(Position.X - 5 * (float)Math.Sin(Rotation.Y), Position.Y + 4.5f, Position.Z - 5 * (float)Math.Cos(Rotation.Y)), IntervalleMAJ, 2f, 0.02f, false, this);

            Game.Components.Add(ProjectileTank);
        }
Exemplo n.º 2
0
 void GestionProjectile(float indiceRotation)
 {
     if (AÉtéCliqué)
     {
         ProjectileTank = new Projectile(Game, "Projectile", 0.1f,
                                         new Vector3(indiceRotation * RotationPitchCanon.X + MathHelper.Pi, RotationPitchCanon.Y - 0.05f, RotationPitchCanon.Z),
                                         new Vector3(PositionCanon.X - 5 * (float)Math.Sin(RotationPitchCanon.Y), PositionCanon.Y + 4.5f, PositionCanon.Z - 5 * (float)Math.Cos(RotationPitchCanon.Y)), IntervalleMAJ, 2f, 0.02f, false, this);
         Game.Components.Add(ProjectileTank);
     }
 }