提交妙蛙种子

This commit is contained in:
DESKTOP-5RP3AKU\Jisol
2023-10-31 01:52:46 +08:00
parent 4f0f332d47
commit 94fa409ed7
202 changed files with 12354 additions and 20 deletions

View File

@@ -1,6 +1,7 @@
import { TableGRoleSkill } from "../../../resources/config/ts/TableGRoleSkill";
import GRoleBase from "../base/role/GRoleBase";
import GSkillCrazySquirrel from "./RoleSkill/GSkillCrazySquirrel";
import GSkillCrazySquirrel from "./RoleSkill/疯狂松鼠/GSkillCrazySquirrel";
import GSkillBulbasaurDoubleHit from "./RoleSkill/妙蛙种子/GSkillBulbasaurDoubleHit";
//技能状态
export enum GSkillState{
@@ -36,5 +37,6 @@ export interface GSkillBase {
//技能方式
export const GSkill:{[key:string]:(new () => GSkillBase)} = {
["GSkillCrazySquirrel"]:GSkillCrazySquirrel,
["GSkillBulbasaurDoubleHit"]:GSkillBulbasaurDoubleHit,
}

View File

@@ -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;
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "43c206f9-e341-454d-8975-d4db0a7410f0",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -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++;
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "7445290b-5e86-4a89-a281-f901aed6312e",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "009f6889-ea1e-4b90-a1a0-d54b0c027189",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -1,13 +1,13 @@
import { v2 } from "cc";
import { JTween } from "../../../../../extensions/ngame/assets/ngame/sync/frame/game/tween/JNFrameTween";
import { TableGRoleSkill } from "../../../../resources/config/ts/TableGRoleSkill";
import { app } from "../../../App";
import GSpine from "../../base/common/GSpine";
import GRoleBase from "../../base/role/GRoleBase";
import GSkillCDBase from "../GSkillCDBase";
import { JTween } from "../../../../../../extensions/ngame/assets/ngame/sync/frame/game/tween/JNFrameTween";
import { TableGRoleSkill } from "../../../../../resources/config/ts/TableGRoleSkill";
import { app } from "../../../../App";
import GSpine from "../../../base/common/GSpine";
import GRoleBase from "../../../base/role/GRoleBase";
import GSkillCDBase from "../../GSkillCDBase";
import { v3 } from "cc";
import GBaseMode from "../../GBaseMode";
import GDetection from "../../base/common/GDetection";
import GBaseMode from "../../../GBaseMode";
import GDetection from "../../../base/common/GDetection";
import { rect } from "cc";
/**

View File

@@ -2,7 +2,7 @@
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "7d3fd1cc-d849-4139-8926-689129416a29",
"uuid": "d06a5892-0787-4634-b84a-9d23804f016e",
"files": [],
"subMetas": {},
"userData": {}