mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
重构战斗资源加载 , 新添加宠物
This commit is contained in:
@@ -13,6 +13,7 @@ import { rect } from "cc";
|
||||
import GRoleDefault from "../role/GRoleDefault";
|
||||
import { TB } from "../../../../resources/config/data/schema";
|
||||
import GRoleAttack from "../common/GRoleAttack";
|
||||
import { sp } from "cc";
|
||||
|
||||
/**
|
||||
* 抛物线 爆炸普攻
|
||||
@@ -25,10 +26,9 @@ export default class GAttackParabolicRemote implements GAttackBase{
|
||||
let enemy = role.fsm.enemy;
|
||||
if(!enemy) return;
|
||||
|
||||
let image:SpriteFrame = app.battleRes.roleResImage[info.attackArgs[0]];
|
||||
let image:SpriteFrame = app.battleRes.getData<SpriteFrame>(info.attackArgs[0]);
|
||||
let bang = {
|
||||
ske: app.battleRes.roleResSpine[info.attackArgs[1]],
|
||||
info: TD.TbGRoleBattleRes.get(parseInt(info.attackArgs[1]))
|
||||
ske: app.battleRes.getData<sp.SkeletonData>(info.attackArgs[1]),
|
||||
};
|
||||
let bone = role.spine.findBone(info.attackArgs[2]);
|
||||
let scale:number = parseFloat(info.attackArgs[3]);
|
||||
@@ -40,7 +40,6 @@ export default class GAttackParabolicRemote implements GAttackBase{
|
||||
return;
|
||||
}
|
||||
|
||||
// console.log(`播放动画[GAttackParabolicRemote]`,role.nId,enemy.nId)
|
||||
|
||||
console.log(role.spine,bone);
|
||||
let bullet = GAttackBullet.create(GButtleDefault,{
|
||||
|
@@ -99,8 +99,8 @@ export default abstract class GRoleBase<T> extends GObject<T>{
|
||||
|
||||
//初始化
|
||||
protected init(role:TB.TbGRole){
|
||||
console.log("初始化宠物",!!this.spine,!!(app.battleRes.roleSpine[role.id]));
|
||||
this.spine.skeletonData = app.battleRes.roleSpine[role.id];
|
||||
console.log("初始化宠物",!!this.spine,!!(app.battleRes.getRoleSpine(role.id)));
|
||||
this.spine.skeletonData = app.battleRes.getRoleSpine(role.id);
|
||||
}
|
||||
|
||||
//创建一个状态机
|
||||
|
Reference in New Issue
Block a user