mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 10:46:17 +00:00
提交妙蛙种子
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
import { TableGRoleSkill } from "../../../../../resources/config/ts/TableGRoleSkill";
|
||||
import GRoleBase from "../../../base/role/GRoleBase";
|
||||
import GSkillAngerBase from "../../GSkillAngerBase";
|
||||
|
||||
export default class GSkillBulbasaurDoubleHit extends GSkillAngerBase{
|
||||
|
||||
role:GRoleBase<{}>;
|
||||
info: TableGRoleSkill;
|
||||
|
||||
bind(role:GRoleBase<{}>,info: TableGRoleSkill):GSkillBulbasaurDoubleHit {
|
||||
//技能冷却
|
||||
this.role = role;
|
||||
this.info = info;
|
||||
this.angerMax = parseInt(info.skillArgs[0]);
|
||||
this.role.addAttackCallback(this.addAnger.bind(this))
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
onRelease(): boolean {
|
||||
|
||||
let enemy = this.role.fsm.enemy;
|
||||
//关闭动画管理器
|
||||
this.role.fsmAnim.close();
|
||||
|
||||
//监听伤害
|
||||
this.role.fsmAnim.addEventListener("skill1Attack",() => {
|
||||
if(!enemy.isDie){
|
||||
enemy.onHit();
|
||||
}
|
||||
})
|
||||
//播放妙蛙种子技能
|
||||
this.role.spine.setTrackCompleteListener(this.role.spine.setAnimation(0,"skill1",false),() => {
|
||||
this.role.fsmAnim.open();
|
||||
});
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
//添加怒气
|
||||
addAnger(){
|
||||
this.anger++;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "7445290b-5e86-4a89-a281-f901aed6312e",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
Reference in New Issue
Block a user