// Use this for initialization void Start() { // use this to interface with the top bar by calling top_bar.setPercentage(float percentage); top_bar = GameObject.FindGameObjectWithTag("progress_bar").GetComponent <progress_bar>(); staff = GameObject.Find("grand staff"); limit = 0; enemyCount = 0; threshold = 1; streak = 0; bad_hit = 0; initChordArray(); initNoteNames(); Vector3 staffPos = staff.transform.position; float staffPosX = staffPos.x; float staffPosY = staffPos.y; float staffSizeX = staff.GetComponent <SpriteRenderer>().size.x; float staffSizeY = staff.GetComponent <SpriteRenderer>().size.y; notespos.Set(20f, staffPosY, 0); //notespos.Set(staffPosX + staffSizeX/2, staffPosY, 0); notesrot.Set(0, 0, 0, 1); monsterPos.Set(20f, 5.5f, 0); monsterRot.Set(0, 0, 0, 1); setSavedValues(); setThreshLimit(); if (threshold > threshLimit) { threshold = threshLimit; } winUI.SetActive(false); loseUI.SetActive(false); statusText.text = ""; UpdateUI(); InvokeRepeating("Spawn", spawnTime, spawnTime); }