public override void SetTarget(GameObject target) { base.SetTarget(target); this.target = target.GetComponent <MonumentPart>(); debugVictoryButton.gameObject.SetActive(DebugHandler.InstantBuildMode && this.target.part == MonumentPart.Part.Top); GenerateStateButtons(); }
public override bool Success() { IEnumerator enumerator = Components.MonumentParts.GetEnumerator(); try { while (enumerator.MoveNext()) { MonumentPart monumentPart = (MonumentPart)enumerator.Current; if (monumentPart.IsMonumentCompleted()) { Game.Instance.unlocks.Unlock("thriving"); return(true); } } } finally { IDisposable disposable; if ((disposable = (enumerator as IDisposable)) != null) { disposable.Dispose(); } } return(false); }
public override void DoPostConfigureComplete(GameObject go) { go.AddOrGet <KBatchedAnimController>().initialAnim = "option_a"; go.GetComponent <KPrefabID>().prefabSpawnFn += delegate(GameObject game_object) { MonumentPart monumentPart = game_object.AddOrGet <MonumentPart>(); monumentPart.part = MonumentPart.Part.Top; monumentPart.selectableStatesAndSymbols = new List <Tuple <string, string> >(); monumentPart.stateUISymbol = "upper"; monumentPart.selectableStatesAndSymbols.Add(new Tuple <string, string>("option_a", "leira")); monumentPart.selectableStatesAndSymbols.Add(new Tuple <string, string>("option_b", "mae")); monumentPart.selectableStatesAndSymbols.Add(new Tuple <string, string>("option_c", "puft")); monumentPart.selectableStatesAndSymbols.Add(new Tuple <string, string>("option_d", "nikola")); monumentPart.selectableStatesAndSymbols.Add(new Tuple <string, string>("option_e", "burt")); monumentPart.selectableStatesAndSymbols.Add(new Tuple <string, string>("option_f", "rowan")); monumentPart.selectableStatesAndSymbols.Add(new Tuple <string, string>("option_g", "nisbet")); monumentPart.selectableStatesAndSymbols.Add(new Tuple <string, string>("option_h", "joshua")); monumentPart.selectableStatesAndSymbols.Add(new Tuple <string, string>("option_i", "ren")); monumentPart.selectableStatesAndSymbols.Add(new Tuple <string, string>("option_j", "hatch")); monumentPart.selectableStatesAndSymbols.Add(new Tuple <string, string>("option_k", "drecko")); monumentPart.selectableStatesAndSymbols.Add(new Tuple <string, string>("option_l", "driller")); monumentPart.selectableStatesAndSymbols.Add(new Tuple <string, string>("option_m", "gassymoo")); monumentPart.selectableStatesAndSymbols.Add(new Tuple <string, string>("option_n", "glom")); monumentPart.selectableStatesAndSymbols.Add(new Tuple <string, string>("option_o", "lightbug")); monumentPart.selectableStatesAndSymbols.Add(new Tuple <string, string>("option_p", "slickster")); monumentPart.selectableStatesAndSymbols.Add(new Tuple <string, string>("option_q", "pacu")); }; }
public override void ConfigureBuildingTemplate(GameObject go, Tag prefab_tag) { BuildingConfigManager.Instance.IgnoreDefaultKComponent(typeof(RequiresFoundation), prefab_tag); go.AddOrGet <LoopingSounds>(); MonumentPart monumentPart = go.AddOrGet <MonumentPart>(); monumentPart.part = MonumentPart.Part.Top; }
public override void ConfigureBuildingTemplate(GameObject go, Tag prefab_tag) { BuildingConfigManager.Instance.IgnoreDefaultKComponent(typeof(RequiresFoundation), prefab_tag); go.AddOrGet <LoopingSounds>(); BuildingAttachPoint buildingAttachPoint = go.AddOrGet <BuildingAttachPoint>(); buildingAttachPoint.points = new BuildingAttachPoint.HardPoint[1] { new BuildingAttachPoint.HardPoint(new CellOffset(0, 5), "MonumentTop", null) }; MonumentPart monumentPart = go.AddOrGet <MonumentPart>(); monumentPart.part = MonumentPart.Part.Middle; }
private GameObject GetMonumentPart(Part requestPart) { List <GameObject> attachedNetwork = AttachableBuilding.GetAttachedNetwork(GetComponent <AttachableBuilding>()); foreach (GameObject item in attachedNetwork) { MonumentPart component = item.GetComponent <MonumentPart>(); if (!((Object)component == (Object)null) && component.part == requestPart) { return(item); } } return(null); }
public override void DoPostConfigureComplete(GameObject go) { go.AddOrGet <KBatchedAnimController>().initialAnim = "option_a"; go.GetComponent <KPrefabID>().prefabSpawnFn += delegate(GameObject game_object) { MonumentPart monumentPart = game_object.AddOrGet <MonumentPart>(); monumentPart.part = MonumentPart.Part.Bottom; monumentPart.selectableStatesAndSymbols = new List <Tuple <string, string> >(); monumentPart.stateUISymbol = "base"; monumentPart.selectableStatesAndSymbols.Add(new Tuple <string, string>("option_a", "straight_legs")); monumentPart.selectableStatesAndSymbols.Add(new Tuple <string, string>("option_b", "wide_stance")); monumentPart.selectableStatesAndSymbols.Add(new Tuple <string, string>("option_c", "hmmm_legs")); monumentPart.selectableStatesAndSymbols.Add(new Tuple <string, string>("option_d", "sitting_stool")); monumentPart.selectableStatesAndSymbols.Add(new Tuple <string, string>("option_e", "wide_stance2")); monumentPart.selectableStatesAndSymbols.Add(new Tuple <string, string>("option_f", "posing1")); monumentPart.selectableStatesAndSymbols.Add(new Tuple <string, string>("option_g", "knee_kick")); monumentPart.selectableStatesAndSymbols.Add(new Tuple <string, string>("option_h", "step_on_hatches")); monumentPart.selectableStatesAndSymbols.Add(new Tuple <string, string>("option_i", "sit_on_tools")); monumentPart.selectableStatesAndSymbols.Add(new Tuple <string, string>("option_j", "water_pacu")); monumentPart.selectableStatesAndSymbols.Add(new Tuple <string, string>("option_k", "sit_on_eggs")); }; }
public override void DoPostConfigureComplete(GameObject go) { go.AddOrGet <KBatchedAnimController>().initialAnim = "option_a"; go.GetComponent <KPrefabID>().prefabSpawnFn += delegate(GameObject game_object) { MonumentPart monumentPart = game_object.AddOrGet <MonumentPart>(); monumentPart.part = MonumentPart.Part.Middle; monumentPart.selectableStatesAndSymbols = new List <Tuple <string, string> >(); monumentPart.stateUISymbol = "mid"; monumentPart.selectableStatesAndSymbols.Add(new Tuple <string, string>("option_a", "thumbs_up")); monumentPart.selectableStatesAndSymbols.Add(new Tuple <string, string>("option_b", "wrench")); monumentPart.selectableStatesAndSymbols.Add(new Tuple <string, string>("option_c", "hmmm")); monumentPart.selectableStatesAndSymbols.Add(new Tuple <string, string>("option_d", "hips_hands")); monumentPart.selectableStatesAndSymbols.Add(new Tuple <string, string>("option_e", "hold_face")); monumentPart.selectableStatesAndSymbols.Add(new Tuple <string, string>("option_f", "finger_gun")); monumentPart.selectableStatesAndSymbols.Add(new Tuple <string, string>("option_g", "model_pose")); monumentPart.selectableStatesAndSymbols.Add(new Tuple <string, string>("option_h", "punch")); monumentPart.selectableStatesAndSymbols.Add(new Tuple <string, string>("option_i", "holding_hatch")); monumentPart.selectableStatesAndSymbols.Add(new Tuple <string, string>("option_j", "model_pose2")); monumentPart.selectableStatesAndSymbols.Add(new Tuple <string, string>("option_k", "balancing")); monumentPart.selectableStatesAndSymbols.Add(new Tuple <string, string>("option_l", "holding_babies")); }; }