private void Start() { if (instance == null) { instance = this; DontDestroyOnLoad(this.gameObject); } else { Destroy(this); } }
// Start is called before the first frame update void Start() { rb2D = GetComponent <Rigidbody2D>(); dino = GetComponent <DinoController>(); settings = FindObjectOfType <DinoSettings>(); }