Пример #1
0
    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>();
    }
Пример #2
0
    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>();
    }