Beispiel #1
0
    IEnumerator _Show()
    {
        GuiManager.FadeOut(0.2f, 0.7f);
        AudioListener.volume = 0.3f;

        yield return(new WaitForSeconds(0.3f));

        DefaultSpriteUI.ShowSprite(GuiInGameMenu.SpriteControls);
        DefaultSpriteUI.ShowSprite(GuiInGameMenu.SpriteResume);
        DefaultSpriteUI.ShowSprite(GuiInGameMenu.SpriteQuit);
        DefaultSpriteUI.HideSprite(GuiInGameMenu.SpriteControlsOk);
        DefaultSpriteUI.HideSprite(GuiInGameMenu.SpriteControlsCancel);
        DefaultSpriteUI.HideSprite(GuiInGameMenu.SpriteControlsReset);
        DefaultSpriteUI.HideSprite(GuiInGameMenu.SpriteControlsBackground);

        /*
         *
         * UnityEngine.Object[] textures = Resources.FindObjectsOfTypeAll(typeof(Texture));
         * UnityEngine.Object[] audioclips = Resources.FindObjectsOfTypeAll(typeof(AudioClip));
         * UnityEngine.Object[] animations = Resources.FindObjectsOfTypeAll(typeof(AnimationClip));
         * UnityEngine.Object[] meshes = Resources.FindObjectsOfTypeAll(typeof(Mesh));
         *
         * Debug.Log("All " + Resources.FindObjectsOfTypeAll(typeof(UnityEngine.Object)).Length);
         * Debug.Log("Textures " + textures.Length);
         * Debug.Log("AudioClips " + audioclips.Length);
         * Debug.Log("Meshes " + meshes.Length);
         * Debug.Log("Materials " + Resources.FindObjectsOfTypeAll(typeof(Material)).Length);
         * Debug.Log("Animation " + animations.Length);
         * Debug.Log("GameObjects " + Resources.FindObjectsOfTypeAll(typeof(GameObject)).Length);
         * Debug.Log("Components " + Resources.FindObjectsOfTypeAll(typeof(Component)).Length);
         *
         * for (int i = 0; i < textures.Length; i++)
         * {
         *  Texture t = textures[i] as Texture;
         *  Debug.Log("Texture " + t.name + " - " + t.width +"x" + t.height);
         * }
         *
         * for (int i = 0; i < audioclips.Length; i++)
         * {
         *  AudioClip t = audioclips[i] as AudioClip;
         *  Debug.Log("audio " + t.name + " - " + t.length);
         * }
         *
         * for (int i = 0; i < animations.Length; i++)
         * {
         *  AnimationClip t = animations[i] as AnimationClip;
         *  Debug.Log("animation " + t.name + " - " + t.length);
         * }
         *
         * for (int i = 0; i < meshes.Length; i++)
         * {
         *  Mesh t = meshes[i] as Mesh;
         *  Debug.Log("mesh " + t.name);
         * }
         */
        Time.timeScale = 0;
    }
Beispiel #2
0
    IEnumerator _Show()
    {
        GuiManager.FadeOut(0.2f, 0.7f);

        yield return(new WaitForSeconds(0.3f));

        //Debug.Log("Show shop");

        if (Game.Instance.GameType != E_GameType.Survival)
        {
            DefaultSpriteUI.ShowSprite(GuiShopBackgroundTop.Instance.Sprite);
            DefaultSpriteUI.ShowSprite(GuiShopBackgroundMiddle.Instance.Sprite);
            DefaultSpriteUI.ShowSprite(GuiShopBackgroundBottom.Instance.Sprite);

            DefaultSpriteUI.ShowSprite(GuiShopBackgroundTopTop.Instance.Sprite);
            DefaultSpriteUI.ShowSprite(GuiShopBackgroundTopMiddle.Instance.Sprite);
            DefaultSpriteUI.ShowSprite(GuiShopBackgroundTopBottom.Instance.Sprite);
        }

        DefaultSpriteUI.ShowSprite(GuiShopBackgroundMiddleTop.Instance.Sprite);
        DefaultSpriteUI.ShowSprite(GuiShopBackgroundMiddleMiddle.Instance.Sprite);
        DefaultSpriteUI.ShowSprite(GuiShopBackgroundMiddleBottom.Instance.Sprite);

        DefaultSpriteUI.ShowSprite(GuiShopBackgroundDownTop.Instance.Sprite);
        DefaultSpriteUI.ShowSprite(GuiShopBackgroundDownMiddle.Instance.Sprite);
        DefaultSpriteUI.ShowSprite(GuiShopBackgroundDownBottom.Instance.Sprite);

        if (Game.Instance.GameType != E_GameType.Survival)
        {
            DefaultSpriteUI.ShowSprite(GuiShopKarmaCaption.Instance.Sprite);
        }

        DefaultSpriteUI.ShowSprite(GuiShopComboCaption.Instance.Sprite);

        DefaultSpriteUI.ShowSprite(GuiShopButtonOk.Instance.Sprite);
        DefaultSpriteUI.ShowSprite(GuiShopButtonBack.Instance.Sprite);

        if (Game.Instance.GameType != E_GameType.Survival)
        {
            ButtonHealth.Show();
            ButtonSword.Show();
        }

        for (int i = 0; i < ButtonCombo.Length; i++)
        {
            ButtonCombo[i].Show();
        }

        if (Game.Instance.GameType != E_GameType.Survival)
        {
            GuiManager.ShowNumbers(Karma, Game.Instance.Money, 99999);
        }

        SaveExperience  = Game.Instance.Money;
        SaveSwordLevel  = Game.Instance.SwordLevel;
        SaveHealthlevel = Game.Instance.HealthLevel;
        for (int i = 0; i < 6; i++)
        {
            SaveComboLevels[i] = Game.Instance.ComboLevel[i];
        }

        Time.timeScale = 0;

        Game.Instance.GameState = E_GameState.Shop;
    }