protected override void Awake() { animator = GetComponent <Animator>(); rb2D = GetComponent <Rigidbody2D>(); tDetection = GetComponentInChildren <TerrainDetection>(); pushbox = GetComponentInChildren <Pushbox>(); }
protected override void Awake() { base.Awake(); tDetection = GetComponentInChildren <TerrainDetection>(); hitboxObject = transform.GetChild(0).gameObject; hitCollider = hitboxObject.GetComponent <Collider2D>(); spriteRenderer = GetComponent <SpriteRenderer>(); }
private void OnTriggerExit(Collider collision) { if (collision.gameObject.tag == "Player" || collision.gameObject.tag == "PNJ") { TerrainDetection managerSound = collision.gameObject.GetComponentInChildren <TerrainDetection>(); if (!managerSound.IsPlayingFootstepSound) { return; } managerSound.CharIsOnSpecialSurface = false; } }