private void SetStatue() { //Used 56's pale prince code here GameObject statue = Instantiate(GameObject.Find("GG_Statue_ElderHu")); statue.transform.SetPosition2D(25.4f, statue.transform.GetPositionY()); var scene = ScriptableObject.CreateInstance <BossScene>(); scene.sceneName = "GG_Hollow_Knight"; var bs = statue.GetComponent <BossStatue>(); bs.bossScene = scene; bs.statueStatePD = "ShadeLordCompl"; var gg = new BossStatue.Completion { completedTier1 = true, seenTier3Unlock = true, completedTier2 = true, completedTier3 = true, isUnlocked = true, hasBeenSeen = true, usingAltVersion = false }; bs.StatueState = gg; var details = new BossStatue.BossUIDetails(); details.nameKey = details.nameSheet = "SHADE_NAME"; details.descriptionKey = details.descriptionSheet = "SHADE_DESC"; bs.bossDetails = details; foreach (var i in bs.statueDisplay.GetComponentsInChildren <SpriteRenderer>(true)) { i.sprite = new Sprite(); } }
public void OnAfterDeserialize() { StringValues.TryGetValue("CompletionPropeller", out string @out2); if (string.IsNullOrEmpty(@out2)) { return; } CompletionPropeller = JsonUtility.FromJson <BossStatue.Completion>(@out2); }
// Token: 0x06000056 RID: 86 RVA: 0x00003768 File Offset: 0x00001968 private static void SetStatue() { GameObject gameObject = GameObject.Find("GG_Statue_Uumuu"); //BossScene bossScene = ScriptableObject.CreateInstance<BossScene>(); //bossScene.sceneName = "GG_Uumuu"; BossStatue component = gameObject.GetComponent <BossStatue>(); //component.dreamBossScene = bossScene; component.dreamBossScene = component.bossScene; component.dreamStatueStatePD = "statueStateUuwuu"; BossStatue.Completion statueState = new BossStatue.Completion { completedTier1 = true, seenTier3Unlock = true, completedTier2 = true, completedTier3 = true, isUnlocked = true, hasBeenSeen = true, usingAltVersion = false }; component.DreamStatueState = statueState; component.SetPlaquesVisible((component.StatueState.isUnlocked && component.StatueState.hasBeenSeen) || component.isAlwaysUnlocked); UnityEngine.Object.Destroy(gameObject.FindGameObjectInChildren("StatueAlt")); GameObject statueDisplay = component.statueDisplay; GameObject gameObject2 = UnityEngine.Object.Instantiate <GameObject>(statueDisplay, statueDisplay.transform.parent, true); gameObject2.SetActive(component.UsingDreamVersion); //SpriteRenderer componentInChildren = gameObject2.GetComponentInChildren<SpriteRenderer>(); //componentInChildren.sprite = SuperUumuu.Instance.dict["Statue"]; //componentInChildren.transform.position += Vector3.up * 1.8f; gameObject2.name = "StatueAlt"; gameObject2.GetComponentInChildren <SpriteRenderer>(true).flipX = true; gameObject2.GetComponentInChildren <SpriteRenderer>(true).flipY = true; gameObject2.GetComponentInChildren <SpriteRenderer>(true).transform.SetScaleX(gameObject2.GetComponentInChildren <SpriteRenderer>(true).transform.GetScaleX() + 0.07f); gameObject2.GetComponentInChildren <SpriteRenderer>(true).transform.SetScaleY(gameObject2.GetComponentInChildren <SpriteRenderer>(true).transform.GetScaleY() + 0.07f); component.statueDisplayAlt = gameObject2; BossStatue.BossUIDetails dreamBossDetails = default(BossStatue.BossUIDetails); dreamBossDetails.nameKey = (dreamBossDetails.nameSheet = "Uuwuu_Name"); dreamBossDetails.descriptionKey = (dreamBossDetails.descriptionSheet = "Uuwuu_Desc"); component.dreamBossDetails = dreamBossDetails; GameObject gameObject3 = gameObject.FindGameObjectInChildren("alt_lever"); gameObject3.SetActive(true); gameObject3.transform.position = new Vector3(177.5f, 7.5f, 1f); gameObject3.FindGameObjectInChildren("GG_statue_switch_bracket").SetActive(true); gameObject3.FindGameObjectInChildren("GG_statue_switch_lever").SetActive(true); BossStatueLever componentInChildren2 = gameObject.GetComponentInChildren <BossStatueLever>(); componentInChildren2.SetOwner(component); componentInChildren2.SetState(true); }
private void SetStatue() { GameObject statue = Instantiate(GameObject.Find("GG_Statue_TraitorLord")); statue.transform.SetPosition2D(250f, statue.transform.GetPositionY()); BossScene scene = ScriptableObject.CreateInstance <BossScene>(); scene.sceneName = "GG_Mighty_Zote"; BossStatue bossStatue = statue.GetComponent <BossStatue>(); bossStatue.bossScene = scene; BossStatue.Completion completion = new BossStatue.Completion { completedTier1 = true, completedTier2 = true, completedTier3 = true, seenTier3Unlock = true, isUnlocked = true, hasBeenSeen = true, usingAltVersion = false, }; bossStatue.StatueState = completion; BossStatue.BossUIDetails details = new BossStatue.BossUIDetails(); details.nameKey = details.nameSheet = "KNIGHT_NAME"; details.descriptionKey = details.descriptionSheet = "KNIGHT_DESC"; bossStatue.bossDetails = details; foreach (SpriteRenderer sr in bossStatue.GetComponentsInChildren <SpriteRenderer>()) { sr.sprite = null; } GameObject knightStatue = GameObject.Find("GG_Statue_Knight"); GameObject statueV1 = knightStatue.FindGameObjectInChildren("Knight_v01"); GameObject statueV2 = knightStatue.FindGameObjectInChildren("Knight_v02"); GameObject statueV3 = knightStatue.FindGameObjectInChildren("Knight_v03"); Destroy(statueV1.FindGameObjectInChildren("Interact")); Destroy(statueV2.FindGameObjectInChildren("Interact")); Destroy(statueV3.FindGameObjectInChildren("Interact")); }
private void CreateStatue() { //Used 56's pale prince code here GameObject statue = Instantiate(GameObject.Find("GG_Statue_ElderHu")); statue.name = "GG_Statue_CagneyCarnation"; statue.transform.SetPosition3D(41.0f, statue.transform.GetPositionY() + 0.5f, 0f); var scene = ScriptableObject.CreateInstance <BossScene>(); scene.sceneName = "FloralFury"; var bs = statue.GetComponent <BossStatue>(); bs.bossScene = scene; bs.statueStatePD = "statueStateFlower"; bs.SetPlaquesVisible(bs.StatueState.isUnlocked && bs.StatueState.hasBeenSeen); var details = new BossStatue.BossUIDetails(); details.nameKey = details.nameSheet = "FLOWER_NAME"; details.descriptionKey = details.descriptionSheet = "FLOWER_DESC"; bs.bossDetails = details; foreach (Transform i in statue.transform) { if (i.name.Contains("door")) { i.name = "door_dreamReturnGG_GG_Statue_CagneyCarnation"; } } GameObject appearance = statue.transform.Find("Base").Find("Statue").gameObject; appearance.SetActive(true); SpriteRenderer sr = appearance.transform.Find("GG_statues_0006_5").GetComponent <SpriteRenderer>(); sr.enabled = true; Texture2D flowerMugshot = CagneyCarnation.Textures["Mugshot"]; sr.sprite = Sprite.Create(flowerMugshot, new Rect(0, 0, flowerMugshot.width, flowerMugshot.height), new Vector2(0.5f, 0.5f)); sr.transform.SetPosition3D(sr.transform.GetPositionX(), sr.transform.GetPositionY(), 2f); GameObject inspect = statue.transform.Find("Inspect").gameObject; var tmp = inspect.transform.Find("Prompt Marker").position; inspect.transform.Find("Prompt Marker").position = new Vector3(tmp.x - 0.3f, tmp.y + 1.0f, tmp.z); inspect.SetActive(true); statue.transform.Find("Spotlight").gameObject.SetActive(true); if (WonFight) { WonFight = false; BossStatue.Completion temp = bs.StatueState; if (BossLevel == 0) { temp.completedTier1 = true; } else if (BossLevel == 1) { temp.completedTier2 = true; } else if (BossLevel == 2) { temp.completedTier3 = true; } if (temp.completedTier1 && temp.completedTier2 && !temp.seenTier3Unlock) { temp.seenTier3Unlock = true; } PlayerData.instance.currentBossStatueCompletionKey = bs.statueStatePD; bs.StatueState = temp; bs.SetPlaqueState(bs.StatueState, bs.altPlaqueL, bs.statueStatePD); } statue.SetActive(true); }
private void SetStatue() { Log("Setting up statues..."); GameObject statue = GameObject.Find("GG_Statue_Mawlek"); BossScene scene = ScriptableObject.CreateInstance <BossScene>(); scene.sceneName = "GG_Brooding_Mawlek_V"; BossStatue bs = statue.GetComponent <BossStatue>(); bs.dreamBossScene = scene; bs.dreamStatueStatePD = "statueStateTiso"; bs.SetPlaquesVisible(bs.StatueState.isUnlocked && bs.StatueState.hasBeenSeen || bs.isAlwaysUnlocked); Destroy(statue.FindGameObjectInChildren("StatueAlt")); GameObject displayStatue = bs.statueDisplay; GameObject alt = Instantiate ( displayStatue, displayStatue.transform.parent, true ); alt.SetActive(bs.UsingDreamVersion); SpriteRenderer spriteRenderer = alt.GetComponentInChildren <SpriteRenderer>(); spriteRenderer.sprite = TisoSpencer.Sprites[0]; spriteRenderer.transform.position += Vector3.down; alt.name = "StatueAlt"; bs.statueDisplayAlt = alt; var completion = new BossStatue.Completion { completedTier1 = true, seenTier3Unlock = true, completedTier2 = true, completedTier3 = true, isUnlocked = true, hasBeenSeen = true, usingAltVersion = true, }; bs.StatueState = completion; bs.DreamStatueState = completion; BossStatue.BossUIDetails details = new BossStatue.BossUIDetails(); details.nameKey = details.nameSheet = "TISO_NAME"; details.descriptionKey = details.descriptionSheet = "TISO_DESC"; bs.dreamBossDetails = details; GameObject altLever = statue.FindGameObjectInChildren("alt_lever"); altLever.SetActive(true); altLever.transform.position = new Vector3(46.3f, 7.3f, 0.0f); GameObject switchBracket = altLever.FindGameObjectInChildren("GG_statue_switch_bracket"); switchBracket.SetActive(true); GameObject switchLever = altLever.FindGameObjectInChildren("GG_statue_switch_lever"); switchLever.SetActive(true); BossStatueLever toggle = statue.GetComponentInChildren <BossStatueLever>(); toggle.SetOwner(bs); toggle.SetState(true); }