Ejemplo n.º 1
0
 public void EventAnimationListen(EAnimationEvent eAnimationEvent)
 {
     if (p_Event_OnAnimationEvent != null)
     {
         p_Event_OnAnimationEvent(eAnimationEvent);
     }
 }
    /* public - [Event] Function
     * 프랜드 객체가 호출                       */

    public void EventAnimation(EAnimationEvent eMessage)
    {
        switch (eMessage)
        {
        case EAnimationEvent.AnimationStart:
            _bIsPlaying_Attack = true;
            break;

        case EAnimationEvent.AnimationFinish:
            _bIsPlaying_Attack = false;
            _pControl_Animator.DoSetParam_Int(EAnimatorParam.MeleeType_int, (int)EAnimatorParam_MeleeType.None);
            break;

        case EAnimationEvent.AttackStart:

            if ((_eCharcaterModelOption & EFlagCharacterModelOption.ColliderCheck_OnAttack) == EFlagCharacterModelOption.ColliderCheck_OnAttack)
            {
                _pEquipHand_Right.DoSetColliderOn(_pCollider);
            }

            break;

        case EAnimationEvent.AttackFinish:
            HashSet <Collider> setEnemy = _pEquipHand_Right.DoSetColliderOff();
            setEnemy.Remove(_pCollider);
            setEnemy.ToList(_listEnemy);
            p_EVENT_OnAttackFinish(_listEnemy);
            break;
        }
    }