This commit is contained in:
DESKTOP-5RP3AKU\Jisol
2023-12-25 02:06:56 +08:00
parent 516d520c5e
commit 5366e3413c
18 changed files with 1054 additions and 441 deletions

View File

@@ -10,6 +10,8 @@ import { CCObject } from "cc";
import { Env, EnvCurrent } from "../Env";
import { TB } from "../config/data/schema";
import BattleResource from "../tools/BattleResource";
import { director } from "cc";
import { game } from "cc";
export enum BattleMode{
//无尽模式
@@ -127,6 +129,7 @@ export default class GBattleModeManager extends Singleton {
//资源加载完成则显示世界
app.sync.onReset();
game.step();
app.sync.onStart();
}

View File

@@ -67,14 +67,15 @@ export default class GAttackParabolicBangRemote implements GAttackBase{
))
})
.onComplete(() => {
//销毁
bullet.node.destroy();
if(!role.get()) return;
//生成爆炸特效
let effect = GEffectUtil.createOne(bang.ske);
role.mode.addGNode(effect.node,bullet.node.worldPosition);
//获取默认动画
effect.setAnimation(0,"animation",false);
//销毁
bullet.node.destroy();
GDetection.testAABBCenterRole(rect(effect.node.worldPosition.x,effect.node.worldPosition.y,aw,ah)).forEach(enemy =>{
GRoleAttack.onNormalAttack(role,enemy); //普通攻击

View File

@@ -117,7 +117,7 @@ export default class GOnHookMode extends GDefaultMode<{},{}>{
//调整相机
this.camera.enabled = true;
let camreaPos = this.camera.node.worldPosition;
this.camera.node.worldPosition = v3(0,800,camreaPos.z)
this.camera.node.worldPosition = v3(0,750,camreaPos.z)
//初始化状态机
this.fsm = new GFSMOnHookMode(this);
@@ -354,14 +354,13 @@ export default class GOnHookMode extends GDefaultMode<{},{}>{
//生成敌人
onResetGenerateEnemy(){
this.enemyRoles = [];
//获取敌人
let creeps = GOnHookManager.getIns().getNextCreeps();
if(!creeps) return; //没有获取到野怪则返回
let sign = TD.TbGOnHookMaps.get(GOnHookData.getIns().info.onHookMap).sign;
let table:{data:TbGEntity.TOnHookLevel} = TD[sign].get(GOnHookData.getIns().info.levelId);
for (let index = 0; index < table.data.petSize; index++) {
//获取敌人
let creeps = GOnHookManager.getIns().getNextCreeps();
if(!creeps) return; //没有获取到野怪则返回
this.onGenCreeps(index + 1,creeps);
}
// this.enemyInfo.roles.forEach((info,index) => this.onGenRole(GOnHookModePlayerEnum.ENEMY,index + 1,info));