void Setup() { if (_Manager.currentLevel != 0) { textEffect.ShowTextDelayed("need " + _Manager.currentChipsNeededCount + " more", 3f); // Dont show this text if we are on the menu (level 0) } }
void Update() { if (isActivated) { return; } if (Input.GetMouseButtonDown(0)) { Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); RaycastHit2D hit = Physics2D.GetRayIntersection(ray, Mathf.Infinity); if (hit.collider != null && hit.collider.transform == transform) { isActivated = true; if (music.mute) { music.mute = false; _Manager.UnMute(); textEffect.RemoveText(); textEffect.ShowTextDelayed("mute", 1f); } else { music.mute = true; _Manager.Mute(); textEffect.RemoveText(); textEffect.ShowTextDelayed("unmute", 1f); } Invoke("ResetIsActivated", 0.5f); } } }
void OnLevelComplete() { textEffect.RemoveText(); textEffect.ShowTextDelayed("Reset", 7f); }
void LevelCompleteUpdateText() { textEffect.ShowTextDelayed("x" + (_Manager.totalSpawnChipCount - 1), 7f); // Show text again in 7 seconds }