Commit 54c8ea67 authored by 范雪寒's avatar 范雪寒

feat: player offline layer

parent 912c2a58
{
"ver": "1.1.2",
"uuid": "9696bc51-6bb3-405d-a8ed-0004ec3c80ae",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
cc.Class({
extends: cc.Component,
properties: {
},
start () {
const BtnExit = cc.find('BtnFrame/BtnExit', this.node);
BtnExit.on('click', ()=>{
const middleLayer = cc.find('middleLayer');
if(middleLayer) {
cc.game.removePersistRootNode(middleLayer);
}
cc.director.getScene().destroy();
cc.audioEngine.stopAll();
if (window.courseware) {
window.courseware.freeAllOcMethod();
}
cc.director.loadScene("debug_shell", null, null, (err, scene) => {
});
});
const BtnPlayAgain = cc.find('BtnFrame/BtnPlayAgain', this.node);
BtnPlayAgain.on('click', ()=>{
const sceneName = cc.director.getScene().name;
cc.director.getScene().destroy();
cc.audioEngine.stopAll();
if (window.courseware) {
window.courseware.freeAllOcMethod();
}
cc.director.loadScene(sceneName, null, null, (err, scene) => {
});
});
},
});
{
"ver": "1.0.8",
"uuid": "b0f566a5-d2a1-4389-9c1c-92e315e3f71a",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.2.9",
"uuid": "1e11f1b1-8bd1-448d-92da-17f062444db3",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "2fd40893-f2f4-411c-8fe3-4399d0b91937",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "484a02bb-20eb-4a48-b440-c9b9c08bed96",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 158,
"height": 60,
"platformSettings": {},
"subMetas": {
"BtnExit": {
"ver": "1.0.4",
"uuid": "5ad5a040-45af-4787-b6ad-ef6d25814c6c",
"rawTextureUuid": "484a02bb-20eb-4a48-b440-c9b9c08bed96",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 158,
"height": 60,
"rawWidth": 158,
"rawHeight": 60,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "cb354f78-665c-443e-9893-e06d09b42cd4",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 684,
"height": 244,
"platformSettings": {},
"subMetas": {
"BtnFrame": {
"ver": "1.0.4",
"uuid": "4560a114-94c8-4372-ade2-c489c6e74bb7",
"rawTextureUuid": "cb354f78-665c-443e-9893-e06d09b42cd4",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 684,
"height": 244,
"rawWidth": 684,
"rawHeight": 244,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "90340e1e-6634-40aa-936d-a81f5968ffc0",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 158,
"height": 60,
"platformSettings": {},
"subMetas": {
"BtnPlayAgain": {
"ver": "1.0.4",
"uuid": "f5f86bc8-874a-4fd8-9dc9-e89b2f7420e6",
"rawTextureUuid": "90340e1e-6634-40aa-936d-a81f5968ffc0",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 158,
"height": 60,
"rawWidth": 158,
"rawHeight": 60,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
This diff is collapsed.
...@@ -627,6 +627,8 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -627,6 +627,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
cc.log("playerLeave" + JSON.stringify(event)); cc.log("playerLeave" + JSON.stringify(event));
}); });
this.networkHelper.on("playerOffLine", (event) => { this.networkHelper.on("playerOffLine", (event) => {
cc.find('Canvas/bg/PlayerOffLineLayer').active = true;
this.networkHelper.leaveRoom();
cc.log("playerOffLine" + JSON.stringify(event)); cc.log("playerOffLine" + JSON.stringify(event));
}); });
this.networkHelper.on("gameStart", (event) => {}); this.networkHelper.on("gameStart", (event) => {});
......
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