public static Chopper Create() { GameObject chopperGO = new GameObject("Chopper"); Chopper chopper = chopperGO.AddComponent <Chopper>(); return(chopper); }
override public void Start() { Futile.atlasManager.LoadImage("chopper"); Futile.atlasManager.LoadImage("man"); this.AddChild(persons = new FContainer()); ListenForUpdate(HandleUpdate); root = FPWorld.Create(64.0f); for (int i = 0; i < 50; i++) { Platform p = Platform.Create(); p.Init(new Vector2(i * 250, RXRandom.Range(-100, 100) * i), this); Person b = Person.Create(); b.Init(new Vector2(p.sprite.x, p.sprite.y + 532), this); b.GameOver = HandleGameOver; } c = Chopper.Create(); c.Init(new Vector2(0, 128), this); RXWatcher.Watch(this); Futile.stage.Follow(c.sprite, false, false); }
static void Main(string[] args) { MotorbikeService motorbikeService = new MotorbikeService(); Enduro enduro = new Enduro("Honda", "X250"); RacingBike racingBike = new RacingBike("Kawasaki", "H2R"); Chopper chopper = new Chopper("Boulevard", "C90"); motorbikeService.CalculateCompetitionCounter(enduro); motorbikeService.CalculateCompetitionCounter(racingBike); motorbikeService.CalculateCompetitionCounter(chopper); foreach (var motorBike in motorbikeService.GetAll()) { if (motorBike is Chopper bike) { Console.WriteLine(bike.Distance); } if (motorBike is Enduro bike2) { Console.WriteLine(bike2.Distance); } if (motorBike is RacingBike bike1) { Console.WriteLine(bike1.Distance); } } Console.ReadLine(); }
public override void init() { Engine.GetInst().addEntity(HeightMap.createComponents( "US_Canyon", "mudcrack" )); Engine.GetInst().Window.Title = "Get to the Choppaaaaargh!"; Engine.GetInst().Subsystems.Add(new HeightmapSystem()); Engine.GetInst().Subsystems.Add(new SkyboxSystem(world)); Engine.GetInst().Subsystems.Add(new CameraSystem()); Engine.GetInst().Subsystems.Add(new ModelSystem(world)); Engine.GetInst().Subsystems.Add(new TransformSystem()); Engine.GetInst().Subsystems.Add(new InputSystem()); chopper = Engine.GetInst().addEntity(Chopper.createComponents( "Chopper", true, new Vector3(0.5f, 0.5f, 0.5f), new Vector3(0f, 300f, 0f), Quaternion.Identity, world, new Vector3(0.1f, 0.1f, 0.1f) )); }
public static Chopper GetInstance() { Chopper chopper = Instance.choppers.Get(); int direction = UnityEngine.Random.Range(0, 2); Vector3 startPos = Vector3.zero; Vector3 oldScale = chopper.transform.localScale; if (direction == 0) { direction = -1; startPos = new Vector3( GameManager.CameraXBound.Right + EnemyFactory.GetSpawnOffsetX(GameManager.CurrentDifficulty), UnityEngine.Random.Range(GameManager.CameraYBound.Left + Instance.yOffset, GameManager.CameraYBound.Right - Instance.yOffset)); chopper.transform.localScale = new Vector3(-direction * Mathf.Abs(oldScale.x), oldScale.y, oldScale.z); } else { startPos = new Vector3( GameManager.CameraXBound.Left - EnemyFactory.GetSpawnOffsetX(GameManager.CurrentDifficulty), UnityEngine.Random.Range(GameManager.CameraYBound.Left + Instance.yOffset, GameManager.CameraYBound.Right - Instance.yOffset)); chopper.transform.localScale = new Vector3(-direction * Mathf.Abs(oldScale.x), oldScale.y, oldScale.z); } chopper.transform.localPosition = startPos; chopper.Direction = direction; chopper.MoveSpeed = GetChopperSpeed(GameManager.CurrentDifficulty); return(chopper); }
public double For(Chopper chopper, double finishTime) { if (chopper.YearlyUse > 0) { return (chopper.Ownership * finishTime / chopper.YearlyUse) * (chopper.Ownership * chopper.Lube / 100 * finishTime / chopper.YearlyUse); } return 0; }
public void CanFindNumberTheory(int expectedIndex, int toFind, params int[] sortedArray) { var chopper = new Chopper { CurrentSearchItem = toFind, CurrentSortedArray = sortedArray }; Assert.Equal(expectedIndex, chopper.ExecuteSearch()); }
public IEnumerator DrawChopperEvent() //mainn function that draws new event and does it { while (true) { yield return(new WaitForSeconds(chopperTimer)); Chopper chopper = ChopperFactory.GetInstance(); chopper.StartMoving(); } }
public double For(Chopper chopper, double finishTime) { if (chopper.YearlyUse > 0) { return (chopper.Ownership * finishTime / chopper.YearlyUse) + (chopper.Ownership * chopper.Lube / 100 * finishTime / chopper.YearlyUse) + (chopper.FuelPrice * chopper.FuelConsumptionRate * chopper.Power * finishTime) + (chopper.OperatorWage * finishTime); } return 0; }
static void Main(string[] args) { Car audi = new Car("Audi", "A6", 20, 70, 7); audi.drive(12); audi.drive(90); Console.WriteLine(audi); Chopper bird = new Chopper("US army", "flybird", 2000, 50, 7); bird.fly(10, 10); Console.ReadLine(); }
public void LongArray() { int[] ints = new int[20]; for (var i = 0; i < 20; i++) { ints[i] = i; } foreach (var i in ints) { Assert.Equal(i, Chopper.Chop(i, ints)); } }
public double CalculateFor(double truckTime, double finishTime, Chopper chopper) { if (chopper.ChopTractorType == EquipmentType.SelfPropelled) { var calculator = new SelfPropelledChopperCostingCalculator(); return calculator.For(chopper, finishTime); } if (chopper.ChopTractorType == EquipmentType.PullType) { var calculator = new PullTypeChopperCostingCalculator(); return calculator.For(chopper, finishTime); } return 0; }
private void OnTriggerExit(Collider other) { Furniture f = other.gameObject.GetComponent <Furniture>(); if (f != null) { Chopper fChopper = f.GetComponent <Chopper>(); if (fChopper != null) { fChopper.StopChopping(); } furnitureList.Remove(f); } }
public double For(Chopper chopper, double finishTime) { switch (chopper.ChopType) { case OwnershipType.Rent: var rentalCalculator = new SelfPropelledChopperRentalCostingCalculator(); return rentalCalculator.For(chopper, finishTime); case OwnershipType.Custom: var customCalculator = new SelfPropelledChopperCustomCostingCalculator(); return customCalculator.For(chopper); default: var ownedCalculator = new SelfPropelledChopperOwnedCostingCalculator(); return ownedCalculator.For(chopper, finishTime); } }
public void OnCountdownEnd(long id, float overtime) { if (id == pigeonId) { Pigeon pigeon = PigeonFactory.GetInstance(); pigeon.StartMoving(); TimerManager.Reset(pigeonId, pigeonTimer); } else if (id == chopperId) { Chopper chopper = ChopperFactory.GetInstance(); chopper.StartMoving(); TimerManager.Reset(chopperId, chopperTimer); } }
public override void OnInitialise() { SystemCore.CursorVisible = false; SystemCore.ActiveScene.SetUpBasicAmbientAndKey(); SystemCore.ActiveScene.SetDiffuseLightDir(0, new Vector3(0.01f, 1, 0.01f)); SystemCore.ActiveScene.FogEnabled = true; mouseCamera = new MouseFreeCamera(new Vector3(0, 0, 0)); SystemCore.SetActiveCamera(mouseCamera); mouseCamera.moveSpeed = 0.1f; mouseCamera.SetPositionAndLook(new Vector3(50, 30, -20), (float)Math.PI, (float)-Math.PI / 5); cameraObject = new GameObject(); cameraObject.AddComponent(new ComponentCamera(MathHelper.PiOver4, SystemCore.GraphicsDevice.Viewport.AspectRatio, 0.25f, 100.0f, false)); SystemCore.GameObjectManager.AddAndInitialiseGameObject(cameraObject); SystemCore.SetActiveCamera(cameraObject.GetComponent <ComponentCamera>()); cameraOffset = new Vector3(0, 10, -10); AddInputBindings(); SetUpGameWorld(); chopper = new Chopper(); chopper.Transform.SetPosition(new Vector3(10, 0.5f, 10)); SystemCore.GameObjectManager.AddAndInitialiseGameObject(chopper); chopper.Transform.Rotate(Vector3.Up, MathHelper.Pi); carrier = new Carrier(); carrier.Transform.SetPosition(new Vector3(5, 1, 5)); SystemCore.GameObjectManager.AddAndInitialiseGameObject(carrier); carrier.GetComponent <PhysicsComponent>().PhysicsEntity.IsAffectedByGravity = false; carrier.GetComponent <PhysicsComponent>().PhysicsEntity.Mass = 100; SystemCore.PhysicsSimulation.ForceUpdater.Gravity = new BEPUutilities.Vector3(0, -1f, 0); OrientCamera(chopper); base.OnInitialise(); }
private void OrientCamera(Chopper chopper) { Vector3 behindChopper = chopper.Transform.AbsoluteTransform.Backward; behindChopper.Y = 0; behindChopper *= 10f; behindChopper += new Vector3(0, 10, 0); //cameraOffset = behindChopper; cameraObject.Transform.SetPosition(chopper.Transform.AbsoluteTransform.Translation + cameraOffset); Vector3 forward = chopper.Transform.AbsoluteTransform.Translation - cameraObject.Transform.AbsoluteTransform.Translation; forward.Normalize(); Vector3 right = Vector3.Cross(forward, Vector3.Up); Vector3 newUp = Vector3.Cross(right, forward); cameraObject.Transform.SetLookAndUp(forward, newUp); }
public void TestChopperChopExecution() { //arrage //act //assert //For the assertion : -1 not found , else return index IChopper chopper = new Chopper(); //test against null array Assert.AreEqual(-1, chopper.chop(0, null)); Assert.AreEqual(-1, chopper.chop(3, new int[] { })); Assert.AreEqual(-1, chopper.chop(3, new int[] { 1 })); Assert.AreEqual(0, chopper.chop(1, new int[] { 1 })); // Assert.AreEqual(0, chopper.chop(1, new int[] { 1, 3, 5 })); Assert.AreEqual(1, chopper.chop(3, new int[] { 1, 3, 5 })); Assert.AreEqual(2, chopper.chop(5, new int[] { 1, 3, 5 })); }
/// <summary> /// Calculate the time it will take to complete the work /// </summary> /// <param name="truckTime">The amount of time trucking will take</param> /// <returns></returns> public double FinishTime(Chopper chopper, double truckTime) { double finishTime = 0; if (chopper.Speed > 0 && chopper.Width > 0 && chopper.Efficiency > 0) { if (chopper.Unit == UoM.Imperial) { finishTime = chopper.Acres / (chopper.Speed * chopper.Width / 8.25 * chopper.Efficiency / 100); } else { finishTime = chopper.Acres / (chopper.Speed * chopper.Width / 10 * chopper.Efficiency / 100); } } if (finishTime < truckTime) { finishTime = truckTime; } return finishTime; }
private void OnTriggerExit(Collider other) { Furniture f = other.gameObject.GetComponent <Furniture>(); if (f != null) { furnitures.Remove(f); if (f == current) { current.removeHighlight(); current = null; } Chopper chopper = f.GetComponent <Chopper>(); if (chopper != null) { chopper.stopChopping(); anim.SetBool("chopping", false); } } }
static void Execute() { string structPath = @"../../../ExportedPlansEclipse/spstudy_test_008/0Gy/RS.dcm"; string dosePath = @"../../../ExportedPlansEclipse/spstudy_test_008/0Gy/RD.dcm"; //define the number of slices desired in the x,y,z directions: int numCutsX = 2; int numCutY = 1; int numCutsZ = 2; int SSFactor = 4; //supersampling factors int SSFactorZ = 1; //First load the RT struct dicom file. Console.WriteLine("Reading Dicom Struct file..."); var structFile = DicomFile.Open(structPath).Dataset; //Get patient ID: string patientID = structFile.GetString(DicomTag.PatientID); //Get the desired ROI, and close all contours List <double[, ]> contoursTemp = DicomParsing.FindROI(structFile, "paro", true, true); string organName = DicomParsing.ROIName; //Chop it! List <List <double[, ]> > contours = Chopper.Chop(contoursTemp, numCutsX, numCutY, numCutsZ, organName); //Plot it! Console.WriteLine("Would you like to plot the chopped up ROI? (y/n)"); string input = Console.ReadLine(); input.ToLower(); if ((input == "y") || (input == "yes")) { ContourPlotting.Plot(contours); } //Now load a dose file. DicomDose.MeanDoses(contours, dosePath, patientID, SSFactor, SSFactorZ); Testing.RunTests(contours, organName); Console.WriteLine("Press any key to end the program."); Console.ReadLine(); }
public void GivenIHaveAChopper() { _chopper = new Chopper(); }
public void EmptyArray() { Assert.Equal(-1, Chopper.Chop(3, new int[] { })); }
public void ScriptEvent(Client sender, string eventName, object[] args) { if (eventName == "heligrab_requestGrab") { var chopperHandle = (NetHandle)args[0]; var right = (bool)args[1]; if (API.getEntityModel(chopperHandle) != (int)VehicleHash.Maverick) { return; } lock (Choppers) { // Player already hanging if (Choppers.Any(c => c.Hangers.Contains(sender))) { return; } var ourchopper = Choppers.FirstOrDefault(c => c.Vehicle == chopperHandle); if (ourchopper == null) { ourchopper = new Chopper(); ourchopper.Vehicle = chopperHandle; ourchopper.Hangers = new List <Client>(); } else { if (ourchopper.Hangers.Count >= 2) { return; } } ourchopper.Hangers.Add(sender); API.setEntityPosition(sender.handle, API.getEntityPosition(chopperHandle)); if (right) { API.attachEntityToEntity(sender.handle, chopperHandle, null, new Vector3(1.0402, 0.91039, -2.25), new Vector3(0, 0, 270)); } else { API.attachEntityToEntity(sender.handle, chopperHandle, null, new Vector3(-1.0402, 0.91039, -2.25), new Vector3(0, 0, 90)); } API.sleep(1000); API.playPlayerAnimation(sender, 1, "missfam1_yachtbattleonyacht02_", "onboom_twohand_hang_idle"); API.triggerClientEvent(sender, "heligrab_confirm", chopperHandle); if (right) { API.attachEntityToEntity(sender.handle, chopperHandle, null, new Vector3(1.0402, 0.91039, -2.25), new Vector3(0, 0, 270)); } else { API.attachEntityToEntity(sender.handle, chopperHandle, null, new Vector3(-1.0402, 0.91039, -2.25), new Vector3(0, 0, 90)); } } } else if (eventName == "heligrab_stop") { lock (Choppers) { var ourchopper = Choppers.FirstOrDefault(c => c.Hangers.Contains(sender)); if (ourchopper != null) { ourchopper.Hangers.Remove(sender); } } API.stopPlayerAnimation(sender); API.detachEntity(sender.handle, true); } }
public static void LoadContent(ContentManager content) { //TODO: Create Objects to include on set chooper = new Chopper(@"Texture\camo"); #region set do helicoptero List <Quad> heliBody = new List <Quad> { #region heli body new Quad(new Vector3(-0.50f, -0.00f, 1.50f), new Vector3(-0.50f, 0.20f, 1.50f), new Vector3(-0.70f, 0.20f, 1.50f), new Vector3(-0.70f, -0.00f, 1.50f) , ""), new Quad(new Vector3(-1.00f, 0.60f, -0.50f), new Vector3(-1.00f, 2.60f, -0.50f), new Vector3(1.00f, 2.60f, -0.50f), new Vector3(1.00f, 0.60f, -0.50f) , ""), new Quad(new Vector3(-0.70f, -0.00f, 1.50f), new Vector3(-0.70f, 0.20f, 1.50f), new Vector3(-0.70f, 0.20f, -0.50f), new Vector3(-0.70f, 0.00f, -0.50f) , ""), new Quad(new Vector3(-1.00f, 2.60f, 0.50f), new Vector3(1.00f, 2.60f, 0.50f), new Vector3(1.00f, 2.60f, -0.50f), new Vector3(-1.00f, 2.60f, -0.50f) , ""), new Quad(new Vector3(-0.50f, 0.20f, -0.30f), new Vector3(-0.70f, 0.20f, -0.30f), new Vector3(-0.70f, 0.60f, -0.30f), new Vector3(-0.50f, 0.60f, -0.30f) , ""), new Quad(new Vector3(-0.70f, 0.00f, -0.50f), new Vector3(-0.70f, 0.20f, -0.50f), new Vector3(-0.50f, 0.20f, -0.50f), new Vector3(-0.50f, 0.00f, -0.50f) , ""), new Quad(new Vector3(-0.50f, 0.00f, -0.50f), new Vector3(-0.50f, -0.00f, 1.50f), new Vector3(-0.70f, -0.00f, 1.50f), new Vector3(-0.70f, 0.00f, -0.50f) , ""), new Quad(new Vector3(-0.50f, -0.00f, 1.50f), new Vector3(-0.50f, 0.00f, -0.50f), new Vector3(-0.50f, 0.20f, -0.50f), new Vector3(-0.50f, 0.20f, 1.50f) , ""), new Quad(new Vector3(-0.50f, 0.20f, 1.50f), new Vector3(-0.50f, 0.20f, -0.50f), new Vector3(-0.70f, 0.20f, -0.50f), new Vector3(-0.70f, 0.20f, 1.50f) , ""), new Quad(new Vector3(-0.70f, 0.20f, 1.00f), new Vector3(-0.70f, 0.20f, 1.30f), new Vector3(-0.70f, 0.60f, 1.30f), new Vector3(-0.70f, 0.60f, 1.00f) , ""), new Quad(new Vector3(-0.09f, 0.62f, -3.50f), new Vector3(-0.09f, 1.58f, -3.50f), new Vector3(0.09f, 1.58f, -3.50f), new Vector3(0.09f, 0.62f, -3.50f) , ""), new Quad(new Vector3(0.30f, 0.80f, -0.50f), new Vector3(-0.30f, 0.80f, -0.50f), new Vector3(-0.09f, 0.80f, -2.50f), new Vector3(0.09f, 0.80f, -2.50f) , ""), new Quad(new Vector3(-0.30f, 0.80f, -0.50f), new Vector3(-0.30f, 1.40f, -0.50f), new Vector3(-0.09f, 1.40f, -2.50f), new Vector3(-0.09f, 0.80f, -2.50f) , ""), new Quad(new Vector3(-0.50f, 0.20f, 1.00f), new Vector3(-0.70f, 0.20f, 1.00f), new Vector3(-0.70f, 0.60f, 1.00f), new Vector3(-0.50f, 0.60f, 1.00f) , ""), new Quad(new Vector3(-0.50f, 0.20f, -0.00f), new Vector3(-0.50f, 0.20f, -0.30f), new Vector3(-0.50f, 0.60f, -0.30f), new Vector3(-0.50f, 0.60f, -0.00f) , ""), new Quad(new Vector3(-0.70f, 0.20f, -0.30f), new Vector3(-0.70f, 0.20f, -0.00f), new Vector3(-0.70f, 0.60f, -0.00f), new Vector3(-0.70f, 0.60f, -0.30f) , ""), new Quad(new Vector3(-0.50f, 0.20f, 1.30f), new Vector3(-0.50f, 0.20f, 1.00f), new Vector3(-0.50f, 0.60f, 1.00f), new Vector3(-0.50f, 0.60f, 1.30f) , ""), new Quad(new Vector3(-0.70f, 0.20f, -0.00f), new Vector3(-0.50f, 0.20f, -0.00f), new Vector3(-0.50f, 0.60f, -0.00f), new Vector3(-0.70f, 0.60f, -0.00f) , ""), new Quad(new Vector3(-0.70f, 0.20f, 1.30f), new Vector3(-0.50f, 0.20f, 1.30f), new Vector3(-0.50f, 0.60f, 1.30f), new Vector3(-0.70f, 0.60f, 1.30f) , ""), new Quad(new Vector3(1.00f, 0.60f, 1.50f), new Vector3(1.00f, 1.50f, 1.50f), new Vector3(-1.00f, 1.50f, 1.50f), new Vector3(-1.00f, 0.60f, 1.50f) , ""), new Quad(new Vector3(1.00f, 0.60f, 1.50f), new Vector3(-1.00f, 0.60f, 1.50f), new Vector3(-1.00f, 0.60f, -0.50f), new Vector3(1.00f, 0.60f, -0.50f) , ""), new Quad(new Vector3(-0.09f, 1.58f, -2.50f), new Vector3(0.09f, 1.58f, -2.50f), new Vector3(0.09f, 1.58f, -3.50f), new Vector3(-0.09f, 1.58f, -3.50f) , ""), new Quad(new Vector3(-0.09f, 0.62f, -2.50f), new Vector3(0.09f, 0.62f, -2.50f), new Vector3(0.09f, 1.58f, -2.50f), new Vector3(-0.09f, 1.58f, -2.50f) , ""), new Quad(new Vector3(-0.30f, 1.40f, -0.50f), new Vector3(0.30f, 1.40f, -0.50f), new Vector3(0.09f, 1.40f, -2.50f), new Vector3(-0.09f, 1.40f, -2.50f) , ""), new Quad(new Vector3(-0.09f, 0.80f, -3.30f), new Vector3(-0.09f, 0.80f, -2.70f), new Vector3(0.00f, 0.80f, -2.70f), new Vector3(0.00f, 0.80f, -3.30f) , ""), new Quad(new Vector3(0.09f, 0.62f, -2.50f), new Vector3(-0.09f, 0.62f, -2.50f), new Vector3(-0.09f, 0.62f, -3.50f), new Vector3(0.09f, 0.62f, -3.50f) , ""), new Quad(new Vector3(-0.09f, 1.40f, -2.70f), new Vector3(-0.09f, 0.80f, -2.70f), new Vector3(-0.09f, 0.62f, -2.50f), new Vector3(-0.09f, 1.58f, -2.50f) , ""), new Quad(new Vector3(-0.09f, 0.80f, -3.30f), new Vector3(-0.09f, 1.40f, -3.30f), new Vector3(-0.09f, 1.58f, -3.50f), new Vector3(-0.09f, 0.62f, -3.50f) , ""), new Quad(new Vector3(-0.09f, 0.80f, -2.70f), new Vector3(-0.09f, 0.80f, -3.30f), new Vector3(-0.09f, 0.62f, -3.50f), new Vector3(-0.09f, 0.62f, -2.50f) , ""), new Quad(new Vector3(-0.09f, 1.40f, -3.30f), new Vector3(-0.09f, 1.40f, -2.70f), new Vector3(-0.09f, 1.58f, -2.50f), new Vector3(-0.09f, 1.58f, -3.50f) , ""), new Quad(new Vector3(-0.09f, 0.80f, -2.70f), new Vector3(-0.09f, 1.40f, -2.70f), new Vector3(0.00f, 1.40f, -2.70f), new Vector3(0.00f, 0.80f, -2.70f) , ""), new Quad(new Vector3(-0.09f, 1.40f, -2.70f), new Vector3(-0.09f, 1.40f, -3.30f), new Vector3(0.00f, 1.40f, -3.30f), new Vector3(0.00f, 1.40f, -2.70f) , ""), new Quad(new Vector3(-0.09f, 1.40f, -3.30f), new Vector3(-0.09f, 0.80f, -3.30f), new Vector3(0.00f, 0.80f, -3.30f), new Vector3(0.00f, 1.40f, -3.30f) , ""), new Quad(new Vector3(0.50f, -0.00f, 1.50f), new Vector3(0.70f, -0.00f, 1.50f), new Vector3(0.70f, 0.20f, 1.50f), new Vector3(0.50f, 0.20f, 1.50f) , ""), new Quad(new Vector3(0.70f, -0.00f, 1.50f), new Vector3(0.70f, 0.00f, -0.50f), new Vector3(0.70f, 0.20f, -0.50f), new Vector3(0.70f, 0.20f, 1.50f) , ""), new Quad(new Vector3(0.50f, 0.20f, -0.30f), new Vector3(0.50f, 0.60f, -0.30f), new Vector3(0.70f, 0.60f, -0.30f), new Vector3(0.70f, 0.20f, -0.30f) , ""), new Quad(new Vector3(0.70f, 0.00f, -0.50f), new Vector3(0.50f, 0.00f, -0.50f), new Vector3(0.50f, 0.20f, -0.50f), new Vector3(0.70f, 0.20f, -0.50f) , ""), new Quad(new Vector3(0.50f, 0.00f, -0.50f), new Vector3(0.70f, 0.00f, -0.50f), new Vector3(0.70f, -0.00f, 1.50f), new Vector3(0.50f, -0.00f, 1.50f) , ""), new Quad(new Vector3(0.50f, -0.00f, 1.50f), new Vector3(0.50f, 0.20f, 1.50f), new Vector3(0.50f, 0.20f, -0.50f), new Vector3(0.50f, 0.00f, -0.50f) , ""), new Quad(new Vector3(0.50f, 0.20f, 1.50f), new Vector3(0.70f, 0.20f, 1.50f), new Vector3(0.70f, 0.20f, -0.50f), new Vector3(0.50f, 0.20f, -0.50f) , ""), new Quad(new Vector3(0.70f, 0.20f, 1.00f), new Vector3(0.70f, 0.60f, 1.00f), new Vector3(0.70f, 0.60f, 1.30f), new Vector3(0.70f, 0.20f, 1.30f) , ""), new Quad(new Vector3(0.30f, 0.80f, -0.50f), new Vector3(0.09f, 0.80f, -2.50f), new Vector3(0.09f, 1.40f, -2.50f), new Vector3(0.30f, 1.40f, -0.50f) , ""), new Quad(new Vector3(0.50f, 0.20f, 1.00f), new Vector3(0.50f, 0.60f, 1.00f), new Vector3(0.70f, 0.60f, 1.00f), new Vector3(0.70f, 0.20f, 1.00f) , ""), new Quad(new Vector3(0.50f, 0.20f, 0.00f), new Vector3(0.50f, 0.60f, 0.00f), new Vector3(0.50f, 0.60f, -0.30f), new Vector3(0.50f, 0.20f, -0.30f) , ""), new Quad(new Vector3(0.70f, 0.20f, -0.30f), new Vector3(0.70f, 0.60f, -0.30f), new Vector3(0.70f, 0.60f, 0.00f), new Vector3(0.70f, 0.20f, 0.00f) , ""), new Quad(new Vector3(0.50f, 0.20f, 1.30f), new Vector3(0.50f, 0.60f, 1.30f), new Vector3(0.50f, 0.60f, 1.00f), new Vector3(0.50f, 0.20f, 1.00f) , ""), new Quad(new Vector3(0.70f, 0.20f, 0.00f), new Vector3(0.70f, 0.60f, 0.00f), new Vector3(0.50f, 0.60f, 0.00f), new Vector3(0.50f, 0.20f, 0.00f) , ""), new Quad(new Vector3(0.70f, 0.20f, 1.30f), new Vector3(0.70f, 0.60f, 1.30f), new Vector3(0.50f, 0.60f, 1.30f), new Vector3(0.50f, 0.20f, 1.30f) , ""), new Quad(new Vector3(0.09f, 0.80f, -3.30f), new Vector3(0.00f, 0.80f, -3.30f), new Vector3(0.00f, 0.80f, -2.70f), new Vector3(0.09f, 0.80f, -2.70f) , ""), new Quad(new Vector3(0.09f, 1.40f, -2.70f), new Vector3(0.09f, 1.58f, -2.50f), new Vector3(0.09f, 0.62f, -2.50f), new Vector3(0.09f, 0.80f, -2.70f) , ""), new Quad(new Vector3(0.09f, 0.80f, -3.30f), new Vector3(0.09f, 0.62f, -3.50f), new Vector3(0.09f, 1.58f, -3.50f), new Vector3(0.09f, 1.40f, -3.30f) , ""), new Quad(new Vector3(0.09f, 0.80f, -2.70f), new Vector3(0.09f, 0.62f, -2.50f), new Vector3(0.09f, 0.62f, -3.50f), new Vector3(0.09f, 0.80f, -3.30f) , ""), new Quad(new Vector3(0.09f, 1.40f, -3.30f), new Vector3(0.09f, 1.58f, -3.50f), new Vector3(0.09f, 1.58f, -2.50f), new Vector3(0.09f, 1.40f, -2.70f) , ""), new Quad(new Vector3(0.09f, 0.80f, -2.70f), new Vector3(0.00f, 0.80f, -2.70f), new Vector3(0.00f, 1.40f, -2.70f), new Vector3(0.09f, 1.40f, -2.70f) , ""), new Quad(new Vector3(0.09f, 1.40f, -2.70f), new Vector3(0.00f, 1.40f, -2.70f), new Vector3(0.00f, 1.40f, -3.30f), new Vector3(0.09f, 1.40f, -3.30f) , ""), new Quad(new Vector3(0.09f, 1.40f, -3.30f), new Vector3(0.00f, 1.40f, -3.30f), new Vector3(0.00f, 0.80f, -3.30f), new Vector3(0.09f, 0.80f, -3.30f) , ""), new Quad(new Vector3(-1.00f, 0.60f, -0.50f), new Vector3(-1.00f, 0.60f, 1.50f), new Vector3(-1.00f, 1.50f, 1.50f), new Vector3(-1.00f, 1.50f, -0.50f) , ""), new Quad(new Vector3(1.00f, 1.50f, 1.50f), new Vector3(1.00f, 0.60f, 1.50f), new Vector3(1.00f, 0.60f, -0.50f), new Vector3(1.00f, 1.50f, -0.50f) , ""), #endregion }; List <Quad> glass = new List <Quad> { #region glass new Quad(new Vector3(-1.00f, 1.50f, 1.50f), new Vector3(-1.00f, 2.60f, 0.50f), new Vector3(-1.00f, 2.60f, -0.50f), new Vector3(-1.00f, 1.50f, -0.50f) , @"Texture\vidro"), new Quad(new Vector3(1.00f, 2.60f, 0.50f), new Vector3(-1.00f, 2.60f, 0.50f), new Vector3(-1.00f, 1.50f, 1.50f), new Vector3(1.00f, 1.50f, 1.50f) , @"Texture\vidro"), new Quad(new Vector3(1.00f, 2.60f, -0.50f), new Vector3(1.00f, 2.60f, 0.50f), new Vector3(1.00f, 1.50f, 1.50f), new Vector3(1.00f, 1.50f, -0.50f) , @"Texture\vidro"), #endregion }; List <Quad> heliMainBlade = new List <Quad> { #region main blade new Quad(new Vector3(0.06f, 0.10f, 0.06f), new Vector3(0.06f, 0.10f, -0.06f), new Vector3(0.06f, 0.20f, -0.06f), new Vector3(0.06f, 0.20f, 0.06f) , @"Texture\blade"), new Quad(new Vector3(-0.06f, -0.00f, -0.06f), new Vector3(-0.06f, 0.10f, -0.06f), new Vector3(0.06f, 0.10f, -0.06f), new Vector3(0.06f, -0.00f, -0.06f) , @"Texture\blade"), new Quad(new Vector3(-0.06f, -0.00f, 0.06f), new Vector3(-0.06f, 0.10f, 0.06f), new Vector3(-0.06f, 0.10f, -0.06f), new Vector3(-0.06f, -0.00f, -0.06f) , @"Texture\blade"), new Quad(new Vector3(0.06f, -0.00f, 0.06f), new Vector3(0.06f, 0.10f, 0.06f), new Vector3(-0.06f, 0.10f, 0.06f), new Vector3(-0.06f, -0.00f, 0.06f) , @"Texture\blade"), new Quad(new Vector3(0.06f, -0.00f, -0.06f), new Vector3(0.06f, 0.10f, -0.06f), new Vector3(0.06f, 0.10f, 0.06f), new Vector3(0.06f, -0.00f, 0.06f) , @"Texture\blade"), new Quad(new Vector3(-0.06f, 0.20f, 0.06f), new Vector3(0.06f, 0.20f, 0.06f), new Vector3(0.06f, 0.20f, -0.06f), new Vector3(-0.06f, 0.20f, -0.06f) , @"Texture\blade"), new Quad(new Vector3(0.06f, 0.10f, -0.06f), new Vector3(-0.06f, 0.10f, -0.06f), new Vector3(-0.06f, 0.20f, -0.06f), new Vector3(0.06f, 0.20f, -0.06f) , @"Texture\blade"), new Quad(new Vector3(-0.06f, 0.10f, 0.06f), new Vector3(0.06f, 0.10f, 0.06f), new Vector3(0.06f, 0.20f, 0.06f), new Vector3(-0.06f, 0.20f, 0.06f) , @"Texture\blade"), new Quad(new Vector3(-0.06f, 0.10f, -0.06f), new Vector3(-0.06f, 0.10f, 0.06f), new Vector3(-0.06f, 0.20f, 0.06f), new Vector3(-0.06f, 0.20f, -0.06f) , @"Texture\blade"), new Quad(new Vector3(-0.06f, 0.10f, 0.06f), new Vector3(-0.06f, 0.10f, -0.06f), new Vector3(-3.00f, 0.10f, -0.15f), new Vector3(-3.00f, 0.10f, 0.15f) , @"Texture\blade"), new Quad(new Vector3(-0.15f, 0.10f, -3.00f), new Vector3(-0.06f, 0.10f, -0.06f), new Vector3(0.06f, 0.10f, -0.06f), new Vector3(0.15f, 0.10f, -3.00f) , @"Texture\blade"), new Quad(new Vector3(0.06f, 0.10f, -0.06f), new Vector3(0.06f, 0.10f, 0.06f), new Vector3(3.00f, 0.10f, 0.15f), new Vector3(3.00f, 0.10f, -0.15f) , @"Texture\blade"), new Quad(new Vector3(0.15f, 0.10f, 3.00f), new Vector3(0.06f, 0.10f, 0.06f), new Vector3(-0.06f, 0.10f, 0.06f), new Vector3(-0.15f, 0.10f, 3.00f) , @"Texture\blade"), #endregion }; List <Quad> heliTailBlade = new List <Quad>() { #region tail blade new Quad(new Vector3(-0.03f, 0.02f, -0.02f), new Vector3(-0.03f, 0.02f, 0.02f), new Vector3(-0.03f, 0.20f, 0.04f), new Vector3(-0.03f, 0.20f, -0.04f) , @"Texture\blade"), new Quad(new Vector3(-0.03f, -0.02f, -0.02f), new Vector3(-0.03f, 0.02f, -0.02f), new Vector3(-0.03f, 0.04f, -0.20f), new Vector3(-0.03f, -0.04f, -0.20f) , @"Texture\blade"), new Quad(new Vector3(0.00f, 0.02f, 0.02f), new Vector3(0.00f, -0.02f, 0.02f), new Vector3(0.00f, -0.02f, -0.02f), new Vector3(0.00f, 0.02f, -0.02f) , @"Texture\blade"), new Quad(new Vector3(-0.03f, 0.02f, 0.02f), new Vector3(-0.03f, 0.02f, -0.02f), new Vector3(-0.06f, 0.02f, -0.02f), new Vector3(-0.06f, 0.02f, 0.02f) , @"Texture\blade"), new Quad(new Vector3(0.00f, -0.02f, -0.02f), new Vector3(-0.03f, -0.02f, -0.02f), new Vector3(-0.03f, 0.02f, -0.02f), new Vector3(0.00f, 0.02f, -0.02f) , @"Texture\blade"), new Quad(new Vector3(0.00f, -0.02f, 0.02f), new Vector3(-0.03f, -0.02f, 0.02f), new Vector3(-0.03f, -0.02f, -0.02f), new Vector3(0.00f, -0.02f, -0.02f) , @"Texture\blade"), new Quad(new Vector3(0.00f, 0.02f, 0.02f), new Vector3(-0.03f, 0.02f, 0.02f), new Vector3(-0.03f, -0.02f, 0.02f), new Vector3(0.00f, -0.02f, 0.02f) , @"Texture\blade"), new Quad(new Vector3(0.00f, 0.02f, -0.02f), new Vector3(-0.03f, 0.02f, -0.02f), new Vector3(-0.03f, 0.02f, 0.02f), new Vector3(0.00f, 0.02f, 0.02f) , @"Texture\blade"), new Quad(new Vector3(-0.03f, -0.02f, 0.02f), new Vector3(-0.03f, -0.02f, -0.02f), new Vector3(-0.03f, -0.20f, -0.04f), new Vector3(-0.03f, -0.20f, 0.04f) , @"Texture\blade"), new Quad(new Vector3(-0.03f, -0.02f, 0.02f), new Vector3(-0.03f, 0.02f, 0.02f), new Vector3(-0.03f, 0.04f, 0.20f), new Vector3(-0.03f, -0.04f, 0.20f) , @"Texture\blade"), new Quad(new Vector3(-0.06f, -0.02f, 0.02f), new Vector3(-0.06f, 0.02f, 0.02f), new Vector3(-0.06f, 0.02f, -0.02f), new Vector3(-0.06f, -0.02f, -0.02f) , @"Texture\blade"), new Quad(new Vector3(-0.03f, 0.02f, -0.02f), new Vector3(-0.03f, -0.02f, -0.02f), new Vector3(-0.06f, -0.02f, -0.02f), new Vector3(-0.06f, 0.02f, -0.02f) , @"Texture\blade"), new Quad(new Vector3(-0.03f, -0.02f, 0.02f), new Vector3(-0.03f, 0.02f, 0.02f), new Vector3(-0.06f, 0.02f, 0.02f), new Vector3(-0.06f, -0.02f, 0.02f) , @"Texture\blade"), new Quad(new Vector3(-0.03f, -0.02f, -0.02f), new Vector3(-0.03f, -0.02f, 0.02f), new Vector3(-0.06f, -0.02f, 0.02f), new Vector3(-0.06f, -0.02f, -0.02f) , @"Texture\blade"), #endregion }; chooper.AddQuads(heliBody); // adicionar a lista de poligonos chooper.AddQuads(glass); chooper.SetPosition(0, 1.5f, 0.5f); // setar posicao do helicoptero chooper.SetMainBlade(0, 4.1f, 0.5f, heliMainBlade); // adicionar helices e setar posicoes chooper.SetTailBlade(0, 2.6f, -2.5f, heliTailBlade); #endregion Obj casa = new Obj(@"Texture\Wall"); #region set da casa List <Quad> parede = new List <Quad> { #region paredes new Quad(new Vector3(-1.50f, 1.00f, 2.75f), new Vector3(-1.50f, 1.00f, 0.75f), new Vector3(-1.50f, 0.00f, 0.75f), new Vector3(-1.50f, 0.00f, 2.75f) , @"Texture\wall"), new Quad(new Vector3(-1.50f, 3.00f, -3.75f), new Vector3(-1.50f, 2.00f, -3.75f), new Vector3(-1.50f, 2.00f, 3.75f), new Vector3(-1.50f, 3.00f, 3.75f) , @"Texture\wall"), new Quad(new Vector3(-1.50f, 2.00f, -1.10f), new Vector3(-1.50f, 1.30f, -1.10f), new Vector3(-1.50f, 1.30f, 0.75f), new Vector3(-1.50f, 2.00f, 0.75f) , @"Texture\wall"), new Quad(new Vector3(-1.50f, 0.00f, -3.75f), new Vector3(-1.50f, 3.00f, -3.75f), new Vector3(1.30f, 3.00f, -3.75f), new Vector3(1.30f, 0.00f, -3.75f) , @"Texture\wall"), new Quad(new Vector3(-1.50f, 1.30f, -1.80f), new Vector3(-1.50f, 2.00f, -1.80f), new Vector3(-1.50f, 2.00f, -3.75f), new Vector3(-1.50f, 1.30f, -3.75f) , @"Texture\wall"), new Quad(new Vector3(-1.50f, 2.00f, 3.75f), new Vector3(-1.50f, 2.00f, 2.75f), new Vector3(-1.50f, 0.00f, 2.75f), new Vector3(-1.50f, 0.00f, 3.75f) , @"Texture\wall"), new Quad(new Vector3(-1.50f, 1.30f, 0.75f), new Vector3(-1.50f, 1.30f, -3.75f), new Vector3(-1.50f, 0.00f, -3.75f), new Vector3(-1.50f, 0.00f, 0.75f) , @"Texture\wall"), new Quad(new Vector3(0.51f, 2.00f, 3.75f), new Vector3(0.51f, 0.00f, 3.75f), new Vector3(1.30f, 0.00f, 3.75f), new Vector3(1.30f, 2.00f, 3.75f) , @"Texture\wall"), new Quad(new Vector3(1.30f, 3.00f, 3.75f), new Vector3(-1.50f, 3.00f, 3.75f), new Vector3(-1.50f, 2.00f, 3.75f), new Vector3(1.30f, 2.00f, 3.75f) , @"Texture\wall"), new Quad(new Vector3(-1.50f, 0.00f, 3.75f), new Vector3(-0.79f, 0.00f, 3.75f), new Vector3(-0.79f, 1.99f, 3.75f), new Vector3(-1.50f, 2.00f, 3.75f) , @"Texture\wall"), new Quad(new Vector3(1.30f, 1.80f, 1.40f), new Vector3(1.30f, 1.80f, -1.10f), new Vector3(1.30f, 2.00f, -1.10f), new Vector3(1.30f, 2.00f, 1.40f) , @"Texture\wall"), new Quad(new Vector3(1.30f, 1.80f, 1.40f), new Vector3(1.30f, 0.00f, 1.40f), new Vector3(1.30f, 0.00f, -1.80f), new Vector3(1.30f, 1.80f, -1.80f) , @"Texture\wall"), new Quad(new Vector3(1.30f, 0.00f, 2.10f), new Vector3(1.30f, 0.00f, 1.40f), new Vector3(1.30f, 1.30f, 1.40f), new Vector3(1.30f, 1.30f, 2.10f) , @"Texture\wall"), new Quad(new Vector3(1.30f, 2.00f, -1.80f), new Vector3(1.30f, 0.00f, -1.80f), new Vector3(1.30f, 0.00f, -3.75f), new Vector3(1.30f, 2.00f, -3.75f) , @"Texture\wall"), new Quad(new Vector3(1.30f, 3.00f, 3.75f), new Vector3(1.30f, 2.00f, 3.75f), new Vector3(1.30f, 2.00f, -3.75f), new Vector3(1.30f, 3.00f, -3.75f) , @"Texture\wall"), new Quad(new Vector3(1.30f, 2.00f, 2.10f), new Vector3(1.30f, 2.00f, 3.75f), new Vector3(1.30f, 0.00f, 3.75f), new Vector3(1.30f, 0.00f, 2.10f) , @"Texture\wall"), #endregion }; Quad teto = new Quad(new Vector3(1.30f, 3.00f, -3.75f), new Vector3(-1.50f, 3.00f, -3.75f), new Vector3(-1.50f, 3.00f, 3.75f), new Vector3(1.30f, 3.00f, 3.75f) , @"Texture\helo"); List <Quad> misc = new List <Quad> { #region misc new Quad(new Vector3(1.30f, 1.80f, -1.10f), new Vector3(1.30f, 1.80f, -1.80f), new Vector3(1.30f, 2.00f, -1.80f), new Vector3(1.30f, 2.00f, -1.10f) , @"Texture\wood"), new Quad(new Vector3(1.30f, 1.30f, 2.10f), new Vector3(1.30f, 1.30f, 1.40f), new Vector3(1.30f, 2.00f, 1.40f), new Vector3(1.30f, 2.00f, 2.10f) , @"Texture\wood"), new Quad(new Vector3(-1.50f, 2.00f, 1.75f), new Vector3(-1.50f, 2.00f, 0.75f), new Vector3(-1.50f, 1.00f, 0.75f), new Vector3(-1.50f, 1.00f, 1.75f) , @"Texture\wood"), new Quad(new Vector3(-1.50f, 2.00f, -1.80f), new Vector3(-1.50f, 1.30f, -1.80f), new Vector3(-1.50f, 1.30f, -1.10f), new Vector3(-1.50f, 2.00f, -1.10f) , @"Texture\wood"), new Quad(new Vector3(-1.50f, 1.00f, 1.75f), new Vector3(-1.50f, 1.00f, 2.75f), new Vector3(-1.50f, 2.00f, 2.75f), new Vector3(-1.50f, 2.00f, 1.75f) , @"Texture\wood"), new Quad(new Vector3(-0.79f, 1.99f, 3.75f), new Vector3(-0.79f, -0.01f, 3.75f), new Vector3(0.51f, -0.01f, 3.75f), new Vector3(0.51f, 1.99f, 3.75f) , @"Texture\wood"), #endregion }; #endregion parede.Add(teto); casa.AddQuads(misc); casa.AddQuads(parede); casa.SetPosition(0, -1.5f, 0); Obj chao = new Obj(@"Texture\Ground", #region set do chao new List <Quad> { new Quad( new Vector3(8.5f, 0, -9), new Vector3(8.5f, 0, 9), new Vector3(-8.5f, 0, 9), new Vector3(-8.5f, 0, -9), "") } ); chao.SetPosition(0, -1.6f, 0); chao.Rotate(Vector3.Up, MathHelper.ToRadians(180)); #endregion //TODO: Create sets //TODO: Include objects on set List <Obj> pimba = new List <Obj> { chooper, chao, casa }; //TODO: Create scenes //TODO: Insert the set of objects on scene actualScene = new Scene(pimba, "Cena 1"); //TODO: add the scences scenes = new List <Scene>(); scenes.Add(actualScene); }
public static void ReturnChopper(Chopper chopper) { Instance.choppers.ReturnToParent(chopper); }
public static void LoadContent(ContentManager content) { freeCamera = new CameraFree(Vector3.Backward * 20, Vector3.Zero); chopCamera = new CameraChopper(new Vector3(-1.6f, 3, 4.5f), Vector3.Forward * 10); actualCamera = freeCamera; //TODO: Create Objects to include on set chooper = new Chopper(@"Texture\camo", @"Texture\camo_snow"); #region set do helicoptero List <Quad> heliBody = new List <Quad> { #region heli body new Quad(new Vector3(-0.50f, -0.00f, 1.50f), new Vector3(-0.50f, 0.20f, 1.50f), new Vector3(-0.70f, 0.20f, 1.50f), new Vector3(-0.70f, -0.00f, 1.50f) , ""), new Quad(new Vector3(-1.00f, 0.60f, -0.50f), new Vector3(-1.00f, 2.60f, -0.50f), new Vector3(1.00f, 2.60f, -0.50f), new Vector3(1.00f, 0.60f, -0.50f) , ""), new Quad(new Vector3(-0.70f, -0.00f, 1.50f), new Vector3(-0.70f, 0.20f, 1.50f), new Vector3(-0.70f, 0.20f, -0.50f), new Vector3(-0.70f, 0.00f, -0.50f) , ""), new Quad(new Vector3(-1.00f, 2.60f, 0.50f), new Vector3(1.00f, 2.60f, 0.50f), new Vector3(1.00f, 2.60f, -0.50f), new Vector3(-1.00f, 2.60f, -0.50f) , ""), new Quad(new Vector3(-0.50f, 0.20f, -0.30f), new Vector3(-0.70f, 0.20f, -0.30f), new Vector3(-0.70f, 0.60f, -0.30f), new Vector3(-0.50f, 0.60f, -0.30f) , ""), new Quad(new Vector3(-0.70f, 0.00f, -0.50f), new Vector3(-0.70f, 0.20f, -0.50f), new Vector3(-0.50f, 0.20f, -0.50f), new Vector3(-0.50f, 0.00f, -0.50f) , ""), new Quad(new Vector3(-0.50f, 0.00f, -0.50f), new Vector3(-0.50f, -0.00f, 1.50f), new Vector3(-0.70f, -0.00f, 1.50f), new Vector3(-0.70f, 0.00f, -0.50f) , ""), new Quad(new Vector3(-0.50f, -0.00f, 1.50f), new Vector3(-0.50f, 0.00f, -0.50f), new Vector3(-0.50f, 0.20f, -0.50f), new Vector3(-0.50f, 0.20f, 1.50f) , ""), new Quad(new Vector3(-0.50f, 0.20f, 1.50f), new Vector3(-0.50f, 0.20f, -0.50f), new Vector3(-0.70f, 0.20f, -0.50f), new Vector3(-0.70f, 0.20f, 1.50f) , ""), new Quad(new Vector3(-0.70f, 0.20f, 1.00f), new Vector3(-0.70f, 0.20f, 1.30f), new Vector3(-0.70f, 0.60f, 1.30f), new Vector3(-0.70f, 0.60f, 1.00f) , ""), new Quad(new Vector3(-0.09f, 0.62f, -3.50f), new Vector3(-0.09f, 1.58f, -3.50f), new Vector3(0.09f, 1.58f, -3.50f), new Vector3(0.09f, 0.62f, -3.50f) , ""), new Quad(new Vector3(0.30f, 0.80f, -0.50f), new Vector3(-0.30f, 0.80f, -0.50f), new Vector3(-0.09f, 0.80f, -2.50f), new Vector3(0.09f, 0.80f, -2.50f) , ""), new Quad(new Vector3(-0.30f, 0.80f, -0.50f), new Vector3(-0.30f, 1.40f, -0.50f), new Vector3(-0.09f, 1.40f, -2.50f), new Vector3(-0.09f, 0.80f, -2.50f) , ""), new Quad(new Vector3(-0.50f, 0.20f, 1.00f), new Vector3(-0.70f, 0.20f, 1.00f), new Vector3(-0.70f, 0.60f, 1.00f), new Vector3(-0.50f, 0.60f, 1.00f) , ""), new Quad(new Vector3(-0.50f, 0.20f, -0.00f), new Vector3(-0.50f, 0.20f, -0.30f), new Vector3(-0.50f, 0.60f, -0.30f), new Vector3(-0.50f, 0.60f, -0.00f) , ""), new Quad(new Vector3(-0.70f, 0.20f, -0.30f), new Vector3(-0.70f, 0.20f, -0.00f), new Vector3(-0.70f, 0.60f, -0.00f), new Vector3(-0.70f, 0.60f, -0.30f) , ""), new Quad(new Vector3(-0.50f, 0.20f, 1.30f), new Vector3(-0.50f, 0.20f, 1.00f), new Vector3(-0.50f, 0.60f, 1.00f), new Vector3(-0.50f, 0.60f, 1.30f) , ""), new Quad(new Vector3(-0.70f, 0.20f, -0.00f), new Vector3(-0.50f, 0.20f, -0.00f), new Vector3(-0.50f, 0.60f, -0.00f), new Vector3(-0.70f, 0.60f, -0.00f) , ""), new Quad(new Vector3(-0.70f, 0.20f, 1.30f), new Vector3(-0.50f, 0.20f, 1.30f), new Vector3(-0.50f, 0.60f, 1.30f), new Vector3(-0.70f, 0.60f, 1.30f) , ""), new Quad(new Vector3(1.00f, 0.60f, 1.50f), new Vector3(1.00f, 1.50f, 1.50f), new Vector3(-1.00f, 1.50f, 1.50f), new Vector3(-1.00f, 0.60f, 1.50f) , ""), new Quad(new Vector3(1.00f, 0.60f, 1.50f), new Vector3(-1.00f, 0.60f, 1.50f), new Vector3(-1.00f, 0.60f, -0.50f), new Vector3(1.00f, 0.60f, -0.50f) , ""), new Quad(new Vector3(-0.09f, 1.58f, -2.50f), new Vector3(0.09f, 1.58f, -2.50f), new Vector3(0.09f, 1.58f, -3.50f), new Vector3(-0.09f, 1.58f, -3.50f) , ""), new Quad(new Vector3(-0.09f, 0.62f, -2.50f), new Vector3(0.09f, 0.62f, -2.50f), new Vector3(0.09f, 1.58f, -2.50f), new Vector3(-0.09f, 1.58f, -2.50f) , ""), new Quad(new Vector3(-0.30f, 1.40f, -0.50f), new Vector3(0.30f, 1.40f, -0.50f), new Vector3(0.09f, 1.40f, -2.50f), new Vector3(-0.09f, 1.40f, -2.50f) , ""), new Quad(new Vector3(-0.09f, 0.80f, -3.30f), new Vector3(-0.09f, 0.80f, -2.70f), new Vector3(0.00f, 0.80f, -2.70f), new Vector3(0.00f, 0.80f, -3.30f) , ""), new Quad(new Vector3(0.09f, 0.62f, -2.50f), new Vector3(-0.09f, 0.62f, -2.50f), new Vector3(-0.09f, 0.62f, -3.50f), new Vector3(0.09f, 0.62f, -3.50f) , ""), new Quad(new Vector3(-0.09f, 1.40f, -2.70f), new Vector3(-0.09f, 0.80f, -2.70f), new Vector3(-0.09f, 0.62f, -2.50f), new Vector3(-0.09f, 1.58f, -2.50f) , ""), new Quad(new Vector3(-0.09f, 0.80f, -3.30f), new Vector3(-0.09f, 1.40f, -3.30f), new Vector3(-0.09f, 1.58f, -3.50f), new Vector3(-0.09f, 0.62f, -3.50f) , ""), new Quad(new Vector3(-0.09f, 0.80f, -2.70f), new Vector3(-0.09f, 0.80f, -3.30f), new Vector3(-0.09f, 0.62f, -3.50f), new Vector3(-0.09f, 0.62f, -2.50f) , ""), new Quad(new Vector3(-0.09f, 1.40f, -3.30f), new Vector3(-0.09f, 1.40f, -2.70f), new Vector3(-0.09f, 1.58f, -2.50f), new Vector3(-0.09f, 1.58f, -3.50f) , ""), new Quad(new Vector3(-0.09f, 0.80f, -2.70f), new Vector3(-0.09f, 1.40f, -2.70f), new Vector3(0.00f, 1.40f, -2.70f), new Vector3(0.00f, 0.80f, -2.70f) , ""), new Quad(new Vector3(-0.09f, 1.40f, -2.70f), new Vector3(-0.09f, 1.40f, -3.30f), new Vector3(0.00f, 1.40f, -3.30f), new Vector3(0.00f, 1.40f, -2.70f) , ""), new Quad(new Vector3(-0.09f, 1.40f, -3.30f), new Vector3(-0.09f, 0.80f, -3.30f), new Vector3(0.00f, 0.80f, -3.30f), new Vector3(0.00f, 1.40f, -3.30f) , ""), new Quad(new Vector3(0.50f, -0.00f, 1.50f), new Vector3(0.70f, -0.00f, 1.50f), new Vector3(0.70f, 0.20f, 1.50f), new Vector3(0.50f, 0.20f, 1.50f) , ""), new Quad(new Vector3(0.70f, -0.00f, 1.50f), new Vector3(0.70f, 0.00f, -0.50f), new Vector3(0.70f, 0.20f, -0.50f), new Vector3(0.70f, 0.20f, 1.50f) , ""), new Quad(new Vector3(0.50f, 0.20f, -0.30f), new Vector3(0.50f, 0.60f, -0.30f), new Vector3(0.70f, 0.60f, -0.30f), new Vector3(0.70f, 0.20f, -0.30f) , ""), new Quad(new Vector3(0.70f, 0.00f, -0.50f), new Vector3(0.50f, 0.00f, -0.50f), new Vector3(0.50f, 0.20f, -0.50f), new Vector3(0.70f, 0.20f, -0.50f) , ""), new Quad(new Vector3(0.50f, 0.00f, -0.50f), new Vector3(0.70f, 0.00f, -0.50f), new Vector3(0.70f, -0.00f, 1.50f), new Vector3(0.50f, -0.00f, 1.50f) , ""), new Quad(new Vector3(0.50f, -0.00f, 1.50f), new Vector3(0.50f, 0.20f, 1.50f), new Vector3(0.50f, 0.20f, -0.50f), new Vector3(0.50f, 0.00f, -0.50f) , ""), new Quad(new Vector3(0.50f, 0.20f, 1.50f), new Vector3(0.70f, 0.20f, 1.50f), new Vector3(0.70f, 0.20f, -0.50f), new Vector3(0.50f, 0.20f, -0.50f) , ""), new Quad(new Vector3(0.70f, 0.20f, 1.00f), new Vector3(0.70f, 0.60f, 1.00f), new Vector3(0.70f, 0.60f, 1.30f), new Vector3(0.70f, 0.20f, 1.30f) , ""), new Quad(new Vector3(0.30f, 0.80f, -0.50f), new Vector3(0.09f, 0.80f, -2.50f), new Vector3(0.09f, 1.40f, -2.50f), new Vector3(0.30f, 1.40f, -0.50f) , ""), new Quad(new Vector3(0.50f, 0.20f, 1.00f), new Vector3(0.50f, 0.60f, 1.00f), new Vector3(0.70f, 0.60f, 1.00f), new Vector3(0.70f, 0.20f, 1.00f) , ""), new Quad(new Vector3(0.50f, 0.20f, 0.00f), new Vector3(0.50f, 0.60f, 0.00f), new Vector3(0.50f, 0.60f, -0.30f), new Vector3(0.50f, 0.20f, -0.30f) , ""), new Quad(new Vector3(0.70f, 0.20f, -0.30f), new Vector3(0.70f, 0.60f, -0.30f), new Vector3(0.70f, 0.60f, 0.00f), new Vector3(0.70f, 0.20f, 0.00f) , ""), new Quad(new Vector3(0.50f, 0.20f, 1.30f), new Vector3(0.50f, 0.60f, 1.30f), new Vector3(0.50f, 0.60f, 1.00f), new Vector3(0.50f, 0.20f, 1.00f) , ""), new Quad(new Vector3(0.70f, 0.20f, 0.00f), new Vector3(0.70f, 0.60f, 0.00f), new Vector3(0.50f, 0.60f, 0.00f), new Vector3(0.50f, 0.20f, 0.00f) , ""), new Quad(new Vector3(0.70f, 0.20f, 1.30f), new Vector3(0.70f, 0.60f, 1.30f), new Vector3(0.50f, 0.60f, 1.30f), new Vector3(0.50f, 0.20f, 1.30f) , ""), new Quad(new Vector3(0.09f, 0.80f, -3.30f), new Vector3(0.00f, 0.80f, -3.30f), new Vector3(0.00f, 0.80f, -2.70f), new Vector3(0.09f, 0.80f, -2.70f) , ""), new Quad(new Vector3(0.09f, 1.40f, -2.70f), new Vector3(0.09f, 1.58f, -2.50f), new Vector3(0.09f, 0.62f, -2.50f), new Vector3(0.09f, 0.80f, -2.70f) , ""), new Quad(new Vector3(0.09f, 0.80f, -3.30f), new Vector3(0.09f, 0.62f, -3.50f), new Vector3(0.09f, 1.58f, -3.50f), new Vector3(0.09f, 1.40f, -3.30f) , ""), new Quad(new Vector3(0.09f, 0.80f, -2.70f), new Vector3(0.09f, 0.62f, -2.50f), new Vector3(0.09f, 0.62f, -3.50f), new Vector3(0.09f, 0.80f, -3.30f) , ""), new Quad(new Vector3(0.09f, 1.40f, -3.30f), new Vector3(0.09f, 1.58f, -3.50f), new Vector3(0.09f, 1.58f, -2.50f), new Vector3(0.09f, 1.40f, -2.70f) , ""), new Quad(new Vector3(0.09f, 0.80f, -2.70f), new Vector3(0.00f, 0.80f, -2.70f), new Vector3(0.00f, 1.40f, -2.70f), new Vector3(0.09f, 1.40f, -2.70f) , ""), new Quad(new Vector3(0.09f, 1.40f, -2.70f), new Vector3(0.00f, 1.40f, -2.70f), new Vector3(0.00f, 1.40f, -3.30f), new Vector3(0.09f, 1.40f, -3.30f) , ""), new Quad(new Vector3(0.09f, 1.40f, -3.30f), new Vector3(0.00f, 1.40f, -3.30f), new Vector3(0.00f, 0.80f, -3.30f), new Vector3(0.09f, 0.80f, -3.30f) , ""), new Quad(new Vector3(-1.00f, 0.60f, -0.50f), new Vector3(-1.00f, 0.60f, 1.50f), new Vector3(-1.00f, 1.50f, 1.50f), new Vector3(-1.00f, 1.50f, -0.50f) , ""), new Quad(new Vector3(1.00f, 1.50f, 1.50f), new Vector3(1.00f, 0.60f, 1.50f), new Vector3(1.00f, 0.60f, -0.50f), new Vector3(1.00f, 1.50f, -0.50f) , ""), #endregion }; List <Quad> glass = new List <Quad> { #region glass new Quad(new Vector3(-1.00f, 1.50f, 1.50f), new Vector3(-1.00f, 2.60f, 0.50f), new Vector3(-1.00f, 2.60f, -0.50f), new Vector3(-1.00f, 1.50f, -0.50f) , @"Texture\vidro", @"Texture\vidro_snow"), new Quad(new Vector3(1.00f, 2.60f, 0.50f), new Vector3(-1.00f, 2.60f, 0.50f), new Vector3(-1.00f, 1.50f, 1.50f), new Vector3(1.00f, 1.50f, 1.50f) , @"Texture\vidro", @"Texture\vidro_snow"), new Quad(new Vector3(1.00f, 2.60f, -0.50f), new Vector3(1.00f, 2.60f, 0.50f), new Vector3(1.00f, 1.50f, 1.50f), new Vector3(1.00f, 1.50f, -0.50f) , @"Texture\vidro", @"Texture\vidro_snow"), #endregion }; List <Quad> heliMainBlade = new List <Quad> { #region main blade new Quad(new Vector3(0.06f, 0.10f, 0.06f), new Vector3(0.06f, 0.10f, -0.06f), new Vector3(0.06f, 0.20f, -0.06f), new Vector3(0.06f, 0.20f, 0.06f) , @"Texture\blade", @"Texture\blade_snow"), new Quad(new Vector3(-0.06f, -0.00f, -0.06f), new Vector3(-0.06f, 0.10f, -0.06f), new Vector3(0.06f, 0.10f, -0.06f), new Vector3(0.06f, -0.00f, -0.06f) , @"Texture\blade", @"Texture\blade_snow"), new Quad(new Vector3(-0.06f, -0.00f, 0.06f), new Vector3(-0.06f, 0.10f, 0.06f), new Vector3(-0.06f, 0.10f, -0.06f), new Vector3(-0.06f, -0.00f, -0.06f) , @"Texture\blade", @"Texture\blade_snow"), new Quad(new Vector3(0.06f, -0.00f, 0.06f), new Vector3(0.06f, 0.10f, 0.06f), new Vector3(-0.06f, 0.10f, 0.06f), new Vector3(-0.06f, -0.00f, 0.06f) , @"Texture\blade", @"Texture\blade_snow"), new Quad(new Vector3(0.06f, -0.00f, -0.06f), new Vector3(0.06f, 0.10f, -0.06f), new Vector3(0.06f, 0.10f, 0.06f), new Vector3(0.06f, -0.00f, 0.06f) , @"Texture\blade", @"Texture\blade_snow"), new Quad(new Vector3(-0.06f, 0.20f, 0.06f), new Vector3(0.06f, 0.20f, 0.06f), new Vector3(0.06f, 0.20f, -0.06f), new Vector3(-0.06f, 0.20f, -0.06f) , @"Texture\blade", @"Texture\blade_snow"), new Quad(new Vector3(0.06f, 0.10f, -0.06f), new Vector3(-0.06f, 0.10f, -0.06f), new Vector3(-0.06f, 0.20f, -0.06f), new Vector3(0.06f, 0.20f, -0.06f) , @"Texture\blade", @"Texture\blade_snow"), new Quad(new Vector3(-0.06f, 0.10f, 0.06f), new Vector3(0.06f, 0.10f, 0.06f), new Vector3(0.06f, 0.20f, 0.06f), new Vector3(-0.06f, 0.20f, 0.06f) , @"Texture\blade", @"Texture\blade_snow"), new Quad(new Vector3(-0.06f, 0.10f, -0.06f), new Vector3(-0.06f, 0.10f, 0.06f), new Vector3(-0.06f, 0.20f, 0.06f), new Vector3(-0.06f, 0.20f, -0.06f) , @"Texture\blade", @"Texture\blade_snow"), new Quad(new Vector3(-0.06f, 0.10f, 0.06f), new Vector3(-0.06f, 0.10f, -0.06f), new Vector3(-3.00f, 0.10f, -0.15f), new Vector3(-3.00f, 0.10f, 0.15f) , @"Texture\blade", @"Texture\blade_snow"), new Quad(new Vector3(-0.15f, 0.10f, -3.00f), new Vector3(-0.06f, 0.10f, -0.06f), new Vector3(0.06f, 0.10f, -0.06f), new Vector3(0.15f, 0.10f, -3.00f) , @"Texture\blade", @"Texture\blade_snow"), new Quad(new Vector3(0.06f, 0.10f, -0.06f), new Vector3(0.06f, 0.10f, 0.06f), new Vector3(3.00f, 0.10f, 0.15f), new Vector3(3.00f, 0.10f, -0.15f) , @"Texture\blade", @"Texture\blade_snow"), new Quad(new Vector3(0.15f, 0.10f, 3.00f), new Vector3(0.06f, 0.10f, 0.06f), new Vector3(-0.06f, 0.10f, 0.06f), new Vector3(-0.15f, 0.10f, 3.00f) , @"Texture\blade", @"Texture\blade_snow"), #endregion }; List <Quad> heliTailBlade = new List <Quad>() { #region tail blade new Quad(new Vector3(-0.03f, 0.02f, -0.02f), new Vector3(-0.03f, 0.02f, 0.02f), new Vector3(-0.03f, 0.20f, 0.04f), new Vector3(-0.03f, 0.20f, -0.04f) , @"Texture\blade", @"Texture\blade_snow"), new Quad(new Vector3(-0.03f, -0.02f, -0.02f), new Vector3(-0.03f, 0.02f, -0.02f), new Vector3(-0.03f, 0.04f, -0.20f), new Vector3(-0.03f, -0.04f, -0.20f) , @"Texture\blade", @"Texture\blade_snow"), new Quad(new Vector3(0.00f, 0.02f, 0.02f), new Vector3(0.00f, -0.02f, 0.02f), new Vector3(0.00f, -0.02f, -0.02f), new Vector3(0.00f, 0.02f, -0.02f) , @"Texture\blade", @"Texture\blade_snow"), new Quad(new Vector3(-0.03f, 0.02f, 0.02f), new Vector3(-0.03f, 0.02f, -0.02f), new Vector3(-0.06f, 0.02f, -0.02f), new Vector3(-0.06f, 0.02f, 0.02f) , @"Texture\blade", @"Texture\blade_snow"), new Quad(new Vector3(0.00f, -0.02f, -0.02f), new Vector3(-0.03f, -0.02f, -0.02f), new Vector3(-0.03f, 0.02f, -0.02f), new Vector3(0.00f, 0.02f, -0.02f) , @"Texture\blade", @"Texture\blade_snow"), new Quad(new Vector3(0.00f, -0.02f, 0.02f), new Vector3(-0.03f, -0.02f, 0.02f), new Vector3(-0.03f, -0.02f, -0.02f), new Vector3(0.00f, -0.02f, -0.02f) , @"Texture\blade", @"Texture\blade_snow"), new Quad(new Vector3(0.00f, 0.02f, 0.02f), new Vector3(-0.03f, 0.02f, 0.02f), new Vector3(-0.03f, -0.02f, 0.02f), new Vector3(0.00f, -0.02f, 0.02f) , @"Texture\blade", @"Texture\blade_snow"), new Quad(new Vector3(0.00f, 0.02f, -0.02f), new Vector3(-0.03f, 0.02f, -0.02f), new Vector3(-0.03f, 0.02f, 0.02f), new Vector3(0.00f, 0.02f, 0.02f) , @"Texture\blade", @"Texture\blade_snow"), new Quad(new Vector3(-0.03f, -0.02f, 0.02f), new Vector3(-0.03f, -0.02f, -0.02f), new Vector3(-0.03f, -0.20f, -0.04f), new Vector3(-0.03f, -0.20f, 0.04f) , @"Texture\blade", @"Texture\blade_snow"), new Quad(new Vector3(-0.03f, -0.02f, 0.02f), new Vector3(-0.03f, 0.02f, 0.02f), new Vector3(-0.03f, 0.04f, 0.20f), new Vector3(-0.03f, -0.04f, 0.20f) , @"Texture\blade", @"Texture\blade_snow"), new Quad(new Vector3(-0.06f, -0.02f, 0.02f), new Vector3(-0.06f, 0.02f, 0.02f), new Vector3(-0.06f, 0.02f, -0.02f), new Vector3(-0.06f, -0.02f, -0.02f) , @"Texture\blade", @"Texture\blade_snow"), new Quad(new Vector3(-0.03f, 0.02f, -0.02f), new Vector3(-0.03f, -0.02f, -0.02f), new Vector3(-0.06f, -0.02f, -0.02f), new Vector3(-0.06f, 0.02f, -0.02f) , @"Texture\blade", @"Texture\blade_snow"), new Quad(new Vector3(-0.03f, -0.02f, 0.02f), new Vector3(-0.03f, 0.02f, 0.02f), new Vector3(-0.06f, 0.02f, 0.02f), new Vector3(-0.06f, -0.02f, 0.02f) , @"Texture\blade", @"Texture\blade_snow"), new Quad(new Vector3(-0.03f, -0.02f, -0.02f), new Vector3(-0.03f, -0.02f, 0.02f), new Vector3(-0.06f, -0.02f, 0.02f), new Vector3(-0.06f, -0.02f, -0.02f) , @"Texture\blade", @"Texture\blade_snow"), #endregion }; chooper.AddQuads(heliBody); // adicionar a lista de poligonos chooper.AddQuads(glass); chooper.SetPosition(0, 1.5f, 0.5f); // setar posicao do helicoptero chooper.SetMainBlade(0, 4.1f, 0.5f, heliMainBlade); // adicionar helices e setar posicoes chooper.SetTailBlade(0, 2.6f, -2.5f, heliTailBlade); #endregion Obj casa = new Obj(@"Texture\Wall", @"Texture\wall_snow"); #region set da casa List <Quad> parede = new List <Quad> { #region paredes new Quad(new Vector3(-1.50f, 1.00f, 2.75f), new Vector3(-1.50f, 1.00f, 0.75f), new Vector3(-1.50f, 0.00f, 0.75f), new Vector3(-1.50f, 0.00f, 2.75f) , @"Texture\wall"), new Quad(new Vector3(-1.50f, 3.00f, -3.75f), new Vector3(-1.50f, 2.00f, -3.75f), new Vector3(-1.50f, 2.00f, 3.75f), new Vector3(-1.50f, 3.00f, 3.75f) , @"Texture\wall"), new Quad(new Vector3(-1.50f, 2.00f, -1.10f), new Vector3(-1.50f, 1.30f, -1.10f), new Vector3(-1.50f, 1.30f, 0.75f), new Vector3(-1.50f, 2.00f, 0.75f) , @"Texture\wall"), new Quad(new Vector3(-1.50f, 0.00f, -3.75f), new Vector3(-1.50f, 3.00f, -3.75f), new Vector3(1.30f, 3.00f, -3.75f), new Vector3(1.30f, 0.00f, -3.75f) , @"Texture\wall"), new Quad(new Vector3(-1.50f, 1.30f, -1.80f), new Vector3(-1.50f, 2.00f, -1.80f), new Vector3(-1.50f, 2.00f, -3.75f), new Vector3(-1.50f, 1.30f, -3.75f) , @"Texture\wall"), new Quad(new Vector3(-1.50f, 2.00f, 3.75f), new Vector3(-1.50f, 2.00f, 2.75f), new Vector3(-1.50f, 0.00f, 2.75f), new Vector3(-1.50f, 0.00f, 3.75f) , @"Texture\wall"), new Quad(new Vector3(-1.50f, 1.30f, 0.75f), new Vector3(-1.50f, 1.30f, -3.75f), new Vector3(-1.50f, 0.00f, -3.75f), new Vector3(-1.50f, 0.00f, 0.75f) , @"Texture\wall"), new Quad(new Vector3(0.51f, 2.00f, 3.75f), new Vector3(0.51f, 0.00f, 3.75f), new Vector3(1.30f, 0.00f, 3.75f), new Vector3(1.30f, 2.00f, 3.75f) , @"Texture\wall"), new Quad(new Vector3(1.30f, 3.00f, 3.75f), new Vector3(-1.50f, 3.00f, 3.75f), new Vector3(-1.50f, 2.00f, 3.75f), new Vector3(1.30f, 2.00f, 3.75f) , @"Texture\wall"), new Quad(new Vector3(-1.50f, 0.00f, 3.75f), new Vector3(-0.79f, 0.00f, 3.75f), new Vector3(-0.79f, 1.99f, 3.75f), new Vector3(-1.50f, 2.00f, 3.75f) , @"Texture\wall"), new Quad(new Vector3(1.30f, 1.80f, 1.40f), new Vector3(1.30f, 1.80f, -1.10f), new Vector3(1.30f, 2.00f, -1.10f), new Vector3(1.30f, 2.00f, 1.40f) , @"Texture\wall"), new Quad(new Vector3(1.30f, 1.80f, 1.40f), new Vector3(1.30f, 0.00f, 1.40f), new Vector3(1.30f, 0.00f, -1.80f), new Vector3(1.30f, 1.80f, -1.80f) , @"Texture\wall"), new Quad(new Vector3(1.30f, 0.00f, 2.10f), new Vector3(1.30f, 0.00f, 1.40f), new Vector3(1.30f, 1.30f, 1.40f), new Vector3(1.30f, 1.30f, 2.10f) , @"Texture\wall"), new Quad(new Vector3(1.30f, 2.00f, -1.80f), new Vector3(1.30f, 0.00f, -1.80f), new Vector3(1.30f, 0.00f, -3.75f), new Vector3(1.30f, 2.00f, -3.75f) , @"Texture\wall"), new Quad(new Vector3(1.30f, 3.00f, 3.75f), new Vector3(1.30f, 2.00f, 3.75f), new Vector3(1.30f, 2.00f, -3.75f), new Vector3(1.30f, 3.00f, -3.75f) , @"Texture\wall"), new Quad(new Vector3(1.30f, 2.00f, 2.10f), new Vector3(1.30f, 2.00f, 3.75f), new Vector3(1.30f, 0.00f, 3.75f), new Vector3(1.30f, 0.00f, 2.10f) , @"Texture\wall"), #endregion }; teto = new Obj(new List <Quad> { new Quad(new Vector3(1.30f, 3.00f, -3.75f), new Vector3(-1.50f, 3.00f, -3.75f), new Vector3(-1.50f, 3.00f, 3.75f), new Vector3(1.30f, 3.00f, 3.75f) , @"Texture\helo", @"Texture\helo_snow") }); teto.SetPosition(0.005f, -1.5f, 0.02f); teto.boundinBox = new BoundingBox(new Vector3(-2.00f, 4.00f, -3.00f), new Vector3(2.00f, 4.00f, 3.00f)); List <Quad> misc = new List <Quad> { #region misc new Quad(new Vector3(1.30f, 1.80f, -1.10f), new Vector3(1.30f, 1.80f, -1.80f), new Vector3(1.30f, 2.00f, -1.80f), new Vector3(1.30f, 2.00f, -1.10f) , @"Texture\wood", @"Texture\wood_snow"), new Quad(new Vector3(1.30f, 1.30f, 2.10f), new Vector3(1.30f, 1.30f, 1.40f), new Vector3(1.30f, 2.00f, 1.40f), new Vector3(1.30f, 2.00f, 2.10f) , @"Texture\wood", @"Texture\wood_snow"), new Quad(new Vector3(-1.50f, 2.00f, 1.75f), new Vector3(-1.50f, 2.00f, 0.75f), new Vector3(-1.50f, 1.00f, 0.75f), new Vector3(-1.50f, 1.00f, 1.75f) , @"Texture\wood", @"Texture\wood_snow"), new Quad(new Vector3(-1.50f, 2.00f, -1.80f), new Vector3(-1.50f, 1.30f, -1.80f), new Vector3(-1.50f, 1.30f, -1.10f), new Vector3(-1.50f, 2.00f, -1.10f) , @"Texture\wood", @"Texture\wood_snow"), new Quad(new Vector3(-1.50f, 1.00f, 1.75f), new Vector3(-1.50f, 1.00f, 2.75f), new Vector3(-1.50f, 2.00f, 2.75f), new Vector3(-1.50f, 2.00f, 1.75f) , @"Texture\wood", @"Texture\wood_snow"), new Quad(new Vector3(-0.79f, 1.99f, 3.75f), new Vector3(-0.79f, -0.01f, 3.75f), new Vector3(0.51f, -0.01f, 3.75f), new Vector3(0.51f, 1.99f, 3.75f) , @"Texture\wood", @"Texture\wood_snow"), #endregion }; #endregion casa.AddQuads(misc); casa.AddQuads(parede); casa.SetPosition(0, -1.5f, 0); grid = new Grid("height map", "Ground_Snow", "Ground"); Ocean ocean = new Ocean("ocean"); ocean.SetPosition(0, 0, 0); //TODO: Create sets //TODO: Include objects on set List <Obj> sceneSet = new List <Obj> { chooper, teto, casa, grid, ocean }; //TODO: Create scenes //TODO: Insert the set of objects on scene actualScene = new Scene(sceneSet, "Cena 1"); //TODO: add the scences scenes = new List <Scene>(); scenes.Add(actualScene); }
public double For(Chopper chopper) { return (chopper.Ownership * chopper.Acres); }
private void Update() { transform.position = new Vector3(transform.position.x, 0, transform.position.z); if (Input.GetKeyDown(KeyCode.Space)) { Furniture currentFurniture = furnitureDetection.getSelected(); if (currentFurniture != null) { Holder currentFurnitureHolder = currentFurniture.GetComponent <Holder>(); if (myHolder.hasMovable() && !currentFurnitureHolder.hasMovable()) { MovableObject movable = myHolder.GetMovableObjet(); Trash trash = currentFurniture.GetComponent <Trash>(); if (trash != null) { Food food = movable.GetComponent <Food>(); if (food != null) { trash.destroyObject(movable); myHolder.removeMovable(); currentFurnitureHolder.setMovable(movable); } Container container = movable.GetComponent <Container>(); if (container != null) { container.returnToEmpty(); } } else { Stove stove = currentFurniture.GetComponent <Stove>(); Container container = movable.GetComponent <Container>(); if (stove != null && container != null) { myHolder.removeMovable(); currentFurnitureHolder.setMovable(movable); } else if (stove == null) { OrganizingPlates organizingPlates = currentFurniture.GetComponent <OrganizingPlates>(); Plate plate = movable.GetComponent <Plate>(); if (organizingPlates != null) { if (plate != null) { if (plate.plateContent == plateContent.TOMATO || plate.plateContent == plateContent.ONION || plate.plateContent == plateContent.MUSHROOM) { currentFurnitureHolder.setMovable(movable); plate.toEating(); myHolder.removeMovable(); Delivery delivery = currentFurniture.GetComponent <Delivery>(); delivery.receivePlate(plate.plateContent); delivery.activatePanels(); } } } else { myHolder.removeMovable(); currentFurnitureHolder.setMovable(movable); } } } } else if (myHolder.hasMovable() && currentFurnitureHolder.hasMovable()) { MovableObject movable = myHolder.GetMovableObjet(); Container pot = movable.GetComponent <Container>(); Plate plate = currentFurnitureHolder.GetMovableObjet().GetComponent <Plate>(); Container container = currentFurnitureHolder.GetComponentInChildren <Container>(); if (container != null) { if (container.verifyFood(movable.gameObject)) { Food food = myHolder.GetComponentInChildren <Food>(); food.changeToCook(); container.addFood(food); myHolder.removeMovable(); Cooking cooking = container.GetComponent <Cooking>(); cooking.setInitialTime(); if (!cooking.isActivated()) { cooking.activateCanvas(); } } } else { Stove stove = currentFurniture.GetComponent <Stove>(); if (stove != null && movable.GetComponent <MovableObject>().GetComponent <Container>() != null) { myHolder.removeMovable(); currentFurnitureHolder.setMovable(movable); } } //-------------------------------------------------------- if (pot != null && plate != null) { if (pot.canGiveToPlate()) { Cooking cooking = pot.GetComponent <Cooking>(); plate.receiveContent(cooking.iconCanvas); plate.setPlateContent(pot.getPotContent()); pot.returnToEmpty(); } } else { Container pot2 = currentFurnitureHolder.GetMovableObjet().GetComponent <Container>(); Plate plate2 = movable.GetComponent <Plate>(); if (pot2 != null && plate2 != null) { if (pot2.canGiveToPlate()) { Cooking cooking = pot2.GetComponent <Cooking>(); plate2.receiveContent(cooking.iconCanvas); plate2.setPlateContent(pot2.getPotContent()); pot2.returnToEmpty(); } } } } else if (currentFurnitureHolder.hasMovable() && !myHolder.hasMovable()) { MovableObject movable = currentFurnitureHolder.GetMovableObjet(); Chopper chopper = currentFurniture.GetComponent <Chopper>(); if (chopper != null) { myHolder.setMovable(movable); currentFurnitureHolder.removeMovable(); Timing timing = currentFurniture.GetComponent <Timing>(); timing.desactivateCanvas(); anim.SetBool("chopping", false); chopper.stopChopping(); } else { Container container = movable.GetComponent <Container>(); if (container != null) { myHolder.setMovable(movable); currentFurnitureHolder.removeMovable(); } else { myHolder.setMovable(movable); currentFurnitureHolder.removeMovable(); } } } } } if (Input.GetKeyDown(KeyCode.LeftShift)) { Furniture currentFurniture = furnitureDetection.getSelected(); if (currentFurniture != null) { Holder furnitureHolder = currentFurniture.GetComponent <Holder>(); if (furnitureHolder != null) { MovableAnchor movableA = furnitureHolder.GetComponentInChildren <MovableAnchor>(); if (movableA != null) { Food food = movableA.GetComponentInChildren <Food>(); if (food != null && (food.getStatus() == FoodStatus.RAW || food.getStatus() == FoodStatus.CUT)) { currentChopper = currentFurniture.GetComponent <Chopper>(); if (currentChopper != null) { timing = currentFurniture.GetComponent <Timing>(); if (timing != null) { timing.activateCanvas(); } myKnife.gameObject.SetActive(true); isChopping = currentChopper.startChopping(); anim.SetBool("chopping", isChopping); } } } } } } if (Input.GetKeyDown(KeyCode.LeftControl)) { Furniture currentFurniture = furnitureDetection.getSelected(); if (currentFurniture != null) { Creator creator = currentFurniture.GetComponent <Creator>(); Holder furnitureHolder = currentFurniture.GetComponent <Holder>(); if (creator != null && myHolder.movableAnchor.transform.childCount == 0 && furnitureHolder.movableAnchor.transform.childCount == 0) { MovableObject movable = creator.createFood(); myHolder.setMovable(movable); } } } if (Input.GetKeyDown(KeyCode.LeftAlt) && !boost) { boost = true; speed = 0.25f; } if (boost) { if (timeBoost >= 0) { timeBoost -= Time.deltaTime; speed = speed + (-0.15f) * Time.deltaTime; } else { boost = false; speed = 0.1f; timeBoost = 1f; } } }
public void NotInArray() { Assert.Equal(-1, Chopper.Chop(3, new[] { 1 })); }
public double For(Chopper chopper, double finishTime) { return (chopper.Ownership * chopper.Acres) + (chopper.FuelPrice * chopper.FuelConsumptionRate * chopper.Power * finishTime) + (chopper.OperatorWage * finishTime) + (chopper.Ownership * chopper.Acres * chopper.Lube / 100); }
void Update() { float horizontalMovement = Input.GetAxis("Horizontal"); float verticalMovement = Input.GetAxis("Vertical"); moveTo = new Vector3(horizontalMovement, 0, verticalMovement); if (moveTo != Vector3.zero) { animator.SetBool("Walking", true); animator.SetBool("IDLE", false); animator.SetBool("Pulling", false); animator.SetBool("Cutting", false); } else { if (isChopping) { animator.SetBool("IDLE", false); animator.SetBool("Walking", false); animator.SetBool("Pulling", false); animator.SetBool("Cutting", true); } else { animator.SetBool("IDLE", true); animator.SetBool("Walking", false); } } if (Input.GetKeyDown(KeyCode.Space)) { Furniture currentFurniture = furnitureDetection.GetSelected(); if (currentFurniture != null) { Holder currentFurnitureHolder = currentFurniture.GetComponent <Holder>(); //Give if (currentFurnitureHolder != null) { //Si el jugador tiene un objeto if (PlayerHolder.HasMovable()) { //Si ambos tienen objeto no lo cambia, se queda igual if (PlayerHolder.HasMovable() && currentFurnitureHolder.HasMovable()) { MovableObject furnitureMovable = currentFurnitureHolder.GetMovable(); MovableObject playerMovable = PlayerHolder.GetMovable(); PlayerHolder.SetMovable(playerMovable); currentFurnitureHolder.SetMovable(furnitureMovable); } //Si solo uno tiene objeto else { MovableObject movable = PlayerHolder.GetMovable(); Trash trash = currentFurniture.GetComponent <Trash>(); Cooker cooker = currentFurniture.GetComponent <Cooker>(); Chopper chopper = currentFurniture.GetComponent <Chopper>(); //Si el mueble es el basurero if (trash != null && movable.GetComponent <Food>()) { PlayerHolder.RemoveMovable(); Destroy(movable.gameObject); /*Food food = movable.GetComponent<Food>(); * if (food!= null) * { * food.Delete(); * }*/ } //Solo acepta basura en el basurero if (trash != null && movable.GetComponent <Food>() == false) { MovableObject furnitureMovable = currentFurnitureHolder.GetMovable(); MovableObject playerMovable = PlayerHolder.GetMovable(); PlayerHolder.SetMovable(playerMovable); currentFurnitureHolder.SetMovable(furnitureMovable); } //Solo acepta la olla en los hornos if (cooker != null && movable.GetComponent <Container>() == false) { MovableObject furnitureMovable = currentFurnitureHolder.GetMovable(); MovableObject playerMovable = PlayerHolder.GetMovable(); PlayerHolder.SetMovable(playerMovable); currentFurnitureHolder.SetMovable(furnitureMovable); } if (chopper != null && movable.GetComponent <Food>() == false) { MovableObject furnitureMovable = currentFurnitureHolder.GetMovable(); MovableObject playerMovable = PlayerHolder.GetMovable(); PlayerHolder.SetMovable(playerMovable); currentFurnitureHolder.SetMovable(furnitureMovable); } //Si tiene el objeto y lo que tiene en frente tiene la olla else { MovableObject furnitureMovable = currentFurnitureHolder.GetMovable(); if (furnitureMovable != null) { Container furnitureContainer = furnitureMovable.GetComponent <Container>(); if (furnitureContainer != null) { Food food = movable.GetComponent <Food>(); if (food != null) { if (furnitureContainer.CanAccept(food)) { PlayerHolder.RemoveMovable(); } } } } currentFurnitureHolder.SetMovable(movable); PlayerHolder.RemoveMovable(); } } } //Pick else { if (currentFurnitureHolder.HasMovable()) { MovableObject movable = currentFurnitureHolder.GetMovable(); PlayerHolder.SetMovable(movable); currentFurnitureHolder.RemoveMovable(); } else { IngredientSpawner ingred = currentFurniture.GetComponent <IngredientSpawner>(); if (ingred != null) { MovableObject movable = ingred.GetIngredient(); PlayerHolder.SetMovable(movable); } } } } } } if (Input.GetKeyDown(KeyCode.X)) { Furniture currentFurniture = furnitureDetection.GetSelected(); if (currentFurniture != null) { Chopper currentChopper = currentFurniture.GetComponent <Chopper>(); //Comienza a cortar if (currentChopper != null) { isChopping = currentChopper.StartChopping(this); } } } if (Input.GetKeyDown(KeyCode.C)) { tempForce = force; Debug.Log("La fuerza temporal es"); Debug.Log(tempForce); timer += Time.deltaTime; while (timer < 10.0f) { timer += Time.deltaTime; force = forceBoost; Debug.Log("La fuerza es"); Debug.Log(force); } force = tempForce; Debug.Log("La fuerza es"); Debug.Log(force); } }