コード例 #1
0
 public void ActiveMenu(int nIndex)
 {
     SoundManager.instance.PlaySound(eSoundArray.ES_TouchSound_Menu);
     if (uiPanels [nIndex].activeSelf)
     {
         //보스 패널 닫을시 시간 저장
         if (nIndex == 3)
         {
             //bossCreator.bossConsumeItemInfo.BossInviteMentSaveTime ();
             //bossCreator.bossConsumeItemInfo.bossRegenTimer.BossRegenTimeSave ();
             bossCreator.BossPanelInfoSave();
             yesNoButton.SetActive(false);
         }
         uiPanels [nIndex].SetActive(false);
     }
     else
     {
         AllDisable();
         uiPanels [nIndex].SetActive(true);
         yesNoButton.SetActive(false);
         //보스 패널 열시 시간 로드
         if (nIndex == 3)
         {
             bossCreator.BossPanelSetUp();
             bossCreator.bossConsumeItemInfo.BossInviteMentLoadTime();
             bossCreator.bossConsumeItemInfo.bossRegenTimer.BossRegenTimeLoad();
         }
     }
 }
コード例 #2
0
ファイル: UIManager.cs プロジェクト: kimjunhwi/BlackSmith2
    public void ActiveMenu(int nIndex)
    {
        SoundManager.instance.PlaySound(eSoundArray.ES_TouchSound_Menu);
        //Tutorial
        if (SpawnManager.Instance.tutorialPanel.eTutorialState == TutorialOrder.E_TUTORIAL_START_IMAGE03)
        {
            SpawnManager.Instance.tutorialPanel.tutorialImage_Obj.SetActive(true);
            SpawnManager.Instance.tutorialPanel.tutorial_Image.gameObject.SetActive(true);
            SpawnManager.Instance.tutorialPanel.tutorial_Image.enabled = true;

            SpawnManager.Instance.tutorialPanel.eTutorialState = TutorialOrder.E_TUTORIAL_START_IMAGE04;
            SpawnManager.Instance.tutorialPanel.ShowTutorialImage(3);
        }



        if (uiPanels [nIndex].activeSelf)
        {
            //보스 패널 닫을시 시간 저장
            if (nIndex == 3)
            {
                bossCreator.BossPanelInfoSave();
                yesNoButton.SetActive(false);
            }
            uiPanels [nIndex].SetActive(false);

            //퀘스트 패널 열고 닫을때 저장 정보
            if (nIndex == 5)
            {
                questManager.SaveQuestData();
                questManager.isQuestWindowOn = false;
            }

            if (nIndex != 5 && nIndex != 6)
            {
                SpriteState tmpSpriteState = new SpriteState();
                tmpSpriteState.disabledSprite    = uiButtons [nIndex].spriteState.disabledSprite;
                tmpSpriteState.pressedSprite     = uiButtons [nIndex].spriteState.pressedSprite;
                tmpSpriteState.highlightedSprite = null;

                uiButtons [nIndex].spriteState = tmpSpriteState;

                AllHilightImageAdd(nIndex);
            }
        }
        else
        {
            AllDisable();
            questManager.questTimer.isTimeOn = false;

            uiPanels [nIndex].SetActive(true);

            if (nIndex == 5)
            {
                questManager.isQuestWindowOn = true;
            }

            if (nIndex != 5 && nIndex != 6)
            {
                SpriteState tmpSpriteState = new SpriteState();
                tmpSpriteState.disabledSprite    = uiButtons [nIndex].spriteState.disabledSprite;
                tmpSpriteState.pressedSprite     = uiButtons [nIndex].spriteState.pressedSprite;
                tmpSpriteState.highlightedSprite = uiSprite [nIndex];

                uiButtons [nIndex].spriteState = tmpSpriteState;
            }
            yesNoButton.SetActive(false);



            //보스 패널 열시 시간 로드
            if (nIndex == 3)
            {
                //Debug.Log ("BossPanelOn!!");
                bossCreator.CheckCurDaysAndBossUnlock();
                bossCreator.BossPanelSetUp();
                bossCreator.bossConsumeItemInfo.BossInviteMentLoadTime();
                bossCreator.bossConsumeItemInfo.bossRegenTimer.BossRegenTimeLoad();
            }
        }
    }