Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
op_16
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
op_16
Commits
54c8ea67
Commit
54c8ea67
authored
Feb 21, 2022
by
范雪寒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: player offline layer
parent
912c2a58
Changes
14
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
2088 additions
and
164 deletions
+2088
-164
PlayerOffLineLayer.meta
assets/op_16/prefab/PlayerOffLineLayer.meta
+12
-0
PlayerOffLineLayer.js
assets/op_16/prefab/PlayerOffLineLayer/PlayerOffLineLayer.js
+38
-0
PlayerOffLineLayer.js.meta
...p_16/prefab/PlayerOffLineLayer/PlayerOffLineLayer.js.meta
+9
-0
PlayerOffLineLayer.prefab
...op_16/prefab/PlayerOffLineLayer/PlayerOffLineLayer.prefab
+872
-0
PlayerOffLineLayer.prefab.meta
.../prefab/PlayerOffLineLayer/PlayerOffLineLayer.prefab.meta
+8
-0
textures.meta
assets/op_16/prefab/PlayerOffLineLayer/textures.meta
+12
-0
BtnExit.png
assets/op_16/prefab/PlayerOffLineLayer/textures/BtnExit.png
+0
-0
BtnExit.png.meta
...op_16/prefab/PlayerOffLineLayer/textures/BtnExit.png.meta
+36
-0
BtnFrame.png
assets/op_16/prefab/PlayerOffLineLayer/textures/BtnFrame.png
+0
-0
BtnFrame.png.meta
...p_16/prefab/PlayerOffLineLayer/textures/BtnFrame.png.meta
+36
-0
BtnPlayAgain.png
...op_16/prefab/PlayerOffLineLayer/textures/BtnPlayAgain.png
+0
-0
BtnPlayAgain.png.meta
.../prefab/PlayerOffLineLayer/textures/BtnPlayAgain.png.meta
+36
-0
op_16.fire
assets/op_16/scene/op_16.fire
+1027
-164
op_16.ts
assets/op_16/scene/op_16.ts
+2
-0
No files found.
assets/op_16/prefab/PlayerOffLineLayer.meta
0 → 100644
View file @
54c8ea67
{
"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
assets/op_16/prefab/PlayerOffLineLayer/PlayerOffLineLayer.js
0 → 100644
View file @
54c8ea67
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
)
=>
{
});
});
},
});
assets/op_16/prefab/PlayerOffLineLayer/PlayerOffLineLayer.js.meta
0 → 100644
View file @
54c8ea67
{
"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
assets/op_16/prefab/PlayerOffLineLayer/PlayerOffLineLayer.prefab
0 → 100644
View file @
54c8ea67
This diff is collapsed.
Click to expand it.
assets/op_16/prefab/PlayerOffLineLayer/PlayerOffLineLayer.prefab.meta
0 → 100644
View file @
54c8ea67
{
"ver": "1.2.9",
"uuid": "1e11f1b1-8bd1-448d-92da-17f062444db3",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}
\ No newline at end of file
assets/op_16/prefab/PlayerOffLineLayer/textures.meta
0 → 100644
View file @
54c8ea67
{
"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
assets/op_16/prefab/PlayerOffLineLayer/textures/BtnExit.png
0 → 100644
View file @
54c8ea67
9.59 KB
assets/op_16/prefab/PlayerOffLineLayer/textures/BtnExit.png.meta
0 → 100644
View file @
54c8ea67
{
"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
assets/op_16/prefab/PlayerOffLineLayer/textures/BtnFrame.png
0 → 100644
View file @
54c8ea67
16.6 KB
assets/op_16/prefab/PlayerOffLineLayer/textures/BtnFrame.png.meta
0 → 100644
View file @
54c8ea67
{
"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
assets/op_16/prefab/PlayerOffLineLayer/textures/BtnPlayAgain.png
0 → 100644
View file @
54c8ea67
8.55 KB
assets/op_16/prefab/PlayerOffLineLayer/textures/BtnPlayAgain.png.meta
0 → 100644
View file @
54c8ea67
{
"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
assets/op_16/scene/op_16.fire
View file @
54c8ea67
This diff is collapsed.
Click to expand it.
assets/op_16/scene/op_16.ts
View file @
54c8ea67
...
@@ -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
)
=>
{});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment