void OnTriggerEnter2D(Collider2D target) { if (target.CompareTag("Player")) { if (triggerCutsceneOnSolve) { triggerCutsceneOnSolve.TriggerCutscene(); } } }
private void OnTriggerEnter2D(Collider2D target) { if (target.CompareTag("Player") || target.CompareTag("Boulder")) { SoundManagerScript.Instance.PlaySFX(SoundManagerScript.AudioClipID.SFX_ONPANEL); gameObject.GetComponent <SpriteRenderer>().sprite = solved; stepped = true; if (triggerCutsceneOnSolve) { triggerCutsceneOnSolve.TriggerCutscene(); } // Debug.Log("panel is ON"); } }