Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
middleLayer_for_DG
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_DG
Commits
adc27763
Commit
adc27763
authored
3 years ago
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs:
parent
453af711
master
v46
v45
v44
v43
v42
v41
v40
v39
v38
v37
v36
v35
v34
v33
v32
v31
v30
v29
v28
v27
v26
v25
v24
v23
v22
v21
v20
v19
v18
v17
v16
v15
v14
v13
v12
v11
v10
v9
v8
v7
v6
v5
v4
v3
v2
v1
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
11 deletions
+55
-11
README.md
README.md
+31
-10
cocos_generator.meta
assets/cocos_generator.meta
+15
-1
MyCocosSceneComponent.ts
assets/cocos_generator/script/MyCocosSceneComponent.ts
+9
-0
No files found.
README.md
View file @
adc27763
...
@@ -30,20 +30,22 @@ git clone xxx
...
@@ -30,20 +30,22 @@ git clone xxx
cd 项目名称/
cd 项目名称/
npm install
npm install
// 打开Cocos Creator, 点击项目(Project)=> 添加(Add) 在打开的对话框里面选择进入clone下来的项目,选择play文件夹,然后打开
// 进行常规的Cocos开发
```
```
*
打开Cocos Creator, 点击项目(Project)=> 添加(Add) 在打开的对话框里面选择进入clone下来的项目,选择本项目,然后打开
*
基于项目里“this.data”进行常规的Cocos开发 (其中this.data是云平台的配置数据)
*
注意 Cocos Creator 版本必须是2.4.5
## 本地调试
## 本地调试
在基于CocosCreator的开发与预览调试都完成之后,需要进行模板放到云平台上的数据配置等方面的调试,还要进行cocos打包到IOS/Android真机上的调试,为了更方便与高效的调试,我们提供了如下工具进行调试与测试
### 普通模板
### 普通模板
*
找到 Cocos Creator 的安装目录下 Creator/2.4.5/CocosCreator.app/Contents/Resources/static/preview-templates/index.jade 文件
*
启动本地服务
*
在引入JS的位置添加如下代码:
```
```
script(type='text/javascript' charset='utf-8' src='//staging-teach.cdn.ireadabc.com/h5template/h5-static-lib/js/air.js')
npm start
```
```
*
打开浏览器:http://staging-teach.ireadabc.com/template_ci/debug
*
打开浏览器:http://staging-teach.ireadabc.com/template_ci/debug
...
@@ -51,13 +53,32 @@ script(type='text/javascript' charset='utf-8' src='//staging-teach.cdn.ireadabc.
...
@@ -51,13 +53,32 @@ script(type='text/javascript' charset='utf-8' src='//staging-teach.cdn.ireadabc.
### 互动模板
### 互动模板
*
找到 Cocos Creator 的安装目录下 Creator/2.4.5/CocosCreator.app/Contents/Resources/static/preview-templates/index.jade 文件
*
找到项目根路径下 index.html 文件
*
在引入JS的位置添加如下代码:
*
在引入JS的位置将air.js改为air_online_open.js
*
启动本地服务
```
```
script(type='text/javascript' charset='utf-8' src='//staging-teach.cdn.ireadabc.com/h5template/h5-static-lib/js/air_online_open.js')
npm start
```
```
*
打开浏览器:http://staging-teach.ireadabc.com/template_ci/debug
*
打开浏览器:http://staging-teach.ireadabc.com/template_ci/debug
*
点击右上角齿轮,选择技术选型、调试模式选择“互动”
*
点击右上角齿轮,选择技术选型、调试模式选择“互动”
*
左侧老师、右侧学生
*
左侧老师、右侧学生
\ No newline at end of file
### 真机调试
*
下载模板调试专用app
http://download-iplayabc.oss-cn-beijing.aliyuncs.com/iDebugABC.apk

*
启动本地服务
```
npm start
```
*
手机和电脑连接同一个Wifi
*
打开调试app,根据提示输入IP地址,点击开始就可以在手机上预览模板了
*
\ No newline at end of file
This diff is collapsed.
Click to expand it.
assets/cocos_generator.meta
View file @
adc27763
{"ver":"1.1.2","uuid":"c35bb2f6-f24a-4850-ae44-643f2fdc7541","isBundle":false,"bundleName":"","priority":1,"compressionType":{},"optimizeHotUpdate":{},"inlineSpriteFrames":{},"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": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {
"ios": false,
"android": false
},
"subMetas": {}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
assets/cocos_generator/script/MyCocosSceneComponent.ts
View file @
adc27763
...
@@ -123,6 +123,15 @@ export class MyCocosSceneComponent extends cc.Component {
...
@@ -123,6 +123,15 @@ export class MyCocosSceneComponent extends cc.Component {
});
});
}
}
log
(
str
)
{
const
node
=
cc
.
find
(
'
middleLayer
'
);
if
(
node
){
node
.
getComponent
(
'
middleLayer
'
).
showLog
(
str
);
}
else
{
cc
.
log
(
str
);
}
}
onLoadEnd
()
{
onLoadEnd
()
{
}
}
...
...
This diff is collapsed.
Click to expand it.
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