public virtual void ConfigSkill(SkillConfig _skillConfig) { skillConfig = _skillConfig; skillStateType = SkillStateType.skillTypeConfig; if (skillEffectPrefabsPath.Length != 0) { skillEffectPrefabs = (GameObject)Resources.Load(skillEffectPrefabsPath); } }
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; }
private void CastUpdate() { if (castTimer == 0) { CastSkillOnceBody(); } castTimer += Time.deltaTime; if (castTimer >= skillCastingTime) { //技能转向执行阶段 skillStateType = SkillStateType.skillTypeRunning; } else { //留给子类之类的做cast动效(粒子效果等) CastSkillUpdateBody(castTimer); } }
public virtual void turnState2SkillFire() { skillStateType = SkillStateType.skillTypeRunning; }
public virtual void RunningSkillUpdateBody(float castTimer) { //技能子类需要自己设置技能结束 skillStateType = SkillStateType.skillTypeFinish; }