private void Awake() { if (_instance == null) { _instance = this; } }
private void OnTriggerEnter(Collider other) { if (other.gameObject.tag == "Player") { UIManagerSystem.Instance().ShowLevelUpText(); PlayerController player = other.GetComponent <PlayerController>(); player._levelUpController = true; player._speed = 2f; } }
private void OnTriggerExit(Collider other) { if (other.gameObject.tag == "Player") { UIManagerSystem.Instance().CloseLevelUpText(); PlayerController player = other.GetComponent <PlayerController>(); player._levelUpController = false; player._speed = 1f; GameManager.Instance().CreateRoadContinue(); } }
public void Die() { direction = 0; _speed = 1f; isLive = false; _canRotate = false; _canStillRotate = false; _testBool1 = false; _testBool2 = false; ScoreManager.Instance().SetScore(0); UIManagerSystem.Instance().ShowResetButton(); _rope._lineRenderer.positionCount = 0; }
private void FirstStart() { if (Input.GetMouseButtonDown(0)) { _firstStart = false; isLive = true; UIManagerSystem.Instance().CloseTabToStartText(); } else if (Input.touchCount > 0) { _firstStart = false; isLive = true; UIManagerSystem.Instance().CloseTabToStartText(); } }
public void SetScore(int score) { _score = score; UIManagerSystem.Instance().ChangeScoreTextValue(_score); }