mirror of
https://gitee.com/jisol/jisol-game/
synced 2026-04-05 21:12:20 +00:00
开源...
This commit is contained in:
@@ -138,7 +138,7 @@ export default class GBattleModeManager extends Singleton {
|
||||
async Close(data?:any){
|
||||
|
||||
//主动调用场景销毁
|
||||
app.sync.onReset();
|
||||
app.sync.onDestroy();
|
||||
let current = this.current;
|
||||
this.current = null;
|
||||
|
||||
|
||||
@@ -79,8 +79,8 @@ export default abstract class GRoleBase<T> extends GObject<T>{
|
||||
this._values = value;
|
||||
}
|
||||
|
||||
//添加避障
|
||||
ov:NOVBase;
|
||||
// //添加避障
|
||||
// ov:NOVBase;
|
||||
|
||||
get():this{
|
||||
if(this.isDie) return null;
|
||||
@@ -89,8 +89,8 @@ export default abstract class GRoleBase<T> extends GObject<T>{
|
||||
|
||||
onSyncLoad(){
|
||||
|
||||
//避障
|
||||
this.ov = new NOV2DSimple(this.node.getComponent(BoxCollider2D));
|
||||
// //避障
|
||||
// this.ov = new NOV2DSimple(this.node.getComponent(BoxCollider2D));
|
||||
|
||||
if(!this.spine) this.spine = this.node.getComponent(JNSkeleton);
|
||||
//如果没有生成则直接销毁
|
||||
|
||||
@@ -32,7 +32,7 @@ export default class GPetAttribute extends GAttributeBase{
|
||||
});
|
||||
|
||||
//计算升级成长属性
|
||||
let level = this.pet.petLevel; //宠物等级
|
||||
let level = 1 + this.pet.petStar; //宠物等级
|
||||
let grow = TD.TbGRoleUpGrow.get(this.pet.petId) || TD.TbGRoleUpGrow.get(0); //成长
|
||||
|
||||
TD.TbGAttribute.getDataList().forEach(attr => {
|
||||
|
||||
@@ -6,7 +6,7 @@ import GAttributeBase from "../GAttributeBase";
|
||||
export default class GPetEquipAttribute extends GAttributeBase{
|
||||
|
||||
//宠物信息
|
||||
equips:PetEquip[];
|
||||
equips:PetEquip[] = [];
|
||||
|
||||
constructor(equips:PetEquip[]){
|
||||
|
||||
|
||||
@@ -241,8 +241,7 @@ export default class GOnHookMode extends GNormalModeBase<{},{}>{
|
||||
petId:0,
|
||||
petPlayerId:0,
|
||||
petTbId:creeps.petTbId,
|
||||
petLevel:creeps.petLevel,
|
||||
petStar:0,
|
||||
petStar:creeps.petLevel,
|
||||
petStarExp:0,
|
||||
}));
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ export default class GPVPMode extends GBaseMode<{},GPVPStart>{
|
||||
rightTbs[index] = null;
|
||||
|
||||
if(petId != 0){
|
||||
let pet:PlayerPetOV = JSON.parse(this.data.leftPets[petId]);
|
||||
let pet:PlayerPetOV = JSON.parse(this.data.rightPets[petId]);
|
||||
if(pet && pet.petId)
|
||||
rightTbs[index] = pet;
|
||||
}
|
||||
@@ -112,7 +112,7 @@ export default class GPVPMode extends GBaseMode<{},GPVPStart>{
|
||||
//调整相机
|
||||
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,360,camreaPos.z)
|
||||
|
||||
//初始化战斗
|
||||
console.log("GPVPMode 模式初始化");
|
||||
|
||||
Reference in New Issue
Block a user