mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
提交
This commit is contained in:
@@ -1,10 +1,53 @@
|
||||
import { Vec2 } from "cc";
|
||||
import GDefaultMode from "./default/GDefaultMode";
|
||||
import { TB } from "../../../resources/config/data/schema";
|
||||
import GRoleDefault from "../base/role/GRoleDefault";
|
||||
|
||||
//阵营守护
|
||||
//玩家派兵攻击对方阵营 游戏参考
|
||||
export default class GCampGuardianMode extends GDefaultMode<{},{}>{
|
||||
|
||||
//玩家水晶位置
|
||||
playerPos: Vec2 = new Vec2(-400,0);
|
||||
//敌方位置
|
||||
enemyPos: Vec2 = new Vec2(400,0);
|
||||
|
||||
|
||||
onSyncInitSuccess(){
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
// //生成宠物
|
||||
// onGenRole(info:TB.TbGRole):GRoleDefault {
|
||||
|
||||
// // let tactical = this.getInfo(type).tactical;
|
||||
// // let pos:Vec2 = this.getInfo(type).tactical.getPosition(index);
|
||||
// // if(!pos) return;
|
||||
// // let role = instantiate(this.rolePrefab);
|
||||
|
||||
// // let entity = role.getComponent(GRoleDefault);
|
||||
// // //初始化
|
||||
// // entity.onInit(type,info,tactical,index);
|
||||
|
||||
// // //绑定寻敌
|
||||
// // entity.onQueryEunmy = () => {
|
||||
// // return this.getEnumy(entity,type);
|
||||
// // }
|
||||
|
||||
// // //绑定死亡回调
|
||||
// // entity.addKillBackEvent(this.onRoleKillBack.bind(this))
|
||||
// // //绑定受击回调
|
||||
// // entity.addHitCallback(this.onHitBack.bind(this));
|
||||
|
||||
// // this.addGObject(entity,tactical.getPosition(index));
|
||||
|
||||
// // this.getOnesRole(type).push(entity);
|
||||
|
||||
// // return entity;
|
||||
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
|
@@ -115,6 +115,7 @@ export default class GOnHookMode extends GDefaultMode<{},{}>{
|
||||
console.log("GOnHookMode 模式初始化");
|
||||
|
||||
//调整相机
|
||||
this.camera.enabled = true;
|
||||
let camreaPos = this.camera.node.worldPosition;
|
||||
this.camera.node.worldPosition = v3(0,800,camreaPos.z)
|
||||
|
||||
|
@@ -110,6 +110,7 @@ export default class GPVPMode extends GBaseMode<{},GPVPStart>{
|
||||
onSyncInitSuccess(): void {
|
||||
|
||||
//调整相机
|
||||
this.camera.enabled = true;
|
||||
let camreaPos = this.camera.node.worldPosition;
|
||||
this.camera.node.worldPosition = v3(0,800,camreaPos.z)
|
||||
|
||||
|
Reference in New Issue
Block a user