public void LevelSelect(int Level) { Time.timeScale = 1f; m_CompleteAnimator.SetBool("Show", false); m_CompleteAnimator.SetBool("Hide", true); m_MenuAnimator.SetBool("Hide", true); m_MenuAnimator.SetBool("Show", false); m_JumpController.GetComponent <JumpAndMenuScript>().RetryAvailable(); m_JumpController.GetComponent <JumpAndMenuScript>().PauseAvailable(); m_JumpController.GetComponent <JumpAndMenuScript>().StartBtnActive(false); m_JumpController.GetComponent <JumpAndMenuScript>().RetryAfterFailBtnActive(false); m_JumpController.GetComponent <JumpAndMenuScript>().JumpBtnActive(true); m_Player.GetComponent <PlayerScript>().ResetPlayer(); m_Player.GetComponent <PlayerScript>().GoalMade(false); m_Camera.GetComponent <CameraMovement>().m_Following = true; m_isPlaying = true; m_isPause = false; Destroy(m_CurrentStage); m_CurrentStageIdx = Level; string stagePath = "Stages/Stage_"; string tempPath = stagePath + (m_CurrentStageIdx); m_CurrentStage = GameObject.Instantiate((GameObject)Resources.Load(tempPath, typeof(GameObject)), new Vector3(0, 0, 0), new Quaternion(0, 0, 0, 0)); m_PlayNumbering++; if (m_PlayNumbering > 5 && m_ClearedStageIdx > 8) { if (m_ShowAds) { m_AdsHelper.ShowRewardedAd(); } } SaveFile(); }
public void BtnOnCrate(int _index) { crateNum = 0; chk = -1; index = _index; usedProb.Clear(); int crateEquipNumber = 0; switch (index) { case 1: crateEquipNumber = 1; break; case 2: //메탈 상자 crateEquipNumber = 3; break; case 3: //슈퍼 상자 crateEquipNumber = 5; break; case 4: //나무 상자 crateEquipNumber = 1; break; default: break; } if (crateEquipNumber + shopManager.storage <= 100) { if (index == 1 || index == 4) { unityAdsHelper.ShowRewardedAd(index); } StartCoroutine("BoxOpening"); } else { errorPanel.SetActive(true); } }