mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-26 18:26:23 +00:00
完美
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
import { _decorator, Component, director, instantiate, Node, Prefab } from 'cc';
|
||||
import { app } from './App';
|
||||
import { Env, JNGame } from '../../extensions/ngame/assets/ngame/JNGame';
|
||||
import { JNGame } from '../../extensions/ngame/assets/ngame/JNGame';
|
||||
import { JNSyncAction } from '../../extensions/ngame/assets/ngame/sync/JNSyncAction';
|
||||
import { GOnHookPets } from '../../extensions/ngame/assets/ngame/message/proto';
|
||||
import { EnvCurrent } from './Env';
|
||||
import { Env, EnvCurrent } from './Env';
|
||||
import { GAction } from './consts/GAction';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
window['GUser'] = "100000";
|
||||
@@ -34,6 +35,11 @@ export class Main extends Component {
|
||||
// 创建世界
|
||||
director.getScene().addChild(instantiate(this.WorldPrefab));
|
||||
|
||||
if(EnvCurrent == Env.Server){
|
||||
//发送就绪
|
||||
app.socket.Send(GAction.CR_REFEREE_READY);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -19,6 +19,7 @@ export enum GAction {
|
||||
|
||||
|
||||
/*************** 裁决 *********************/
|
||||
CR_REFEREE_READY = 4000, //裁决就绪
|
||||
CR_REFEREE_PVP_MODE = 4001, //裁决PVP模式
|
||||
CR_REFEREE_PVP_END = 4002, //裁决PVP结束
|
||||
|
||||
|
@@ -27,7 +27,7 @@ export class MainView extends JNGLayerBase {
|
||||
|
||||
//更新UI界面
|
||||
onUpdateView(){
|
||||
this.playerNameLabel.string = PlayerData.getIns().getInfo().playerName;
|
||||
this.playerNameLabel.string = `${PlayerData.getIns().getInfo().playerId}`;
|
||||
}
|
||||
|
||||
//打开Demo页面
|
||||
|
Reference in New Issue
Block a user