Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
middleLayer_for_debug
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
middleLayer_for_debug
Commits
0e56757f
Commit
0e56757f
authored
Nov 25, 2021
by
范雪寒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: log
parent
87ebc38a
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1658 additions
and
11 deletions
+1658
-11
middleLayer_for_debug.meta
play/assets/middleLayer_for_debug.meta
+24
-1
middleLayer_for_debug.fire
...ts/middleLayer_for_debug/scene/middleLayer_for_debug.fire
+1591
-2
middleLayer.js
play/assets/middleLayer_for_debug/script/middleLayer.js
+36
-2
project.json
play/project.json
+1
-1
buildCocos.js
publish/buildCocos.js
+6
-5
No files found.
play/assets/middleLayer_for_debug.meta
View file @
0e56757f
{"ver":"1.1.2","uuid":"c35bb2f6-f24a-4850-ae44-643f2fdc7541","isBundle":false,"bundleName":"","priority":1,"compressionType":{"android":"default","ios":"default"},"optimizeHotUpdate":{"android":false,"ios":false},"inlineSpriteFrames":{"android":false,"ios":false},"isRemoteBundle":{"ios":false,"android":false},"subMetas":{}}
{
\ No newline at end of file
"ver": "1.1.2",
"uuid": "c35bb2f6-f24a-4850-ae44-643f2fdc7541",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {
"android": "default",
"ios": "default"
},
"optimizeHotUpdate": {
"android": false,
"ios": false
},
"inlineSpriteFrames": {
"android": false,
"ios": false
},
"isRemoteBundle": {
"ios": false,
"android": false
},
"subMetas": {}
}
\ No newline at end of file
play/assets/middleLayer_for_debug/scene/middleLayer_for_debug.fire
View file @
0e56757f
This diff is collapsed.
Click to expand it.
play/assets/middleLayer_for_debug/script/middleLayer.js
View file @
0e56757f
...
@@ -66,6 +66,10 @@ cc.Class({
...
@@ -66,6 +66,10 @@ cc.Class({
if
(
bundleName
)
{
if
(
bundleName
)
{
nameText
.
getComponent
(
cc
.
EditBox
).
string
=
bundleName
;
nameText
.
getComponent
(
cc
.
EditBox
).
string
=
bundleName
;
}
}
global
.
middleLayer
=
cc
.
find
(
'
middleLayer
'
).
getComponent
(
'
middleLayer
'
);
middleLayer
.
log
(
"
middleLayer.log('像这样在这里打log')
"
);
},
},
asyncDelayLog
(
str
)
{
asyncDelayLog
(
str
)
{
...
@@ -137,6 +141,36 @@ cc.Class({
...
@@ -137,6 +141,36 @@ cc.Class({
this
.
loadOnlineBundle
(
bundleName
);
this
.
loadOnlineBundle
(
bundleName
);
exitBtn
.
active
=
true
;
exitBtn
.
active
=
true
;
});
});
const
btnClose
=
cc
.
find
(
'
middleLayer/ConsoleNode/BtnClose
'
);
const
btnOpen
=
cc
.
find
(
'
middleLayer/ConsoleNode/BtnOpen
'
);
const
consoleNode
=
cc
.
find
(
'
middleLayer/ConsoleNode/Console
'
);
const
consoleBg
=
cc
.
find
(
'
middleLayer/ConsoleNode/bg
'
);
btnOpen
.
on
(
'
click
'
,
()
=>
{
btnClose
.
active
=
true
;
btnOpen
.
active
=
false
;
consoleNode
.
active
=
true
;
consoleBg
.
active
=
true
;
});
btnClose
.
on
(
'
click
'
,
()
=>
{
btnClose
.
active
=
false
;
btnOpen
.
active
=
true
;
consoleNode
.
active
=
false
;
consoleBg
.
active
=
false
;
});
},
log
(
str
)
{
const
logStr
=
`
${
new
Date
().
toLocaleString
()}
:
${
str
}
`
;
console
.
log
(
logStr
);
const
content
=
cc
.
instantiate
(
cc
.
find
(
'
middleLayer/ConsoleNode/content
'
));
content
.
active
=
true
;
const
label
=
content
.
getChildByName
(
'
label
'
);
label
.
getComponent
(
cc
.
Label
).
string
=
logStr
;
const
consoleContent
=
cc
.
find
(
'
middleLayer/ConsoleNode/Console/content
'
);
consoleContent
.
addChild
(
content
);
consoleContent
.
getComponent
(
cc
.
Layout
).
updateLayout
();
},
},
hideUI
()
{
hideUI
()
{
...
@@ -155,12 +189,12 @@ cc.Class({
...
@@ -155,12 +189,12 @@ cc.Class({
},
},
loadLocalBundle
(
address
,
port
)
{
loadLocalBundle
(
address
,
port
)
{
this
.
callNetworkApiGet
(
`http://
${
address
}
:
${
port
}
`
,
'
/
publish
/config.json
'
,
{},
(
datastr
)
=>
{
this
.
callNetworkApiGet
(
`http://
${
address
}
:
${
port
}
`
,
'
/
dist
/config.json
'
,
{},
(
datastr
)
=>
{
const
data
=
JSON
.
parse
(
datastr
);
const
data
=
JSON
.
parse
(
datastr
);
console
.
log
(
JSON
.
stringify
(
data
));
console
.
log
(
JSON
.
stringify
(
data
));
const
sceneName
=
data
.
android
.
sceneName
;
const
sceneName
=
data
.
android
.
sceneName
;
const
version
=
data
.
android
.
version
;
const
version
=
data
.
android
.
version
;
const
bondleUrl
=
`http://
${
address
}
:
${
port
}
/
publish
/android/
${
sceneName
}
/`
;
const
bondleUrl
=
`http://
${
address
}
:
${
port
}
/
dist
/android/
${
sceneName
}
/`
;
this
.
loadBundle
(
sceneName
,
version
,
bondleUrl
);
this
.
loadBundle
(
sceneName
,
version
,
bondleUrl
);
});
});
},
},
...
...
play/project.json
View file @
0e56757f
...
@@ -3,6 +3,6 @@
...
@@ -3,6 +3,6 @@
"packages"
:
"packages"
,
"packages"
:
"packages"
,
"name"
:
"play"
,
"name"
:
"play"
,
"id"
:
"9af72fd2-44a6-4131-8ea3-3e1b3fa22231"
,
"id"
:
"9af72fd2-44a6-4131-8ea3-3e1b3fa22231"
,
"version"
:
"2.4.
4
"
,
"version"
:
"2.4.
5
"
,
"isNew"
:
false
"isNew"
:
false
}
}
\ No newline at end of file
publish/buildCocos.js
View file @
0e56757f
...
@@ -76,11 +76,12 @@ export async function build() {
...
@@ -76,11 +76,12 @@ export async function build() {
}
}
const
creatorBasePath
=
'
C:
\\
CocosDashboard_1.0.6
\\
resources
\\
.editors
\\
Creator
'
;
// const creatorBasePath = 'C:\\CocosDashboard_1.0.6\\resources\\.editors\\Creator';
const
creatorBasePath
=
'
/Applications/CocosCreator/Creator/2.4.5/CocosCreator.app/Contents/MacOS/CocosCreator
'
;
export
function
buildWebDesktop
()
{
export
function
buildWebDesktop
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
const
buffer
=
spawn
(
const
buffer
=
spawn
(
`
${
creatorBasePath
}
\\2.4.0\\CocosCreator.exe`
,
creatorBasePath
,
[
'
--path
'
,
'
./
'
,
'
--build
'
,
'
platform=web-desktop;debug=true
'
,
'
--force
'
],
[
'
--path
'
,
'
./
'
,
'
--build
'
,
'
platform=web-desktop;debug=true
'
,
'
--force
'
],
{
cwd
:
'
../play
'
}
{
cwd
:
'
../play
'
}
);
);
...
@@ -103,7 +104,7 @@ export function buildWebDesktop() {
...
@@ -103,7 +104,7 @@ export function buildWebDesktop() {
export
function
buildAndroidBundle
()
{
export
function
buildAndroidBundle
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
const
buffer
=
spawn
(
const
buffer
=
spawn
(
`
${
creatorBasePath
}
\\2.4.4\\CocosCreator.exe`
,
creatorBasePath
,
[
'
--path
'
,
'
./
'
,
'
--build
'
,
"
platform=ios;debug=false;md5Cache=true;buildPath=build_android;appABIs=['armeabi-v7a','x86','x86_64','arm64-v8a'];encryptJs=true;xxteaKey=6bbfce23-28b4-4a;zipCompressJs=true
"
,
'
--force
'
],
[
'
--path
'
,
'
./
'
,
'
--build
'
,
"
platform=ios;debug=false;md5Cache=true;buildPath=build_android;appABIs=['armeabi-v7a','x86','x86_64','arm64-v8a'];encryptJs=true;xxteaKey=6bbfce23-28b4-4a;zipCompressJs=true
"
,
'
--force
'
],
{
cwd
:
'
../play
'
}
{
cwd
:
'
../play
'
}
);
);
...
@@ -126,7 +127,7 @@ export function buildAndroidBundle() {
...
@@ -126,7 +127,7 @@ export function buildAndroidBundle() {
export
function
buildIosBundle
()
{
export
function
buildIosBundle
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
const
buffer
=
spawn
(
const
buffer
=
spawn
(
`
${
creatorBasePath
}
\\2.4.4\\CocosCreator.exe`
,
creatorBasePath
,
[
'
--path
'
,
'
./
'
,
'
--build
'
,
"
platform=ios;debug=false;md5Cache=true;buildPath=build_ios;encryptJs=true;xxteaKey=6bbfce23-28b4-4a;zipCompressJs=true
"
,
'
--force
'
],
[
'
--path
'
,
'
./
'
,
'
--build
'
,
"
platform=ios;debug=false;md5Cache=true;buildPath=build_ios;encryptJs=true;xxteaKey=6bbfce23-28b4-4a;zipCompressJs=true
"
,
'
--force
'
],
{
cwd
:
'
../play
'
}
{
cwd
:
'
../play
'
}
);
);
...
@@ -150,7 +151,7 @@ export function buildIosBundle() {
...
@@ -150,7 +151,7 @@ export function buildIosBundle() {
export
function
buildWebBundle
()
{
export
function
buildWebBundle
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
const
buffer
=
spawn
(
const
buffer
=
spawn
(
`
${
creatorBasePath
}
\\2.4.4\\CocosCreator.exe`
,
creatorBasePath
,
[
'
--path
'
,
'
./
'
,
'
--build
'
,
"
platform=web-desktop;debug=false;buildPath=build_web_desktop
"
,
'
--force
'
],
[
'
--path
'
,
'
./
'
,
'
--build
'
,
"
platform=web-desktop;debug=false;buildPath=build_web_desktop
"
,
'
--force
'
],
{
cwd
:
'
../play
'
}
{
cwd
:
'
../play
'
}
);
);
...
...
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