Ejemplo n.º 1
0
 public virtual void ConfigSkill(SkillConfig _skillConfig)
 {
     skillConfig    = _skillConfig;
     skillStateType = SkillStateType.skillTypeConfig;
     if (skillEffectPrefabsPath.Length != 0)
     {
         skillEffectPrefabs = (GameObject)Resources.Load(skillEffectPrefabsPath);
     }
 }
Ejemplo n.º 2
0
    public virtual void CastSkill()
    {
        if (isLockCastorControllerAtSkillCasting)
        {
            LockCastorContorl();
        }
        if (skillEffectPrefabs)
        {
            GameObject skillEffectGO = Instantiate(skillEffectPrefabs, transform.position, Quaternion.identity);
            skillEffectGO.transform.parent = transform;
        }

        castTimer      = 0.0f;
        skillStateType = SkillStateType.skillTypeRunning;
    }
Ejemplo n.º 3
0
    private void CastUpdate()
    {
        if (castTimer == 0)
        {
            CastSkillOnceBody();
        }

        castTimer += Time.deltaTime;
        if (castTimer >= skillCastingTime)
        {
            //技能转向执行阶段
            skillStateType = SkillStateType.skillTypeRunning;
        }
        else
        {
            //留给子类之类的做cast动效(粒子效果等)
            CastSkillUpdateBody(castTimer);
        }
    }
Ejemplo n.º 4
0
 public virtual void turnState2SkillFire()
 {
     skillStateType = SkillStateType.skillTypeRunning;
 }
Ejemplo n.º 5
0
 public virtual void RunningSkillUpdateBody(float castTimer)
 {
     //技能子类需要自己设置技能结束
     skillStateType = SkillStateType.skillTypeFinish;
 }