// Update is called once per frame void Update() { EmploymentManager employ = GameObject.Find("EmployManager").GetComponent <EmploymentManager>(); if (employ.chunsooruExist == true) { timespa += Time.deltaTime; if (timespa > checkTi) { eventbox(); delaytime += Time.deltaTime; if (delaytime > delaychecktime) { box.active = false; timespa = 0; delaytime = 0; } } if (touchcnt > 5) { box.active = false; touchcnt = 0; boxClickPopup.active = true; } } }
public void rebirthbtnClick() { EmploymentManager employ = GameObject.Find("EmployManager").GetComponent <EmploymentManager> (); IconManager potioncnt = GameObject.Find("IconManager").GetComponent <IconManager>(); RebirthCount++; if (potioncnt.rebirthpotion != 0) { totalrandum = Random.Range(0, 10000); if (totalrandum <= 5000) { gmfrrebirth(); Alramspoon[0].active = true; } else if (totalrandum <= 8000 && totalrandum > 5000) { plasticrebirth(); Alramspoon[1].active = true; } else if (totalrandum <= 9500 && totalrandum > 8000) { nokrebirth(); Alramspoon[2].active = true; } else if (totalrandum <= 9800 && totalrandum > 9500) { dongrebirth(); Alramspoon[3].active = true; } else if (totalrandum <= 9900 && totalrandum > 9800) { silverrebirth(); Alramspoon[4].active = true; } else if (totalrandum <= 9980 && totalrandum > 9900) { goldrebirth(); Alramspoon[5].active = true; } else if (totalrandum <= 10000 && totalrandum > 9980) { diarebirth(); Alramspoon[6].active = true; } popup.active = false; potioncnt.rebirthpotion -= 1; AlramPopup.active = true; employ.chunsooruExist = false; } }
public void allrebirth(ulong cktouchmoney) { CharacterInfo character = GameObject.Find("CharacterManager").GetComponent <CharacterInfo>(); EmploymentManager employ = GameObject.Find("EmployManager").GetComponent <EmploymentManager>(); GrilFriendManager girl = GameObject.Find("GirlFriendManager").GetComponent <GrilFriendManager>(); //여자친구 초기화 for (int i = 0; i < 6; i++) { girl.GirlFriend[i].active = false; girl.GFExist[i] = false; girl.ison[i] = false; girl.Backgroundcl[i].color = girl.open; girl.btn_text[i].text = "사귀기"; if (i != 5) { girl.ClosePopup[i].active = true; } character.GFTruetoFalse[i] = false; } //캐릭터 레벨 초기화 character.noretry = 0; character.JugallumLev = 0; character.BeforeLevelPrice = 0; character.NextLevelPrice = 0; character.TwoNextLevelPrice = 10; character.TouchMoneyPlus = 0; character.TouchMoney = cktouchmoney; //고용하기 초기화 for (int i = 0; i < 11; i++) { employ.EmployerLevel[i] = 0; employ.Employer[i].active = false; employ.moneyspeed[i] = employ.speedplus[i]; employ.NextLevelPrice[i] = employ.StartLevelPrice[i]; employ.TwoNextLevelPrice[i] = employ.StartLevelPrice[i]; employ.plusmoney[i] = 0; if (i != 10) { employ.ClosePopup[i].active = true; } employ.btn_text[i].fontSize = 8; employ.btn_text[i].text = "비용:" + employ.TwoNextLevelPrice[i] + "\n" + "초당:" + employ.moneyspeed[i] + "원"; employ.name_text[i].text = "" + employ.EmployerLevel[i]; } }