mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-10-13 02:26:07 +00:00
提交妙蛙种子
This commit is contained in:
@@ -6,23 +6,50 @@ import { GSkillBase, GSkillState } from "./GSkill";
|
||||
//怒气冷却
|
||||
export default abstract class GSkillAngerBase implements GSkillBase {
|
||||
|
||||
//怒气值
|
||||
anger:number = 0;
|
||||
//怒气最大值
|
||||
angerMax:number = 0;
|
||||
|
||||
bind(role: GRoleBase<{}>, info: TableGRoleSkill): GSkillBase {
|
||||
throw new Error("Method not implemented.");
|
||||
}
|
||||
isRelease(): boolean {
|
||||
throw new Error("Method not implemented.");
|
||||
return this.anger >= this.angerMax;
|
||||
}
|
||||
release(): boolean {
|
||||
throw new Error("Method not implemented.");
|
||||
//是否可以释放技能
|
||||
if(!this.isRelease()) return false;
|
||||
this.anger = 0;
|
||||
return this.onRelease();
|
||||
}
|
||||
|
||||
//子类实现释放
|
||||
abstract onRelease():boolean;
|
||||
|
||||
|
||||
//是否正在释放技能
|
||||
isReleasing(): boolean{
|
||||
return false;
|
||||
}
|
||||
|
||||
state(): GSkillState {
|
||||
throw new Error("Method not implemented.");
|
||||
|
||||
if(this.isReleasing()){
|
||||
return GSkillState.Releasing
|
||||
}
|
||||
|
||||
if(this.isRelease())
|
||||
return GSkillState.Releasable
|
||||
else
|
||||
return GSkillState.NoRelease
|
||||
|
||||
}
|
||||
onUpdate(dt: number) {
|
||||
throw new Error("Method not implemented.");
|
||||
}
|
||||
//返回进度条
|
||||
getProgress(): number {
|
||||
throw new Error("Method not implemented.");
|
||||
return this.anger / this.angerMax;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user