Exemple #1
0
 public Building(Game game, Vector3 p_location)
     : base(game)
 {
     tankGame = game;
     location = p_location;
     //world = Matrix.CreateTranslation(location);
     camera = (GameServices.CameraState)Game.Services.GetService(
                         typeof(GameServices.CameraState));
 }
Exemple #2
0
 public Shell(Game game, Vector3 p_velocity, Vector3 p_cannonEnd, Tank p_owner)
     : base(game)
 {
     tankGame = game;
     velocity = p_velocity;
     location = p_cannonEnd;
     cannonEnd = p_cannonEnd;
     time = 0;
     gravity = 980.0665f;
     radius = 15;
     owner = p_owner;
     camera = (GameServices.CameraState)Game.Services.GetService(
                         typeof(GameServices.CameraState));
     audio = (GameServices.AudioLibrary)Game.Services.GetService(
                         typeof(GameServices.AudioLibrary));
 }
Exemple #3
0
        public Tank(Game game, Vector3 p_tankLocation)
            : base(game)
        {
            tankGame = game;
            isAI = true;
            camera = (GameServices.CameraState)Game.Services.GetService(
                                typeof(GameServices.CameraState));
            audio = (GameServices.AudioLibrary)Game.Services.GetService(
                                typeof(GameServices.AudioLibrary));

            //set the original tank propeties
            frontWheelRotation = 0;
            backWheelRotation = 0;
            steerRotation = 0;
            turretRotation = 0;
            cannonRotation = 0;
            hatchRotation = 0;
            totalRotation = 0;
            tankLocation = p_tankLocation;
            movementSpeed = 10;
            barrelLength = 300;
            health = 1;
            cannonFired = -1.5;
            cannonReloading = false;
            currentCommand = AIMove.None;
        }