private void OnDestroy() { if (Instance == this) { Instance = null; } }
private void Awake() { lr = GetComponent <LineRenderer>(); score = 0; if (!clickToFire) { Time.timeScale = 0.05f; } //creating instance of self if (Instance == null) { Instance = this; } }