public WanderBehavior(WarZGame game, AiPlayer player) : base(game, player) { _wanderDirection.X = (float)Math.Cos(player.FacingDirection); _wanderDirection.Z = (float)Math.Sin(player.FacingDirection); player.FullSpeed = true; }
public CanonManager(WarZGame game) : base(game) { WZGame = game; _balls = new List <CanonBall>(MAX_BALLS); fillCanon(); }
public CollisionSystem(WarZGame game, Player player, AiPlayerManager aiManager) : base(game) { _player = player; _aiM = aiManager; WZGame = game; }
public Tank(WarZGame game, Model model) : base(game, model) { WZGame = game; // _scale /= 300; _model.Root.Transform *= Matrix.CreateScale(Vector3.One / 300); _model.Root.Transform *= Matrix.CreateRotationY(MathHelper.Pi); _boneTransforms = new Matrix[_model.Bones.Count]; _model.CopyAbsoluteBoneTransformsTo(_boneTransforms); LoadBoundingSphere(); leftBackWheelBone = model.Bones["l_back_wheel_geo"]; rightBackWheelBone = model.Bones["r_back_wheel_geo"]; leftFrontWheelBone = model.Bones["l_front_wheel_geo"]; rightFrontWheelBone = model.Bones["r_front_wheel_geo"]; turretBone = model.Bones["turret_geo"]; canonBone = model.Bones["canon_geo"]; leftBackWheelTransform = leftBackWheelBone.Transform; rightBackWheelTransform = rightBackWheelBone.Transform; leftFrontWheelTransform = leftFrontWheelBone.Transform; rightFrontWheelTransform = rightFrontWheelBone.Transform; turretTransform = turretBone.Transform; canonTransform = turretBone.Transform; _specularColor_original = ((BasicEffect)(_model.Meshes[0].Effects[0])).SpecularColor; _specularColor_red = Color.Red.ToVector3(); }
public ParticlesManager(WarZGame game) : base(game) { WZGame = game; explosionParticles = new ExplosionParticleSystem(WZGame); explosionSmokeParticles = new ExplosionSmokeParticleSystem(WZGame); projectileTrailParticles = new ProjectileTrailParticleSystem(WZGame); smokePlumeParticles = new SmokePlumeParticleSystem(WZGame); fireParticles = new FireParticleSystem(WZGame); // Set the draw order so the explosions and fire // will appear over the top of the smoke. smokePlumeParticles.DrawOrder = 150; explosionSmokeParticles.DrawOrder = 200; projectileTrailParticles.DrawOrder = 300; explosionParticles.DrawOrder = 400; fireParticles.DrawOrder = 500; // Register the particle system WZGame.Components. WZGame.Components.Add(explosionParticles); WZGame.Components.Add(explosionSmokeParticles); WZGame.Components.Add(projectileTrailParticles); WZGame.Components.Add(smokePlumeParticles); WZGame.Components.Add(fireParticles); }
public AiPlayerManager(WarZGame game, Tank tank) : base(game) { _aiPlayers = new List <AiPlayer>(MAX_AI); this.WZGame = game; _defaultTank = tank; }
public AiPlayerManager(WarZGame game, Tank tank) : base(game) { _aiPlayers = new List<AiPlayer>(MAX_AI); this.WZGame = game; _defaultTank = tank; }
public CanonManager(WarZGame game) : base(game) { WZGame = game; _balls = new List<CanonBall>(MAX_BALLS); fillCanon(); }
public static void Initialize(WarZGame game) { if (initialized) return; _game = game; initialized = true; }
public AiPlayer(WarZGame game, Camera camera, Tank tank, Terrain terrain, int id) : base(game, camera, tank, terrain) { WZGame = game; Behaviors = new List<AiPlayerBehavior>(MAX_BEHAVIORS); MaxSpeed = 5f; this.id = id; }
public CanonBall(WarZGame game) : base(game) { WZGame = game; _ball = new SpherePrimitive(game.GraphicsDevice, Diameter, Tesselation); _boundingSphere = new BoundingSphere(_position, Diameter / 2f); _soundExplode = WZGame.Content.Load<SoundEffect>("Sounds/canon - explode2"); }
public AiPlayer(WarZGame game, Camera camera, Tank tank, Terrain terrain, int id) : base(game, camera, tank, terrain) { WZGame = game; Behaviors = new List <AiPlayerBehavior>(MAX_BEHAVIORS); MaxSpeed = 5f; this.id = id; }
public static void Initialize(WarZGame game) { if (initialized) { return; } _game = game; initialized = true; }
public Player(WarZGame game, Camera camera, Tank tank, Terrain terrain) : base(game) { WZGame = game; _mesh = tank; _terrain = terrain; ChangeCamera(camera); _canonManager = new CanonManager(game); _soundFire = WZGame.Content.Load <SoundEffect>("Sounds/tank - shoot"); _soundTankGo = WZGame.Content.Load <SoundEffect>("Sounds/tank - go"); _soundTankGoInstance = _soundTankGo.CreateInstance(); _soundTankGoInstance.IsLooped = true; // _camera.HorizontalOffset = 4f; }
/// <summary> /// The main entry point for the application. /// </summary> static void Main(string[] args) { /* www Thread liveDebugger = new Thread(StartLiveDebugger); liveDebugger.IsBackground = true; liveDebugger.SetApartmentState(ApartmentState.STA); liveDebugger.Start(); while (!LDbg.Initialized) ; */ using (WarZGame game = new WarZGame()) { game.Run(); } }
public Player(WarZGame game, Camera camera, Tank tank, Terrain terrain) : base(game) { WZGame = game; _mesh = tank; _terrain = terrain; ChangeCamera(camera); _canonManager = new CanonManager(game); _soundFire = WZGame.Content.Load<SoundEffect>("Sounds/tank - shoot"); _soundTankGo = WZGame.Content.Load<SoundEffect>("Sounds/tank - go"); _soundTankGoInstance = _soundTankGo.CreateInstance(); _soundTankGoInstance.IsLooped = true; // _camera.HorizontalOffset = 4f; }
/// <summary> /// The main entry point for the application. /// </summary> static void Main(string[] args) { /* * www * * * Thread liveDebugger = new Thread(StartLiveDebugger); * liveDebugger.IsBackground = true; * liveDebugger.SetApartmentState(ApartmentState.STA); * liveDebugger.Start(); * * * * * while (!LDbg.Initialized) ; */ using (WarZGame game = new WarZGame()) { game.Run(); } }
public ExplosionSmokeParticleSystem(WarZGame game) : base(game) { }
public GodViewCamera(WarZGame game, Vector3 position, Vector3 target, Vector3 up) : base(game, position, target, up) { WZGame = game; }
public ChaseBehavior(WarZGame game, AiPlayer aiPlayer, Player player) : base(game, aiPlayer) { _aiPlayer.FullSpeed = true; _player = player; }
public ProjectileTrailParticleSystem(WarZGame game) : base(game) { }
public ExplosionParticleSystem(WarZGame game) : base(game) { WZGame = game; }
public SmokePlumeParticleSystem(WarZGame game) : base(game) { }
public AiPlayerBehavior(WarZGame game, AiPlayer player) { _aiPlayer = player; WZGame = game; _enabled = true; }
/// <summary> /// Constructor. /// </summary> protected ParticleSystem(WarZGame game) : base(game) { WZGame = game; }
public FireParticleSystem(WarZGame game) : base(game) { }
public GoingForwardBehavior(WarZGame game, AiPlayer aiPlayer) : base(game, aiPlayer) { aiPlayer.FullSpeed = true; }
public ChaseBehavior(WarZGame game, AiPlayer aiPlayer, Player player) : base(game,aiPlayer) { _aiPlayer.FullSpeed = true; _player = player; }