/* 사다리 게임 버튼을 누르면 게임 시작 */ public void SadariStart() { if (theStat.myAllMoney >= inputMoney) //돈이 있을 경우 { if (theStat.numberOfHarts > 0) //하트가 있을 경우 { theStat.HartOff(); theStat.myAllMoney -= inputMoney; theNotice.NotificationAppear(inputMoney.ToString() + "$ 입장료"); SadariPanel.SetActive(true); theSadari = FindObjectOfType <SadariManager>(); theSadari.init(); playCount++; //게임 실행 횟수 증가 ProfileSetting(); theBuilding.UpdateAllConditions(3); //건물 조건 만족 확인하기 theReport.nMonthTradeMiniCount += 1; /*미니게임 플레이횟수 증가*/ theReport.nMonthUseMiniMoney += inputMoney; /*미니게임 게임비 쓴 돈*/ } else//하트가 없을 경우 { theNotice.NotificationAppear("하트가 부족합니다."); } } else//돈이 없을 경우 { theNotice.NotificationAppear("돈이 부족합니다."); } }
public IEnumerator Move() { //이미 내려갔는데 전체결과로 또 불러오면 안되기 때문에 if (isEnd) { yield break; } finishNum = 0; isHorizontal = false; dir = Vector2.down; SM.PlayersGl.enabled = false; GetComponent <Button>().interactable = false; SM.BlindPanel.SetActive(true); RectTransform Rt = GetComponent <RectTransform>(); thePlayer = FindObjectOfType <SadariManager>(); int player; //플레이어가 고른 풍선은 2배로 내려가고 나머지는 정배속으로 내려감 if (thePlayer.player) { player = 2; } else { player = 1; } while (Rt.anchoredPosition.y > -4000) { transform.Translate(dir * 450 * player * Time.deltaTime); yield return(new WaitForSeconds(0.001f)); } }