public Opponent(string carFile, Vector3 position, float direction, CpuDriver driver) { if (driver == null) driver = new CpuDriver(); Driver = driver; Vehicle = new Vehicle(GameVars.BasePath + @"cars\" + carFile, Driver); if (driver is CopDriver) { Vehicle.Chassis.Actor.GlobalPosition = position; Vehicle.Chassis.Actor.GlobalOrientation *= Matrix.CreateRotationY(MathHelper.ToRadians(90)); } else { Vehicle.PlaceOnGrid(position, direction); } SetupVehicle(); }
public Opponent(string carFile, Vector3 position, float direction, CpuDriver driver) { if (driver == null) { driver = new CpuDriver(); } Driver = driver; Vehicle = new Vehicle(GameVars.BasePath + @"cars\" + carFile, Driver); if (driver is CopDriver) { Vehicle.Chassis.Actor.GlobalPosition = position; Vehicle.Chassis.Actor.GlobalOrientation *= Matrix.CreateRotationY(MathHelper.ToRadians(90)); } else { Vehicle.PlaceOnGrid(position, direction); } SetupVehicle(); }