Commit 8bf8c6da by Mike Zhu

update cid when data.type is entry

parent 1fc27b70
...@@ -32,6 +32,7 @@ class Main extends egret.DisplayObjectContainer { ...@@ -32,6 +32,7 @@ class Main extends egret.DisplayObjectContainer {
public constructor() { public constructor() {
super(); super();
this.addEventListener(egret.Event.ADDED_TO_STAGE, this.onAddToStage, this); this.addEventListener(egret.Event.ADDED_TO_STAGE, this.onAddToStage, this);
} }
private onAddToStage(event: egret.Event) { private onAddToStage(event: egret.Event) {
...@@ -65,7 +66,7 @@ class Main extends egret.DisplayObjectContainer { ...@@ -65,7 +66,7 @@ class Main extends egret.DisplayObjectContainer {
const userInfo = await platform.getUserInfo(); const userInfo = await platform.getUserInfo();
Store.onMessage({ Store.onMessage({
type: 'setUserInfo', type: 'setUserInfo',
data: userInfo payload: userInfo
}) })
console.log(userInfo); console.log(userInfo);
...@@ -117,6 +118,10 @@ class Main extends egret.DisplayObjectContainer { ...@@ -117,6 +118,10 @@ class Main extends egret.DisplayObjectContainer {
} }
if(data.type === 'entry') { if(data.type === 'entry') {
Store.onMessage({
type: 'updateCid',
payload: data
})
SceneManager.getInstance().roomScene.update(data) SceneManager.getInstance().roomScene.update(data)
} }
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment