PC-20230316NUNE\Administrator f99f10e237 提交
2023-12-11 10:42:36 +08:00

60 lines
1.5 KiB
TypeScript

import { Vec2 } from "cc";
import GDefaultMode from "./default/GDefaultMode";
import { TB } from "../../../resources/config/data/schema";
import GRoleDefault from "../base/role/GRoleDefault";
import { _decorator } from "cc";
const { ccclass, property } = _decorator;
//阵营守护
//玩家派兵攻击对方阵营 游戏参考
@ccclass('GCampGuardianMode')
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;
// }
}