Ejemplo n.º 1
0
    void Awake()
    {
        FSM = StateMachine <ShapeshiftState> .Initialize(this);

        FSM.Changed += StateChanged;

        _movable  = GetComponent <Movable>();
        _animator = GetComponent <Animator>();

        _stateLayers = new AnimatorStateLayers(_animator);
    }
Ejemplo n.º 2
0
    protected virtual void Awake()
    {
        _hitboxColliderLayer = LayerMask.NameToLayer("HitboxCollider");
        _attackColliderLayer = LayerMask.NameToLayer("AttackCollider");

        _movable  = GetComponent <Movable>();
        _animator = GetComponent <Animator>();

        health      = _healthConfig.maxHealth;
        _shapeshift = GetComponent <Shapeshift>();

        _stateLayers = new AnimatorStateLayers(_animator);
    }