private void Awake() { controller = GetComponent <CrabController>(); controller.Died += () => { SFXManager.PlaySound(SFXManager.SFX.damageEnemy); }; roamDirection = -1; }
// Start is called before the first frame update private void Awake() { controller = GetComponent <CrabController>(); controller.Died += () => { SFXManager.StopOnce(SFXManager.SFX.walk); SceneManager.LoadScene("Stage1"); }; controller.GroundedStateChanged += (grounded) => { if (grounded) { PlayJumpEnd(); } else { PlayJumpStart(); } }; }