public override void Awake() { base.Awake(); currentDirection = Direction.Right; currentSpirit = maxSpirit; playerAnimator = GetComponent <Animator>(); meleeManager = transform.FindChild("MeleeCollider").GetComponent <PlayerMeleeManager>(); feet = transform.FindChild("FeetCollider").GetComponent <PlayerFeetCollision>(); Physics2D.IgnoreCollision(feet.GetComponent <Collider2D>(), meleeManager.GetComponent <Collider2D>()); ducking = false; smashing = false; particleSystem = this.transform.FindChild("ParticleSystem").GetComponent <ParticleSystem>(); particleSystem.enableEmission = false; _soundManager = GameObject.Find("SoundManager").GetComponent <SoundManager>(); }
public override void Awake() { base.Awake(); currentDirection = Direction.Right; currentSpirit = maxSpirit; playerAnimator = GetComponent<Animator>(); meleeManager = transform.FindChild("MeleeCollider").GetComponent<PlayerMeleeManager>(); feet = transform.FindChild("FeetCollider").GetComponent<PlayerFeetCollision>(); Physics2D.IgnoreCollision(feet.GetComponent<Collider2D>(), meleeManager.GetComponent<Collider2D>()); ducking = false; smashing = false; particleSystem = this.transform.FindChild("ParticleSystem").GetComponent<ParticleSystem>(); particleSystem.enableEmission = false; _soundManager = GameObject.Find("SoundManager").GetComponent<SoundManager>(); }