Пример #1
0
        // 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);
        }
Пример #2
0
        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);
        }