void Start() { if (limitScale) { for (int i = 0; i < scalerList.Count; i++) { if (Screen.width >= scalerList[i].referenceResolution.x) { instance.scalerList[i].uiScaleMode = CanvasScaler.ScaleMode.ConstantPixelSize; } else { instance.scalerList[i].uiScaleMode = CanvasScaler.ScaleMode.ScaleWithScreenSize; } } } if (perkMenuOnly) { UIHUD.GetInstance().gameObject.SetActive(false); UIBuildButton.GetInstance().gameObject.SetActive(false); UIAbilityButton.GetInstance().gameObject.SetActive(false); UITowerView.GetInstance().gameObject.SetActive(false); UIPerkMenu.DisableCloseButton(); OnPerkMenu(); } }
// Use this for initialization void Start () { instance=this; buttonSpawn.Init(); txtTimer.text=""; scoreObj.SetActive(false); List<Rsc> rscList=ResourceManager.GetResourceList(); for(int i=0; i<rscList.Count; i++){ if(i==0) rscObjList[i].Init(); else rscObjList.Add(rscObjList[0].Clone("RscObj"+i, new Vector3(i*90, 0, 0))); rscObjList[i].imageIcon.sprite=rscList[i].icon; } OnLife(0); OnNewWave(1); OnResourceChanged(new List<int>()); if(SpawnManager.AutoStart()){ buttonSpawn.rootObj.SetActive(false); //StartCoroutine(AutoStartTimer()); OnSpawnTimer(SpawnManager.GetAutoStartDelay()); } }
// Use this for initialization void Start() { _instance = this; init = true; txtTimer.text = "Start Game"; scoreObj.SetActive(false); OnLife(0); OnNewWave(1); OnResourceChanged(0); if (SpawnManager.AutoStart()) { buttonSpawn.SetActive(false); OnSpawnTimer(SpawnManager.GetAutoStartDelay()); } }
// Use this for initialization void Start() { instance = this; buttonSpawn.Init(); txtTimer.text = ""; scoreObj.SetActive(false); List <Rsc> rscList = ResourceManager.GetResourceList(); for (int i = 0; i < rscList.Count; i++) { if (i == 0) { rscObjList[i].Init(); } else { rscObjList.Add(rscObjList[0].Clone("RscObj" + i, new Vector3(i * 90, 0, 0))); } rscObjList[i].imageIcon.sprite = rscList[i].icon; } OnLife(0); OnNewWave(1); OnResourceChanged(new List <int>()); if (SpawnManager.AutoStart()) { buttonSpawn.rootObj.SetActive(false); //StartCoroutine(AutoStartTimer()); OnSpawnTimer(SpawnManager.GetAutoStartDelay()); } }
void Awake() { instance=this; thisObj=gameObject; }
void Start() { instance=this; txtTimer.text = ""; OnLife(0); OnScore(0); if(SpawnManager.AutoStart()){ OnSpawnTimer(SpawnManager.GetAutoStartDelay()); } }
void Awake() { instance = this; }