import GSkillCrazySquirrel from "./RoleSkill/疯狂松鼠/GSkillCrazySquirrel";
import GSkillBulbasaurDoubleHit from "./RoleSkill/妙蛙种子/GSkillBulbasaurDoubleHit";
import GRoleDefault from "../base/role/GRoleDefault";
import { TB } from "../../config/data/schema";
import GSkillCDNormal from "./RoleSkill/通用技能/GSkillCDNormal";

//技能状态
export enum GSkillState{
    NoRelease,//不可释放
    Releasable,//可释放
    Releasing,//释放中
}

//技能基类
export interface GSkillBase {

    //设置
    bind(role:GRoleDefault,info:TB.TbGRoleSkill):GSkillBase;

    //是否允许释放
    isRelease():boolean;

    //释放技能
    release():boolean;

    //技能状态
    state():GSkillState;

    //技能更新
    onUpdate(dt:number);

    //返回进度条
    getProgress():number;

}


//技能方式
export const GSkill:{[key:string]:(new () => GSkillBase)} = {
    ["GSkillCrazySquirrel"]:GSkillCrazySquirrel,
    ["GSkillBulbasaurDoubleHit"]:GSkillBulbasaurDoubleHit,
    ["GSkillCDNormal"]:GSkillCDNormal,
}

