Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cake_class_1
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
cake_class_1
Commits
a1dc2e8a
Commit
a1dc2e8a
authored
Mar 09, 2022
by
章红平
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
‘提交信息’
parent
f4038c1c
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
227 additions
and
26 deletions
+227
-26
cake_class_1.fire
assets/cake_class_1/scene/cake_class_1.fire
+125
-3
cake_class_1.ts
assets/cake_class_1/scene/cake_class_1.ts
+12
-1
MyCocosSceneComponent.ts
assets/cake_class_1/script/MyCocosSceneComponent.ts
+2
-16
middleLayer.ts
assets/cake_class_1/script/middleLayer.ts
+37
-0
middleLayer.ts.meta
assets/cake_class_1/script/middleLayer.ts.meta
+9
-0
builder.json
settings/builder.json
+7
-5
project.json
settings/project.json
+35
-1
No files found.
assets/cake_class_1/scene/cake_class_1.fire
View file @
a1dc2e8a
...
@@ -15,6 +15,9 @@
...
@@ -15,6 +15,9 @@
"_children": [
"_children": [
{
{
"__id__": 2
"__id__": 2
},
{
"__id__": 27
}
}
],
],
"_active": false,
"_active": false,
...
@@ -884,7 +887,7 @@
...
@@ -884,7 +887,7 @@
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width": 0,
"width": 0,
"height":
0
"height":
50.4
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -928,7 +931,11 @@
...
@@ -928,7 +931,11 @@
"__id__": 16
"__id__": 16
},
},
"_enabled": true,
"_enabled": true,
"_materials": [],
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_dstBlendFactor": 771,
"_string": "",
"_string": "",
...
@@ -1083,7 +1090,11 @@
...
@@ -1083,7 +1090,11 @@
"__id__": 19
"__id__": 19
},
},
"_enabled": true,
"_enabled": true,
"_materials": [],
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_dstBlendFactor": 771,
"_spriteFrame": {
"_spriteFrame": {
...
@@ -1298,6 +1309,117 @@
...
@@ -1298,6 +1309,117 @@
"__id__": 2
"__id__": 2
},
},
"_enabled": true,
"_enabled": true,
"candleN": null,
"_id": "eaTVUpqahPfZeO9+sUI7RP"
"_id": "eaTVUpqahPfZeO9+sUI7RP"
},
{
"__type__": "cc.Node",
"_name": "middleLayer",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 28
},
{
"__id__": 29
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 97.87,
"height": 50.4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
640,
360,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "e4dKV4CyhEaKp0ChMGFMHk"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 27
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "Label",
"_N$string": "Label",
"_fontSize": 40,
"_lineHeight": 40,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "14Nq2izkRFg7UlFZ1hULpO"
},
{
"__type__": "bfa28dfIqtJGZ2a6CpvLNsg",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 27
},
"_enabled": true,
"label": null,
"text": "hello",
"_id": "758k66wFpKB6uEtO+DFQ01"
}
}
]
]
\ No newline at end of file
assets/cake_class_1/scene/cake_class_1.ts
View file @
a1dc2e8a
...
@@ -5,7 +5,9 @@ const { ccclass, property } = cc._decorator;
...
@@ -5,7 +5,9 @@ const { ccclass, property } = cc._decorator;
@
ccclass
@
ccclass
export
default
class
SceneComponent
extends
MyCocosSceneComponent
{
export
default
class
SceneComponent
extends
MyCocosSceneComponent
{
// property()
@
property
(
cc
.
Prefab
)
candleN
:
cc
.
Prefab
=
null
addPreloadImage
()
{
addPreloadImage
()
{
// TODO 根据自己的配置预加载图片资源
// TODO 根据自己的配置预加载图片资源
this
.
_imageResList
.
push
({
url
:
this
.
data
.
pic_url
});
this
.
_imageResList
.
push
({
url
:
this
.
data
.
pic_url
});
...
@@ -27,12 +29,21 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -27,12 +29,21 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
initView
();
this
.
initView
();
this
.
initListener
();
this
.
initListener
();
}
}
start
(){
super
.
start
();
// this.playBones(this.candleN,"newAnimation")
}
_cantouch
=
null
;
_cantouch
=
null
;
initData
()
{
initData
()
{
// 所有全局变量 默认都是null
// 所有全局变量 默认都是null
this
.
_cantouch
=
true
;
this
.
_cantouch
=
true
;
}
}
// playBones(node, name) {
// let skeletonAnimation = node.getComponent(cc.Dr);
// skeletonAnimation.play(name);
// }
initView
()
{
initView
()
{
this
.
initBg
();
this
.
initBg
();
...
...
assets/cake_class_1/script/MyCocosSceneComponent.ts
View file @
a1dc2e8a
...
@@ -52,6 +52,8 @@ export class MyCocosSceneComponent extends cc.Component {
...
@@ -52,6 +52,8 @@ export class MyCocosSceneComponent extends cc.Component {
// 生命周期 start
// 生命周期 start
start
()
{
start
()
{
console
.
log
(
"
(<any>window).courseware===
"
,(
<
any
>
window
).
courseware
)
this
.
log
(
"
(<any>window).courseware===
"
+
JSON
.
stringify
({
courseware
:(
<
any
>
window
).
courseware
}))
if
(
window
&&
(
<
any
>
window
).
courseware
&&
(
<
any
>
window
).
courseware
.
getData
)
{
if
(
window
&&
(
<
any
>
window
).
courseware
&&
(
<
any
>
window
).
courseware
.
getData
)
{
(
<
any
>
window
).
courseware
.
getData
((
data
)
=>
{
(
<
any
>
window
).
courseware
.
getData
((
data
)
=>
{
this
.
log
(
'
data:
'
+
data
);
this
.
log
(
'
data:
'
+
data
);
...
@@ -117,22 +119,6 @@ export class MyCocosSceneComponent extends cc.Component {
...
@@ -117,22 +119,6 @@ export class MyCocosSceneComponent extends cc.Component {
onLoadEnd
()
{
onLoadEnd
()
{
}
}
// ------------------------------------------------
// ------------------------------------------------
getSprNode
(
resName
)
{
getSprNode
(
resName
)
{
const
sf
=
cc
.
find
(
'
Canvas/res/img/
'
+
resName
).
getComponent
(
cc
.
Sprite
).
spriteFrame
;
const
sf
=
cc
.
find
(
'
Canvas/res/img/
'
+
resName
).
getComponent
(
cc
.
Sprite
).
spriteFrame
;
...
...
assets/cake_class_1/script/middleLayer.ts
0 → 100644
View file @
a1dc2e8a
// Learn TypeScript:
// - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// Learn Attribute:
// - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
// - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
const
{
ccclass
,
property
}
=
cc
.
_decorator
;
@
ccclass
export
default
class
NewClass
extends
cc
.
Component
{
@
property
(
cc
.
Label
)
label
:
cc
.
Label
=
null
;
@
property
text
:
string
=
'
hello
'
;
// LIFE-CYCLE CALLBACKS:
// onLoad () {}
start
()
{
}
log
(
str
){
this
.
node
.
getComponent
(
cc
.
Label
).
string
=
str
;
if
(
!
this
.
node
.
active
){
this
.
node
.
active
=
true
;
setTimeout
(()
=>
{
this
.
node
.
active
=
false
},
5000
)
}
}
// update (dt) {}
}
assets/cake_class_1/script/middleLayer.ts.meta
0 → 100644
View file @
a1dc2e8a
{
"ver": "1.0.8",
"uuid": "bfa2875f-22ab-4919-9d9a-e82a6f2cdb20",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
settings/builder.json
View file @
a1dc2e8a
...
@@ -5,10 +5,10 @@
...
@@ -5,10 +5,10 @@
"excludeScenes"
:
[],
"excludeScenes"
:
[],
"includeSDKBox"
:
false
,
"includeSDKBox"
:
false
,
"orientation"
:
{
"orientation"
:
{
"landscapeLeft"
:
tru
e
,
"landscapeLeft"
:
fals
e
,
"landscapeRight"
:
tru
e
,
"landscapeRight"
:
fals
e
,
"portrait"
:
false
,
"portrait"
:
false
,
"upsideDown"
:
fals
e
"upsideDown"
:
tru
e
},
},
"webOrientation"
:
"auto"
,
"webOrientation"
:
"auto"
,
"inlineSpriteFrames"
:
false
,
"inlineSpriteFrames"
:
false
,
...
@@ -28,7 +28,8 @@
...
@@ -28,7 +28,8 @@
},
},
"ios"
:
{
"ios"
:
{
"REMOTE_SERVER_ROOT"
:
""
,
"REMOTE_SERVER_ROOT"
:
""
,
"packageName"
:
"org.cocos2d.demo"
"packageName"
:
"org.cocos2d.demo"
,
"ios_enable_jit"
:
true
},
},
"mac"
:
{
"mac"
:
{
"REMOTE_SERVER_ROOT"
:
""
,
"REMOTE_SERVER_ROOT"
:
""
,
...
@@ -50,5 +51,6 @@
...
@@ -50,5 +51,6 @@
"scheme"
:
"https"
,
"scheme"
:
"https"
,
"skipRecord"
:
false
"skipRecord"
:
false
},
},
"appBundle"
:
false
"appBundle"
:
false
,
"agreements"
:
{}
}
}
settings/project.json
View file @
a1dc2e8a
...
@@ -2,5 +2,39 @@
...
@@ -2,5 +2,39 @@
"last-module-event-record-time"
:
1600677246969
,
"last-module-event-record-time"
:
1600677246969
,
"migrate-history"
:
[
"migrate-history"
:
[
"cloud-function"
"cloud-function"
],
"group-list"
:
[
"default"
],
"collision-matrix"
:
[
[
true
]
]
],
"excluded-modules"
:
[
"3D Physics/Builtin"
],
"preview-port"
:
7456
,
"design-resolution-width"
:
1280
,
"design-resolution-height"
:
720
,
"fit-width"
:
true
,
"fit-height"
:
true
,
"use-project-simulator-setting"
:
false
,
"simulator-orientation"
:
false
,
"use-customize-simulator"
:
true
,
"simulator-resolution"
:
{
"width"
:
960
,
"height"
:
640
},
"clear-simulator-cache"
:
true
,
"facebook"
:
{
"enable"
:
false
,
"appID"
:
""
,
"live"
:
{
"enable"
:
false
},
"audience"
:
{
"enable"
:
false
}
}
}
}
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