public NPC2(Model model, Tank destination) : base(model) { #region boneyard turretBone = model.Bones["turret_geo"]; cannonBone = model.Bones["canon_geo"]; hatchBone = model.Bones["hatch_geo"]; lFrontWBone = model.Bones["l_front_wheel_geo"]; rFrontWBone = model.Bones["r_front_wheel_geo"]; lSteer = model.Bones["l_steer_geo"]; rSteer = model.Bones["r_steer_geo"]; lBackWBone = model.Bones["l_back_wheel_geo"]; rBackWBone = model.Bones["r_back_wheel_geo"]; tankBone = model.Bones["tank_geo"]; #endregion #region boneTransform if (turretBone != null) turretTransform = turretBone.Transform; if (lFrontWBone != null) lFrontTransform = lFrontWBone.Transform; if (rFrontWBone != null) rFrontTransform = rFrontWBone.Transform; if (lBackWBone != null) lBackTransform = lBackWBone.Transform; if (rBackWBone != null) rBackTransform = rBackWBone.Transform; #endregion tank = destination; translation *= Matrix.CreateTranslation(0, 0, -1200); distant = distance + 20; }
protected override void LoadContent() { //models.Add(new Ground(Game.Content.Load<Model>(@"Models/Ground/Ground"))); tank1 = new Tank(Game.Content.Load<Model>(@"tank_xnb/tank"), ((Game1)Game).GraphicsDevice, ((Game1)Game).camera); models.Add(tank1); //models.Add(new NPC2(Game.Content.Load<Model>(@"tank_xnb/tank2"), tank1)); base.LoadContent(); }
public override void Initialize() { ground=new Ground(Game.Content.Load<Model>(@"Models/Ground/Ground")); models.Add(ground); // models.Add(new SkyBox( // Game.Content.Load<Model>(@"Models/Sky/skybox"))); tank=new Tank(Game.Content.Load<Model>(@"Models/Tank/tank"),(((Game1)Game).GraphicsDevice),((Game1)Game).camera); tank2 = new pursuit(Game.Content.Load<Model>(@"Models/Tank/tank"), (((Game1)Game).GraphicsDevice), ((Game1)Game).camera); models.Add(tank2); models.Add(tank); steer=new Steering(150f, 300f); base.Initialize(); }