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
63aa9365
Commit
63aa9365
authored
Mar 15, 2022
by
章红平
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
8f306f92
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
395 additions
and
352 deletions
+395
-352
panel.prefab
assets/cake_class_1/prefab/panel.prefab
+3
-3
cake_class_1.fire
assets/cake_class_1/scene/cake_class_1.fire
+372
-343
cake_class_1.ts
assets/cake_class_1/scene/cake_class_1.ts
+14
-1
MyCocosSceneComponent.ts
assets/cake_class_1/script/MyCocosSceneComponent.ts
+1
-0
bg.png.meta
assets/cake_class_1/textures/bg.png.meta
+4
-4
topTittle.png.meta
assets/cake_class_1/textures/topTittle.png.meta
+1
-1
No files found.
assets/cake_class_1/prefab/panel.prefab
View file @
63aa9365
...
...
@@ -1252,7 +1252,7 @@
"ctor": "Float64Array",
"array": [
0,
7
00,
8
00,
0,
0,
0,
...
...
@@ -1587,7 +1587,7 @@
"ctor": "Float64Array",
"array": [
0,
7
00,
8
00,
0,
0,
0,
...
...
@@ -1694,7 +1694,7 @@
"ctor": "Float64Array",
"array": [
0,
7
00,
8
00,
0,
0,
0,
...
...
assets/cake_class_1/scene/cake_class_1.fire
View file @
63aa9365
This diff is collapsed.
Click to expand it.
assets/cake_class_1/scene/cake_class_1.ts
View file @
63aa9365
...
...
@@ -34,7 +34,7 @@ export default class cake_class_1 extends MyCocosSceneComponent {
talking
:
boolean
=
false
;
addPreloadImage
()
{
// TODO 根据自己的配置预加载图片资源
this
.
_imageResList
.
push
({
url
:
this
.
data
.
pic_url
});
...
...
@@ -199,6 +199,18 @@ export default class cake_class_1 extends MyCocosSceneComponent {
this
.
initData
();;
this
.
initListener
();
}
start
():
void
{
let
bgNode
=
cc
.
find
(
"
bg/bg
"
,
this
.
node
);
let
scaleX
=
cc
.
winSize
.
width
/
bgNode
.
width
;
let
scaleY
=
cc
.
winSize
.
height
/
bgNode
.
height
;
if
(
scaleX
>
scaleY
){
bgNode
.
scale
=
scaleX
;
}
else
{
bgNode
.
scale
=
scaleY
;
}
super
.
start
();
}
dataCallBack
()
{
super
.
dataCallBack
();
this
.
stickers
.
node
.
active
=
false
;
...
...
@@ -210,6 +222,7 @@ export default class cake_class_1 extends MyCocosSceneComponent {
let
panel
=
cc
.
instantiate
(
this
.
panel
);
panel
.
parent
=
cc
.
find
(
"
bg/ui
"
,
this
.
node
)
panel
.
x
=
panel
.
width
*
3
/
2
;
panel
.
y
=
panel
.
height
/
2
-
cc
.
winSize
.
height
/
2
let
panelS
=
panel
.
getComponent
(
"
panel
"
)
panelS
.
initPanel
(
this
.
data
.
questions
[
this
.
questionIndex
],
this
)
panelS
.
questionIndex
=
this
.
questionIndex
;
...
...
assets/cake_class_1/script/MyCocosSceneComponent.ts
View file @
63aa9365
...
...
@@ -27,6 +27,7 @@ export class MyCocosSceneComponent extends cc.Component {
let
screen_size
=
cc
.
view
.
getFrameSize
().
width
/
cc
.
view
.
getFrameSize
().
height
let
design_size
=
cc
.
Canvas
.
instance
.
designResolution
.
width
/
cc
.
Canvas
.
instance
.
designResolution
.
height
let
f
=
screen_size
>=
design_size
console
.
log
(
"
cc.view.getFrameSize().width
"
,
cc
.
view
.
getFrameSize
().
width
,
cc
.
Canvas
.
instance
.
designResolution
.
width
)
cc
.
Canvas
.
instance
.
fitHeight
=
f
cc
.
Canvas
.
instance
.
fitWidth
=
!
f
...
...
assets/cake_class_1/textures/bg.png.meta
View file @
63aa9365
...
...
@@ -26,10 +26,10 @@
"height": 720,
"rawWidth": 1280,
"rawHeight": 720,
"borderTop":
179
,
"borderBottom":
166
,
"borderLeft":
1023
,
"borderRight":
118
,
"borderTop":
0
,
"borderBottom":
0
,
"borderLeft":
280
,
"borderRight":
280
,
"subMetas": {}
}
}
...
...
assets/cake_class_1/textures/topTittle.png.meta
View file @
63aa9365
...
...
@@ -3,7 +3,7 @@
"uuid": "dbfea402-1da8-4a3f-8857-f08c75508f7c",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "
bilinear
",
"filterMode": "
point
",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
...
...
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