private void LateUpdate() { if (m_listener.Selected && m_tracking) { m_listener.GetTouch(); Debug.DrawLine(m_TouchBeginPos, m_listener.GetPreviousTouchPosition(), Color.black, 3); if (Vector2.Distance(m_TouchBeginPos, m_listener.GetPreviousTouchPosition()) > distance) { TouchEnd(); } } }
void Update() { if (!isPause) { //test.GetTouch(resetCheck); touchListener.GetTouch(); if (timer.End) { resetCheck = false; if (resultDlg.activeSelf == false) { resultDlg.SetActive(true); resultScore.text = string.Format("{0:#,###0}", blockTarget.Score); blockTarget.scoreText.text = ""; GoogleManager.Instance.LogIn(); achievementTracker.CheckAchievement(); GoogleManager.Instance.ReportLeaderboardScore(Main.blockTarget.Score); AdManager.Instance.DisplayBanner(); ResetValues(); } } } if (Input.GetKeyDown(KeyCode.Escape)) { if (timer.End || timeLeft > 0) { Initiate.Fade("Main", Color.white, 1.2f); } else { PauseGame(); } } }