mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 10:46:17 +00:00
重构战斗资源加载 , 新添加宠物
This commit is contained in:
@@ -10,6 +10,7 @@ import { rect } from "cc";
|
||||
import GRoleDefault from "../../../base/role/GRoleDefault";
|
||||
import { TB } from "../../../../../resources/config/data/schema";
|
||||
import GRoleAttack from "../../../base/common/GRoleAttack";
|
||||
import { sp } from "cc";
|
||||
|
||||
/**
|
||||
* 疯狂松鼠技能
|
||||
@@ -40,14 +41,14 @@ export default class GSkillCrazySquirrel extends GSkillCDBase{
|
||||
let ah = parseInt(this.info.skillArgs[2]);
|
||||
|
||||
//出现松鼠丢炸弹
|
||||
GSpine.onPlayAnotherSpine(this.role,app.battleRes.roleResSpine[30003],"skill",{
|
||||
GSpine.onPlayAnotherSpine(this.role,app.battleRes.getData(140003),"skill",{
|
||||
end:() => {
|
||||
//从天而降
|
||||
let pos = enemy.v2World.add(v2(0,1000));
|
||||
let end = enemy.v2World.clone();
|
||||
|
||||
//生成火球
|
||||
let spine = GSpine.onCreateSpine(app.battleRes.roleResSpine[30004]);
|
||||
let spine = GSpine.onCreateSpine(app.battleRes.getData(140004));
|
||||
this.role.mode.addGNode(spine.node,pos);
|
||||
spine.setAnimation(0,"animation",true);
|
||||
spine.node.angle = 90;
|
||||
@@ -59,7 +60,7 @@ export default class GSkillCrazySquirrel extends GSkillCDBase{
|
||||
.onComplete(() => {
|
||||
let world = spine.node.worldPosition;
|
||||
spine.node.destroy();
|
||||
GSpine.onPlaySceneSpine(scene,v2(world.x,world.y),app.battleRes.roleResSpine[30005],"animation");
|
||||
GSpine.onPlaySceneSpine(scene,v2(world.x,world.y),app.battleRes.getData<sp.SkeletonData>(140005),"animation");
|
||||
GDetection.testAABBCenterRole(rect(world.x,world.y,aw,ah)).forEach(enemy =>{
|
||||
GRoleAttack.onNormalAttack(this.role,enemy);
|
||||
});
|
||||
|
Reference in New Issue
Block a user