// float initYPos; void Awake() { if (_instance != null && _instance != this) { Destroy(this.gameObject); return; } _instance = this; DontDestroyOnLoad(this.gameObject); }
private void Awake() { playerTransform = GameObject.Find("TireModel").GetComponent <Transform>(); trail = GetComponent <TrailRenderer>(); runnerScript = FindObjectOfType <RunnerPlayerMovement>(); }