void Start() { SCR_Profile.Load(); s_score = 0; NextQuestion(); }
public void Start() { //SCR_Profile.Reset(); SCREEN_HEIGHT = Camera.main.orthographicSize * 2; SCREEN_WIDTH = SCREEN_HEIGHT * Screen.width / Screen.height; GARDEN_X = garden.transform.position.x; GARDEN_Y = garden.transform.position.y; GARDEN_WIDTH = garden.transform.localScale.x; GARDEN_HEIGHT = garden.transform.localScale.y; GARDEN_LEFT = GARDEN_X - GARDEN_WIDTH * 0.5f; GARDEN_RIGHT = GARDEN_X + GARDEN_WIDTH * 0.5f; GARDEN_TOP = GARDEN_Y + GARDEN_HEIGHT * 0.5f; GARDEN_BOTTOM = GARDEN_Y - GARDEN_HEIGHT * 0.5f; SCR_Profile.Load(); if (!SCR_Profile.finishedTutorial) { SCR_Profile.Reset(); } txtBrain.text = FormatNumber(SCR_Profile.brain); for (int i = 0; i < SCR_Profile.NUMBER_ZOMBIES; i++) { SpawnZombie(i, SCR_Profile.numberZombies[i]); } for (int i = 0; i < SCR_Profile.numberTombs; i++) { SpawnTomb(); } showingTutorial = !SCR_Profile.finishedTutorial; backgrounds[0].SetActive(true); for (int i = 1; i < backgrounds.Length; i++) { backgrounds[i].SetActive(false); } grpAreaIsFull.SetActive(false); grpPerfect.SetActive(false); zombieShop.SetActive(false); if (showingTutorial) { ShowTutorial(TutorialPhase.OPEN_TOMB); } else { hand.SetActive(false); } cvsGameplay.SetActive(true); cvsUpgrade.SetActive(false); cvsCollection.SetActive(false); cvsCoin.SetActive(true); cvsDiscover.SetActive(false); scrZombieShop = cvsGameplay.transform.Find("ZombieShop").GetComponent <SCR_ZombieShop>(); scrUpgradeShop = cvsUpgrade.transform.Find("UpgradeShop").GetComponent <SCR_UpgradeShop>(); UpdateTotalProductionRate(); MobileAds.Initialize(appId); RequestBanner(); SetBannerTop(); started = true; }
void Start() { SCR_Profile.Load(); }