void Start() { _ASPText = skillTreeButton.transform.FindChild("ASP/text").GetComponent <MadText>(); backToMenuButton.onMouseDown += backToMenuButton.onTap = (sprite) => { MadLevel.LoadFirst(); }; skillTreeButton.onMouseDown += skillTreeButton.onTap = (sprite) => { MadLevel.LoadLevelByName("Skill Tree"); }; nextWorld.onMouseDown += nextWorld.onTap = (sprite) => { setLaboratoryWorld(); }; previousWorld.onMouseDown += previousWorld.onTap = (sprite) => { setHauntedHouseWorld(); }; _ASPText.text = PlayerData.Instance.data.talentPoints.ToString(); }
IEnumerator WaitForAnimation() { yield return(new WaitForSeconds(2.2f)); // animation lasts 2 second if (completed) { // if level is completed go to next level or to 'Level Select' // depends of it this the last level if (MadLevel.HasNext(MadLevel.Type.Level)) { MadLevel.LoadNext(MadLevel.Type.Level); } else { MadLevel.LoadLevelByName("Level Select"); } } else { // if not completed go back to the menu MadLevel.LoadLevelByName("Level Select"); } }
// Use this for initialization void Start() { var sprite = GetComponent <MadSprite> (); sprite.onTap = sprite.onMouseUp = (s) => MadLevel.LoadLevelByName("main_menu_final"); }
public void LevelSelectMemory() { MadLevel.LoadLevelByName("02c_Level_Select_Memory"); }
public void LevelSelectSpeed() { MadLevel.LoadLevelByName("02b_Level_Select_Speed"); }
public void LevelSelectPerception() { MadLevel.LoadLevelByName("02a_Level_Select_Perception"); }
public void restartGame() { MadLevel.LoadLevelByName(MadLevel.currentLevelName); Time.timeScale = 1.0f; }
public void quitGame() { MadLevel.LoadLevelByName("Main Menu"); Time.timeScale = 1.0f; }
public void selectLevel() { MadLevel.LoadLevelByName("Level Select"); }
public void backToMainMenu() { MadLevel.LoadLevelByName("Main Menu"); }
IEnumerator CoGameStart() { if (isShowAd) { AdManager.ShowBannerAd(BannerAdPosition.Bottom, BannerAdSize.SmartBanner); } yield return(null); //레벨 번호 보이고 사라짐 int levelNum = 0; Int32.TryParse(MadLevel.arguments, out levelNum); Debug.Log("arg " + MadLevel.arguments); Debug.Log("levelNum " + levelNum); uiManager.textLevelNum.GetComponent <Text>().text = " - " + levelNum + " - "; uiManager.textLevelNum.SetActive(true); ////////// //ObstacleCtrl 들 시작 if (EventGameStart != null) { EventGameStart(); } ////////////// goalCtrl.trigger.radius = 0.4f; yield return(new WaitForSeconds(0.8f)); yield return(StartCoroutine(goalCtrl.CoGameStart())); yield return(StartCoroutine(playerCtrl.CoGameStart())); if (isShowAd) { AdManager.HideBannerAd(BannerAdNetwork.AdMob); } uiManager.textLevelNum.SetActive(false); //UI 클리어시 이벤트 추가 uiManager.goBtnGameNext.GetComponent <Button>().onClick.AddListener(() => { MadLevel.LoadNext(); }); uiManager.goBtnGameBack.GetComponent <Button>().onClick.AddListener(() => { MadLevel.LoadLevelByName("LevelSelectScreen"); }); uiManager.goBtnGameRestart.GetComponent <Button>().onClick.AddListener(() => { MadLevel.ReloadCurrent(); }); ////////////////// gameState = eGameState.gamePlaying; if (isShowAd) { EasyMobileManager.ShowInterstitialAd(); } }
void DoWin() { MadLevel.LoadLevelByName("Results"); }
void OnClick() { MadLevel.LoadLevelByName("Credits"); }
public void startGame() { //Application.LoadLevel("_Level Select Scene"); MadLevel.LoadLevelByName("Level Select"); }