public static void Compare(GenericModelObject modelObjectA, GenericModelObject modelObjectB, int version) { Assert.AreEqual <int>(modelObjectA.IntegerValue, modelObjectB.IntegerValue); CompareFloat(modelObjectA.FloatValue, modelObjectB.FloatValue); CompareString(modelObjectA.StringValue, modelObjectB.StringValue, false); }
public static void Compare(GenericModelObject savedModelObject, GenericModelObject loadedModelObject, int version) { Assert.AreEqual <int>(savedModelObject.IntegerValue, loadedModelObject.IntegerValue); CompareFloat(savedModelObject.FloatValue, loadedModelObject.FloatValue); CompareString(savedModelObject.StringValue, loadedModelObject.StringValue, false); }
private void LoadWorld() { world3D = new World3D(); world3D.LoadContent(); camera1 = new Camera(); camera1.LoadContent(); camera1.position = new Vector3(0, 27, -22); camera1.Face(new Vector3(0, 26, -21)); camera2 = new Camera(); camera2.LoadContent(); camera2.position = new Vector3(10, 10, -10); camera2.Face(new Vector3(0, 0, 0)); camera2.minDepth = 1f; camera2.maxDepth = 50f; dirLight1 = new LightDirectional(); dirLight1.LoadContent(); zombie = new GenericModelObject(); zombie.LoadContent(); zombie.model = Global.zombieSceneModel; zombie.ColorMap = Global.zombieDiffuse; zombie.NormalMap = Global.zombieNormal; zombie.position = new Vector3(0, 0.5f, -20); zombie.angle.Y = MathHelper.ToRadians(-90); map = new Map(); map.LoadContent(); map.length = 10; map.width = 10; Cwing1 = new GenericModelObject(); Cwing1.LoadContent(); Cwing1.model = Global.ship1Model; Cwing1.ColorMap = Global.ship1Diffuse; Cwing1.NormalMap = Global.ship1Normal; Cwing1.SpecularMap = Global.ship1Specular; Cwing1.position = new Vector3(-52, 5f, 60); Acolyte1 = new GenericModelObject(); Acolyte1.LoadContent(); Acolyte1.model = Global.ship2Model; Acolyte1.ColorMap = Global.ship2Diffuse; Acolyte1.NormalMap = Global.ship2Normal; Acolyte1.SpecularMap = Global.ship2Specular; Acolyte1.position = new Vector3(-32, 5f, 60); Orbiter = new Orbiter(); Orbiter.LoadContent(); Orbiter.size = Vector3.One * 0.4f; Orbiter2 = new Orbiter(); Orbiter2.LoadContent(); Orbiter2.size = Vector3.One * 0.4f; Orbiter3 = new Orbiter(); Orbiter3.LoadContent(); Orbiter3.size = Vector3.One * 0.4f; pointLight1 = new PointLight(); pointLight1.LoadContent(); pointLight1.intensity = 1.5f; pointLight1.position = new Vector3(40, 5, 45); pointLight1.color = Color.Red; spotLight1 = new SpotLight(); spotLight1.LoadContent(); spotLight1.intensity = 2f; spotLight1.color = Color.White; spotLight1.intensity = 1.5f; spotLight1.position = new Vector3(10, 40, 30); spotLight1.Face(new Vector3(0f, -1, -0.7f)); spotLight2 = new SpotLight(); spotLight2.LoadContent(); spotLight2.intensity = 2f; spotLight2.color = Color.Red; spotLight2.intensity = 1.5f; spotLight2.position = new Vector3(-60f, 35f, 75f); spotLight2.Face(new Vector3(-40f, 0f, 55f)); spotLight3 = new SpotLight(); spotLight3.LoadContent(); spotLight3.intensity = 2f; spotLight3.color = Color.Blue; spotLight3.intensity = 1.5f; spotLight3.position = new Vector3(-20f, 35f, 75f); spotLight3.Face(new Vector3(-40f, 0f, 55f)); spotLight4 = new SpotLight(); spotLight4.LoadContent(); spotLight4.intensity = 2f; spotLight4.color = Color.Green; spotLight4.intensity = 1.5f; spotLight4.position = new Vector3(-40f, 35f, 75f); spotLight4.Face(new Vector3(-40f, 0f, 45f)); blueBall = new Ball(); blueBall.LoadContent(); blueBall.position = new Vector3(10, 15, 5); blueBall.friction = 1f; blueBall.Material.diffuseColor = Color.Blue.ToVector4(); blueBall.Material.matteColor = Color.AliceBlue.ToVector4(); blueBall.Material.shininess = 1f; blueBall.Material.ambient = 0.4f; ball2 = new Ball(); ball2.LoadContent(); ball2.position = new Vector3(0f, 1f, 0f); ball2.Material.diffuseColor = Color.DarkMagenta.ToVector4(); ball2.Material.matteColor = Color.Magenta.ToVector4(); ball2.Material.shininess = 1f; ball2.Material.ambient = 0.2f; ball4 = new Ball(); ball4.LoadContent(); ball4.position = new Vector3(0f, 3f, 0f); ball4.Material.diffuseColor = Color.Green.ToVector4(); ball4.Material.matteColor = Color.GreenYellow.ToVector4(); ball4.Material.shininess = 1f; ball4.Material.ambient = 0.2f; goldBall = new Ball(); goldBall.LoadContent(); goldBall.position = new Vector3(50f, 10f, 50f); goldBall.Material.diffuseColor = Color.Goldenrod.ToVector4(); goldBall.Material.matteColor = Color.Gold.ToVector4(); goldBall.Material.shininess = 2f; goldBall.size = Vector3.One * 10; orientAid = new Orientaid(); orientAid.LoadContent(); orientAid2 = new Orientaid(); orientAid2.LoadContent(); orientAid3 = new Orientaid(); orientAid3.LoadContent(); orientAid4 = new Orientaid(); orientAid4.LoadContent(); a1 = new Arrow(); a1.LoadContent(); a2 = new Arrow(); a2.LoadContent(); a3 = new Arrow(); a3.LoadContent(); a4 = new Arrow(); a4.LoadContent(); a5 = new Arrow(); a5.LoadContent(); a6 = new Arrow(); a6.LoadContent(); a7 = new Arrow(); a7.LoadContent(); a8 = new Arrow(); a8.LoadContent(); a9 = new Arrow(); a9.LoadContent(); a10 = new Arrow(); a10.LoadContent(); }