예제 #1
0
    public void DetermineSkillType(GameObject tSkill)
    {
        BaseSkill skillScript = tSkill.GetComponent <BaseSkill>();

        switch (skillScript.skillType)
        {
        case SkillType.FIXCASTING:
            castingTimer.Duration = skillScript.castingDuration;
            castingTimer.Run();
            PlayAnimation("IsCasting", true);
            skillScript.GetComponent <BaseSkill>().Release();
            canMove        = false;
            isCastingSkill = true;
            break;

        case SkillType.LINEDRIVECASTING:
            castingTimer.Duration = skillScript.castingDuration;
            castingTimer.Run();
            PlayAnimation("IsCasting", true);
            skillScript.GetComponent <BaseSkill>().Release();
            canMove        = false;
            isCastingSkill = true;
            break;

        case SkillType.MOVECASTING:
            castingTimer.Duration = skillScript.castingDuration;
            castingTimer.Run();
            PlayAnimation("IsCasting", true);
            skillScript.GetComponent <BaseSkill>().Release();

            buffers.Active(skillScript.castingDuration);

            isCastingSkill = true;

            break;

        case SkillType.NORMALCASTING:
            castingTimer.Duration = skillScript.castingDuration;
            castingTimer.Run();
            PlayAnimation("IsCasting", true);
            skillScript.Release();
            canMove        = false;
            isCastingSkill = true;
            break;
        }
    }