mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
提交
This commit is contained in:
@@ -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();
|
||||
|
||||
}
|
||||
|
@@ -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); //普通攻击
|
||||
|
@@ -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));
|
||||
|
Reference in New Issue
Block a user