// Use this for initialization void Start() { Physics2D.gravity = Vector2.zero; multiplierText.text = "Multiplier: "; line = lineObject.GetComponent <LineGenerator>(); notificationScript = GameObject.Find("NotificationText").GetComponent <TutScript> (); notificationScript.displayText("Place your finger on the circle!", 60); }
// Update is called once per frame void Update() { if (hitPercentage > 100) { //GameObject.Find("GameManager").GetComponent<GameSceneManager>().changeToScene("main_menu"); //GameObject.Find("NotifcationText").GetComponent<RectTransform>().sizeDelta = new Vector2(Screen.width * 0.8f, Screen.width * 0.8f); notificationScript.enable(); notificationScript.displayText("You Lost you worthless piece of shit, but you score is " + score.ToString("0.0"), 50); gameOver = true; playing = false; } if (Input.touchCount == 0) { resumingGame = false; countDownText.enabled = false; pauseGame(); } if (playing) { score += Time.deltaTime; hittingLine(); GameObject.Find("HP_bar").GetComponent <PositionOfHpBar>().updateHPLine(hitPercentage); lastKnownTouch = Input.GetTouch(0); } else if (!gameOver) { if (Input.touchCount == 1 && !resumingGame) { notificationScript.disable(); //Disable tutorial text resumingGame = true; tmpCounterTime = Time.realtimeSinceStartup; countDownText.enabled = true; resumeGame(); } else { if (Input.touchCount == 1) { resumeGame(); } } } }