mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
重置配置表
This commit is contained in:
@@ -1,14 +1,10 @@
|
||||
import { Node } from "cc";
|
||||
import { TableGRoleAttack } from "../../../../resources/config/ts/TableGRoleAttack";
|
||||
import GRoleBase from "../role/GRoleBase";
|
||||
import GAttackNormal from "./GAttackNormal";
|
||||
import GAttackParabolicBangRemote from "./GAttackParabolicBangRemote";
|
||||
import { UITransform } from "cc";
|
||||
import GButtleBase from "../bullet/GButtleBase";
|
||||
import { GFSMAnimBase } from "../fsm/GFSMAnimBase";
|
||||
import GFSMBase from "../fsm/GFSMBase";
|
||||
import GRoleDefault from "../role/GRoleDefault";
|
||||
import GNode from "../common/GNode";
|
||||
import { TB } from "../../../../resources/config/data/schema";
|
||||
|
||||
//攻击子弹类
|
||||
export class GAttackBullet{
|
||||
@@ -26,7 +22,7 @@ export class GAttackBullet{
|
||||
|
||||
//攻击方式基类
|
||||
export interface GAttackBase{
|
||||
attack(role:GRoleDefault,info:TableGRoleAttack);
|
||||
attack(role:GRoleDefault,info:TB.TbGRoleAttack);
|
||||
}
|
||||
|
||||
//攻击方式
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { TableGRoleAttack } from "../../../../resources/config/ts/TableGRoleAttack";
|
||||
import { TB } from "../../../../resources/config/data/schema";
|
||||
import GRoleDefault from "../role/GRoleDefault";
|
||||
import { GAttackBase } from "./GAttack";
|
||||
|
||||
@@ -6,7 +6,7 @@ import { GAttackBase } from "./GAttack";
|
||||
//普通攻击
|
||||
export default class GAttackNormal implements GAttackBase{
|
||||
|
||||
attack(role: GRoleDefault, info: TableGRoleAttack) {
|
||||
attack(role: GRoleDefault, info: TB.TbGRoleAttack) {
|
||||
role.fsm.enemy.onHit();
|
||||
}
|
||||
|
||||
|
@@ -1,6 +1,5 @@
|
||||
import { SpriteFrame } from "cc";
|
||||
import { TableGRoleAttack } from "../../../../resources/config/ts/TableGRoleAttack";
|
||||
import { app } from "../../../App";
|
||||
import { TD, app } from "../../../App";
|
||||
import GRoleBase from "../role/GRoleBase";
|
||||
import { GAttackBase, GAttackBullet } from "./GAttack";
|
||||
import GButtleDefault from "../bullet/GButtleDefault";
|
||||
@@ -9,10 +8,10 @@ import { bezier } from "cc";
|
||||
import { v2 } from "cc";
|
||||
import { Vec2 } from "cc";
|
||||
import GEffectUtil from "../common/GEffectUtil";
|
||||
import { TableGRoleAttackEffect } from "../../../../resources/config/ts/TableGRoleAttackEffect";
|
||||
import GDetection from "../common/GDetection";
|
||||
import { rect } from "cc";
|
||||
import GRoleDefault from "../role/GRoleDefault";
|
||||
import { TB } from "../../../../resources/config/data/schema";
|
||||
|
||||
/**
|
||||
* 抛物线 爆炸普攻
|
||||
@@ -20,15 +19,15 @@ import GRoleDefault from "../role/GRoleDefault";
|
||||
*/
|
||||
export default class GAttackParabolicRemote implements GAttackBase{
|
||||
|
||||
attack(role: GRoleDefault, info: TableGRoleAttack): void {
|
||||
attack(role: GRoleDefault, info: TB.TbGRoleAttack): void {
|
||||
|
||||
let enemy = role.fsm.enemy;
|
||||
if(!enemy) return;
|
||||
|
||||
let image:SpriteFrame = app.battleRes.bullets[info.attackArgs[0]];
|
||||
let image:SpriteFrame = app.battleRes.roleResImage[info.attackArgs[0]];
|
||||
let bang = {
|
||||
ske: app.battleRes.effects[info.attackArgs[1]],
|
||||
info: TableGRoleAttackEffect.getConfig(info.attackArgs[1])
|
||||
ske: app.battleRes.roleResSpine[info.attackArgs[1]],
|
||||
info: TD.TbGRoleBattleRes.get(parseInt(info.attackArgs[1]))
|
||||
};
|
||||
let bone = role.spine.findBone(info.attackArgs[2]);
|
||||
let scale:number = parseFloat(info.attackArgs[3]);
|
||||
@@ -73,7 +72,7 @@ export default class GAttackParabolicRemote implements GAttackBase{
|
||||
let effect = GEffectUtil.createOne(bang.ske);
|
||||
role.mode.addGNode(effect.node,bullet.node.worldPosition);
|
||||
//获取默认动画
|
||||
effect.setAnimation(0,bang.info.animation,false);
|
||||
effect.setAnimation(0,"animation",false);
|
||||
//销毁
|
||||
bullet.node.destroy();
|
||||
|
||||
|
Reference in New Issue
Block a user