Example #1
0
    public IEnumerator NoneDelaySkill()
    {
        yield return(new WaitForSeconds(0.1f));

        if (activeSkill.m_strAttackPriority == "enemy")
        {
            TargetList = characterManager.FindEnemyDistanceArea(transform.position, activeSkill.m_fAttackRange, Skiller_Type);
        }

        else
        {
            TargetList = characterManager.FindFriendDistanceArea(transform.position, activeSkill.m_fAttackRange, Skiller_Type);
        }

        string[] strActiveTypes = activeSkill.m_strSkillType.Split(',');

        for (int nIndex = 0; nIndex < strActiveTypes.Length; nIndex++)
        {
            AllActiveSkillType skillData = GameManager.Instance.cAllActiveType[int.Parse(strActiveTypes[nIndex])];

            skillManager.ActiveSkill(skillData.nActiveType, activeSkill, skiller, TargetList, false);
        }

        yield return(new WaitForSeconds(1.0f));

        objectPool.ReturnObject(gameObject);
    }
Example #2
0
    //Active Skill관련 -----------------------
    #region  ActiveSkill
    public void PlayActiveSkill(int _nActiveSkillIndex, bool _bIsCritical)
    {
        //Parsing된 스킬에서 SkillType과 Target을 받아옴
        //cf

        if (charicStats.activeSkill[_nActiveSkillIndex].m_strAnimationClip != "-1")
        {
            animator.SetTrigger(charicStats.activeSkill [_nActiveSkillIndex].m_strAnimationClip);
        }

        string[] strActiveTypes = charicStats.activeSkill[_nActiveSkillIndex].m_strSkillType.Split(',');

        for (int nIndex = 0; nIndex < strActiveTypes.Length; nIndex++)
        {
            targetCharacter_LIST.Clear();

            AllActiveSkillType skillData = GameManager.Instance.cAllActiveType[int.Parse(strActiveTypes[nIndex])];

            if (skillData == null)
            {
                return;
            }

            targetCharacter_LIST = GetTargetLIST(skillData.nTargetIndex, _nActiveSkillIndex);

            if (targetCharacter_LIST.Count == 0)
            {
                continue;
            }

            skillManager.ActiveSkill(skillData.nActiveType, charicStats.activeSkill[_nActiveSkillIndex], this, targetCharacter_LIST, _bIsCritical);
        }
    }