///<inheritdoc/> public override int GetHashCode() { int hash = 17; // Overflow is fine, just wrap unchecked { hash = (hash * 29) + PaintScheme.GetHashCode(); hash = (hash * 29) + Propulsion.GetHashCode(); hash = (hash * 29) + Damage.GetHashCode(); hash = (hash * 29) + Smoke.GetHashCode(); hash = (hash * 29) + TrailingEffects.GetHashCode(); hash = (hash * 29) + Canopy.GetHashCode(); hash = (hash * 29) + LandingLights.GetHashCode(); hash = (hash * 29) + NavigationLights.GetHashCode(); hash = (hash * 29) + AntiCollisionLights.GetHashCode(); hash = (hash * 29) + Flaming.GetHashCode(); hash = (hash * 29) + Afterburner.GetHashCode(); hash = (hash * 29) + FrozenStatus.GetHashCode(); hash = (hash * 29) + PowerPlantStatus.GetHashCode(); hash = (hash * 29) + State.GetHashCode(); hash = (hash * 29) + FormationLights.GetHashCode(); hash = (hash * 29) + SpotLights.GetHashCode(); hash = (hash * 29) + InteriorLights.GetHashCode(); } return(hash); }
internal void Light() { allLights = LightObject.GetLights(); DirectionalLights.Clear(); PointLights.Clear(); SpotLights.Clear(); for (int i = 0; i < allLights.Count; i++) { if (allLights[i].type == LightType.Spot) { //if (l.cookie == null) // l.cookie = DefaultSpotCookie; SpotLights.Add(allLights[i]); } else if (allLights[i].type == LightType.Point) { PointLights.Add(allLights[i]); } else if (allLights[i].type == LightType.Directional) { DirectionalLights.Add(allLights[i]); } if (UseAlloyLight) { allLights[i].light.GetOrAddComponent <AlloyAreaLight>().UpdateBinding(); } } }
internal void Light() { allLights = GameObject.FindObjectsOfType <Light>(); DirectionalLights.Clear(); PointLights.Clear(); SpotLights.Clear(); for (int i = 0; i < allLights.Length; i++) { if (allLights[i].type == LightType.Spot) { /* * if (l.cookie == null) * l.cookie = DefaultSpotCookie; */ SpotLights.Add(allLights[i]); } else if (allLights[i].type == LightType.Point) { PointLights.Add(allLights[i]); } else if (allLights[i].type == LightType.Directional) { DirectionalLights.Add(allLights[i]); } if (UseAlloyLight) { allLights[i].GetOrAddComponent <AlloyAreaLight>().UpdateBinding(); } } }
internal void Light() { allLights = LightObject.GetLights(); DirectionalLights.Clear(); PointLights.Clear(); SpotLights.Clear(); for (int i = 0; i < allLights.Count; i++) { if (allLights[i].type == LightType.Spot) { //if (l.cookie == null) // l.cookie = DefaultSpotCookie; SpotLights.Add(allLights[i]); } else if (allLights[i].type == LightType.Point) { PointLights.Add(allLights[i]); } else if (allLights[i].type == LightType.Directional) { if (Graphics.Instance.Settings.UsePCSS) { if (null == pcss) { pcss = allLights[i].light.GetOrAddComponent <PCSSLight>(); } if (null != pcss) { pcss.enabled = true; } } else { if (null == pcss) { pcss = allLights[i].light.GetComponent <PCSSLight>(); } if (null != pcss) { pcss.enabled = false; } } DirectionalLights.Add(allLights[i]); } if (UseAlloyLight) { allLights[i].light.GetOrAddComponent <AlloyAreaLight>().UpdateBinding(); } } }
/// <summary> /// Saves the list of accessories to a Comma-Separated Value file for later use if needed. /// </summary> private bool SaveAccessoryList() { // Temporary file for storing accessory data string fname = "AccessoryData.csv"; // Check if output folder already exists string OutputPath = @"C:\ProgramData\Charbonneau Vendette Solutions\"; if (!Directory.Exists(OutputPath)) { Directory.CreateDirectory(OutputPath); Console.WriteLine("Creating new path {0}.", OutputPath); } // Create full path for file for storing accessory data filename = OutputPath + fname; try { using (System.IO.StreamWriter file = new System.IO.StreamWriter(filename)) { Console.WriteLine("Writing to {0}.", filename); file.WriteLine("BlackFloor,{0}", BlackFloor.ToString()); file.WriteLine("VarnishFloor,{0}", VarnishFloor.ToString()); file.WriteLine("TarFiller,{0}", TarFiller.ToString()); file.WriteLine("SpotLights,{0}", SpotLights.ToString()); file.WriteLine("Chandelier,{0}", Chandelier.ToString()); file.WriteLine("Cafe25,{0}", Cafe25.ToString()); file.WriteLine("Cafe50,{0}", Cafe50.ToString()); file.WriteLine("Cafe100,{0}", Cafe100.ToString()); file.WriteLine("Extension25,{0}", Extension25.ToString()); file.WriteLine("Extension50,{0}", Extension50.ToString()); file.WriteLine("Extension100,{0}", Extension100.ToString()); file.WriteLine("ExitSign,{0}", ExitSign.ToString()); file.WriteLine("SingleDoor,{0}", SingleDoor.ToString()); file.WriteLine("DoubleDoor,{0}", DoubleDoor.ToString()); file.WriteLine("FireExtinguisher,{0}", FireExtinguisher.ToString()); file.WriteLine("BlockCover,{0}", BlockCover.ToString()); file.WriteLine("Gutter10,{0}", Gutter10.ToString()); file.WriteLine("Gutter15,{0}", Gutter15.ToString()); file.WriteLine("Gutter20,{0}", Gutter20.ToString()); } return(true); } catch { return(false); } }
///<inheritdoc/> public override int GetHashCode() { int hash = 17; // Overflow is fine, just wrap unchecked { hash = (hash * 29) + PaintScheme.GetHashCode(); hash = (hash * 29) + Mobility.GetHashCode(); hash = (hash * 29) + Damage.GetHashCode(); hash = (hash * 29) + Smoke.GetHashCode(); hash = (hash * 29) + TrailingEffects.GetHashCode(); hash = (hash * 29) + RunningLights.GetHashCode(); hash = (hash * 29) + Flaming.GetHashCode(); hash = (hash * 29) + FrozenStatus.GetHashCode(); hash = (hash * 29) + PowerPlantStatus.GetHashCode(); hash = (hash * 29) + State.GetHashCode(); hash = (hash * 29) + SpotLights.GetHashCode(); hash = (hash * 29) + InteriorLights.GetHashCode(); } return(hash); }
///<inheritdoc/> public override int GetHashCode() { int hash = 17; // Overflow is fine, just wrap unchecked { hash = (hash * 29) + PaintScheme.GetHashCode(); hash = (hash * 29) + Mobility.GetHashCode(); hash = (hash * 29) + FirePower.GetHashCode(); hash = (hash * 29) + Damage.GetHashCode(); hash = (hash * 29) + Smoke.GetHashCode(); hash = (hash * 29) + TrailingEffects.GetHashCode(); hash = (hash * 29) + Hatch.GetHashCode(); hash = (hash * 29) + HeadLights.GetHashCode(); hash = (hash * 29) + TailLights.GetHashCode(); hash = (hash * 29) + BrakeLights.GetHashCode(); hash = (hash * 29) + Flaming.GetHashCode(); hash = (hash * 29) + Launcher.GetHashCode(); hash = (hash * 29) + CamouflageType.GetHashCode(); hash = (hash * 29) + Concealed.GetHashCode(); hash = (hash * 29) + FrozenStatus.GetHashCode(); hash = (hash * 29) + PowerPlantStatus.GetHashCode(); hash = (hash * 29) + State.GetHashCode(); hash = (hash * 29) + Tent.GetHashCode(); hash = (hash * 29) + Ramp.GetHashCode(); hash = (hash * 29) + BlackoutLights.GetHashCode(); hash = (hash * 29) + BlackoutBrakeLights.GetHashCode(); hash = (hash * 29) + SpotLights.GetHashCode(); hash = (hash * 29) + InteriorLights.GetHashCode(); hash = (hash * 29) + SurrenderState.GetHashCode(); hash = (hash * 29) + MaskedCloaked.GetHashCode(); } return(hash); }