Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MRBR04
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
MRBR04
Commits
3ba05101
Commit
3ba05101
authored
Apr 27, 2022
by
yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2
parent
cf8fcf02
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
114 additions
and
96 deletions
+114
-96
MRBR04.fire
assets/MRBR04/scene/MRBR04.fire
+6
-6
MRBR04.ts
assets/MRBR04/scene/MRBR04.ts
+63
-48
defaultData.ts
assets/MRBR04/script/defaultData.ts
+45
-42
No files found.
assets/MRBR04/scene/MRBR04.fire
View file @
3ba05101
...
...
@@ -5020,7 +5020,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 220,
"height":
50.4
"height":
70
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -5074,7 +5074,7 @@
"_string": "",
"_N$string": "",
"_fontSize": 40,
"_lineHeight": 4
0
,
"_lineHeight": 4
5
,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
...
...
@@ -5813,7 +5813,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 200,
"height":
50.4
"height":
90
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -5867,7 +5867,7 @@
"_string": "",
"_N$string": "",
"_fontSize": 40,
"_lineHeight": 4
0
,
"_lineHeight": 4
5
,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
...
...
@@ -6411,7 +6411,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 5
28.22
,
"width": 5
40
,
"height": 90.4
},
"_anchorPoint": {
...
...
@@ -6477,7 +6477,7 @@
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Muli",
"_N$overflow":
0
,
"_N$overflow":
2
,
"_N$cacheMode": 0,
"_id": "9eYhsD8IhP/ZcglYwgkAnW"
},
...
...
assets/MRBR04/scene/MRBR04.ts
View file @
3ba05101
...
...
@@ -265,52 +265,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
showLayout
();
}
private
getItemNode
(
type
)
{
let
item
;
if
(
this
.
upArr
.
length
==
5
)
{
if
(
type
==
1
)
{
item
=
cc
.
instantiate
(
cc
.
find
(
"
items/type1
"
,
this
.
node
));
}
else
{
item
=
cc
.
instantiate
(
cc
.
find
(
"
items/type4
"
,
this
.
node
));
}
}
else
if
(
this
.
upArr
.
length
==
4
)
{
if
(
type
==
1
)
{
item
=
cc
.
instantiate
(
cc
.
find
(
"
items/type2
"
,
this
.
node
));
}
else
{
item
=
cc
.
instantiate
(
cc
.
find
(
"
items/type5
"
,
this
.
node
));
}
}
else
if
(
this
.
upArr
.
length
==
3
)
{
if
(
type
==
1
)
{
item
=
cc
.
instantiate
(
cc
.
find
(
"
items/type3
"
,
this
.
node
));
}
else
{
item
=
cc
.
instantiate
(
cc
.
find
(
"
items/type6
"
,
this
.
node
));
}
}
return
item
;
}
private
getHeadSize
(
type
)
{
let
size
=
{};
if
(
this
.
upArr
.
length
==
5
)
{
if
(
type
==
1
)
{
size
=
{
w
:
50
,
h
:
50
}
}
else
{
size
=
{
w
:
400
,
h
:
60
}
}
}
else
if
(
this
.
upArr
.
length
==
4
)
{
if
(
type
==
1
)
{
size
=
{
w
:
90
,
h
:
90
}
}
else
{
size
=
{
w
:
255
,
h
:
80
}
}
}
else
if
(
this
.
upArr
.
length
==
3
)
{
if
(
type
==
1
)
{
size
=
{
w
:
120
,
h
:
115
}
}
else
{
size
=
{
w
:
255
,
h
:
120
}
}
}
return
size
;
}
private
showLayout
()
{
let
data
=
this
.
data
.
item
.
group
;
let
lift
=
cc
.
find
(
"
lift
"
,
this
.
node
);
...
...
@@ -345,6 +299,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
textItem
.
parent
=
right
;
}
});
setTimeout
(()
=>
{
this
.
updateItemWidth
(
lift
);
this
.
updateItemWidth
(
right
);
},
60
);
}
private
showQuestion
()
{
...
...
@@ -386,7 +344,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
let
img_laba02
=
item
.
getChildByName
(
"
img_close
"
);
let
desc
=
item
.
getChildByName
(
"
desc
"
);
desc
.
getComponent
(
cc
.
Label
).
string
=
data
.
text
;
if
(
type
==
1
&&
item
.
width
-
desc
.
width
>
10
)
{
if
(
item
.
width
-
desc
.
width
>
10
)
{
setTimeout
(()
=>
{
item
.
width
=
desc
.
width
+
30
;
},
30
);
...
...
@@ -405,6 +363,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
});
}
item
.
x
=
0
;
item
.
opacity
=
0.1
;
}
private
initPicItem
(
item
,
data
,
size
)
{
...
...
@@ -430,6 +389,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
});
}
item
.
x
=
0
;
item
.
opacity
=
0.1
;
}
private
checkLing
()
{
...
...
@@ -550,8 +510,63 @@ export default class SceneComponent extends MyCocosSceneComponent {
},
1800
);
}
}
private
updateItemWidth
(
layout
:
cc
.
Node
)
{
let
width
=
0
;
layout
.
children
.
forEach
((
ch
)
=>
{
if
(
ch
.
width
>
width
)
width
=
ch
.
width
;
});
layout
.
children
.
forEach
((
ch
)
=>
{
ch
.
width
=
width
;
ch
.
opacity
=
255
;
});
}
private
getItemNode
(
type
)
{
let
item
;
if
(
this
.
upArr
.
length
==
5
)
{
if
(
type
==
1
)
{
item
=
cc
.
instantiate
(
cc
.
find
(
"
items/type1
"
,
this
.
node
));
}
else
{
item
=
cc
.
instantiate
(
cc
.
find
(
"
items/type4
"
,
this
.
node
));
}
}
else
if
(
this
.
upArr
.
length
==
4
)
{
if
(
type
==
1
)
{
item
=
cc
.
instantiate
(
cc
.
find
(
"
items/type5
"
,
this
.
node
));
}
else
{
item
=
cc
.
instantiate
(
cc
.
find
(
"
items/type5
"
,
this
.
node
));
}
}
else
if
(
this
.
upArr
.
length
==
3
)
{
if
(
type
==
1
)
{
item
=
cc
.
instantiate
(
cc
.
find
(
"
items/type6
"
,
this
.
node
));
}
else
{
item
=
cc
.
instantiate
(
cc
.
find
(
"
items/type6
"
,
this
.
node
));
}
}
return
item
;
}
private
getHeadSize
(
type
)
{
let
size
=
{};
if
(
this
.
upArr
.
length
==
5
)
{
if
(
type
==
1
)
{
size
=
{
w
:
50
,
h
:
50
}
}
else
{
size
=
{
w
:
400
,
h
:
60
}
}
}
else
if
(
this
.
upArr
.
length
==
4
)
{
if
(
type
==
1
)
{
size
=
{
w
:
90
,
h
:
90
}
}
else
{
size
=
{
w
:
255
,
h
:
80
}
}
}
else
if
(
this
.
upArr
.
length
==
3
)
{
if
(
type
==
1
)
{
size
=
{
w
:
120
,
h
:
115
}
}
else
{
size
=
{
w
:
255
,
h
:
120
}
}
}
return
size
;
}
...
...
assets/MRBR04/script/defaultData.ts
View file @
3ba05101
...
...
@@ -13,33 +13,36 @@ export const defaultData ={
"
time
"
:
1
},
"
item
"
:
{
"
group
"
:
[{
"
up
"
:
{
"
type
"
:
1
,
"
pic_url
"
:
""
,
"
text
"
:
"
1fdshkdshfksdhkfhdskdsk
"
,
"
audio_url
"
:
""
},
"
down
"
:
{
"
type
"
:
1
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/6689e11c1646fba838a51c212b7770d2.png
"
,
"
text
"
:
"
第三位发送到
"
,
"
audio_url
"
:
"
http://staging-teach.cdn.ireadabc.com/71348a317c47ec2a0b3056b0d7ca2e99.mp3
"
}
},
{
"
up
"
:
{
"
type
"
:
0
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/e359730cf593c396a58e020333026fac.png
"
,
"
text
"
:
"
2
"
,
"
audio_url
"
:
""
},
"
down
"
:
{
"
type
"
:
1
,
"
pic_url
"
:
""
,
"
text
"
:
"
4534543
"
,
"
audio_url
"
:
"
http://staging-teach.cdn.ireadabc.com/526624b47ba5e46f698add9e152a4b4e.mp3
"
}
},
{
"
group
"
:
[
// {
// "up": {
// "type": 1,
// "pic_url": "http://staging-teach.cdn.ireadabc.com/e359730cf593c396a58e020333026fac.png",
// "text": "",
// "audio_url": ""
// },
// "down": {
// "type": 1,
// "pic_url": "http://staging-teach.cdn.ireadabc.com/6689e11c1646fba838a51c212b7770d2.png",
// "text": "第三位发送到gdfkgdfgdfgdf",
// "audio_url": "http://staging-teach.cdn.ireadabc.com/71348a317c47ec2a0b3056b0d7ca2e99.mp3"
// }
// },
// {
// "up": {
// "type": 0,
// "pic_url": "http://staging-teach.cdn.ireadabc.com/e359730cf593c396a58e020333026fac.png",
// "text": "2",
// "audio_url": ""
// },
// "down": {
// "type": 1,
// "pic_url": "",
// "text": "4534543",
// "audio_url": "http://staging-teach.cdn.ireadabc.com/526624b47ba5e46f698add9e152a4b4e.mp3"
// }
// },
{
"
up
"
:
{
"
type
"
:
0
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/bcc13bb8f504b17ee9d07d8f5204b12f.png
"
,
...
...
@@ -67,22 +70,22 @@ export const defaultData ={
"
audio_url
"
:
"
http://staging-teach.cdn.ireadabc.com/9df3f14bc88bcffc49b6717c40428ed8.mp3
"
}
},
//
{
//
"up": {
//
"type": 0,
//
"pic_url": "http://staging-teach.cdn.ireadabc.com/ce43980b533f674f9debe6ce9cae7b8d.png",
//
"text": "5",
//
"audio_url": ""
//
},
//
"down": {
//
"type": 1,
//
"pic_url": "",
//
"text": "5345344343",
//
"audio_url": ""
//
}
//
}
{
"
up
"
:
{
"
type
"
:
0
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/ce43980b533f674f9debe6ce9cae7b8d.png
"
,
"
text
"
:
"
5
"
,
"
audio_url
"
:
""
},
"
down
"
:
{
"
type
"
:
1
,
"
pic_url
"
:
""
,
"
text
"
:
"
5345344343
"
,
"
audio_url
"
:
""
}
}
],
"
title
"
:
"
电话客服劵花费
"
,
"
title
"
:
"
电话客服劵花费
电话客服劵花费电话客服劵花费电话客服劵花费电话客服劵花费
"
,
"
audio_title
"
:
"
http://staging-teach.cdn.ireadabc.com/f7fb9f71ab7d460ac2f78c85efba7610.mp3
"
}
}
...
...
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