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
ff228785
Commit
ff228785
authored
Oct 21, 2022
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: base版本
parent
55da5f92
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
78 additions
and
279 deletions
+78
-279
middleLayer_for_debug.fire
...ts/middleLayer_for_debug/scene/middleLayer_for_debug.fire
+76
-225
middleLayer.ts
assets/middleLayer_for_debug/script/middleLayer.ts
+2
-51
middleLayerBase.ts
assets/middleLayer_for_debug/script/middleLayerBase.ts
+0
-3
No files found.
assets/middleLayer_for_debug/scene/middleLayer_for_debug.fire
View file @
ff228785
...
...
@@ -317,25 +317,22 @@
"__id__": 208
},
{
"__id__": 21
2
"__id__": 21
0
},
{
"__id__": 2
14
"__id__": 2
20
},
{
"__id__": 222
},
{
"__id__": 224
}
],
"_active": true,
"_components": [
{
"__id__": 22
6
"__id__": 22
4
},
{
"__id__": 22
7
"__id__": 22
5
}
],
"_prefab": null,
...
...
@@ -10255,201 +10252,6 @@
"_originalHeight": 0,
"_id": "65n6SW1qBD6LRC6plYtLl8"
},
{
"__type__": "cc.Node",
"_name": "mask",
"_objFlags": 0,
"_parent": {
"__id__": 8
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 209
},
{
"__id__": 210
},
{
"__id__": 211
}
],
"_prefab": null,
"_opacity": 0,
"_color": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1280,
"height": 720
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
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": "99Dj7SSYxItKIgEY1N79mA"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 208
},
"_enabled": true,
"alignMode": 2,
"_target": null,
"_alignFlags": 45,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "c6QYh6a3xJgq40gtvV2x7F"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 208
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": null,
"_id": "97JBLAzUJEa70YQRzWLGBS"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 208
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "a8DKzGuzZEFJXL6eBHARw0"
},
{
"__type__": "cc.Node",
"_name": "layout",
...
...
@@ -10461,7 +10263,7 @@
"_active": true,
"_components": [
{
"__id__": 2
13
"__id__": 2
09
}
],
"_prefab": null,
...
...
@@ -10517,7 +10319,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
12
"__id__": 2
08
},
"_enabled": true,
"_layoutSize": {
...
...
@@ -10553,11 +10355,18 @@
},
"_children": [
{
"__id__": 21
5
"__id__": 21
1
}
],
"_active": false,
"_components": [],
"_components": [
{
"__id__": 218
},
{
"__id__": 219
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
...
...
@@ -10569,8 +10378,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
"width":
500
0,
"height":
500
0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -10611,24 +10420,24 @@
"_name": "progress",
"_objFlags": 0,
"_parent": {
"__id__": 21
4
"__id__": 21
0
},
"_children": [
{
"__id__": 21
6
"__id__": 21
2
}
],
"_active": true,
"_components": [
{
"__id__": 21
9
"__id__": 21
5
},
{
"__id__": 2
20
"__id__": 2
16
}
],
"_prefab": {
"__id__": 2
21
"__id__": 2
17
},
"_opacity": 255,
"_color": {
...
...
@@ -10682,17 +10491,17 @@
"_name": "bar",
"_objFlags": 0,
"_parent": {
"__id__": 21
5
"__id__": 21
1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 21
7
"__id__": 21
3
}
],
"_prefab": {
"__id__": 21
8
"__id__": 21
4
},
"_opacity": 255,
"_color": {
...
...
@@ -10746,7 +10555,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 21
6
"__id__": 21
2
},
"_enabled": true,
"_materials": [
...
...
@@ -10776,7 +10585,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 21
5
"__id__": 21
1
},
"asset": {
"__uuid__": "3d356c4d-cb23-4239-aa5f-8a913f420fa4"
...
...
@@ -10789,7 +10598,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 21
5
"__id__": 21
1
},
"_enabled": true,
"_materials": [
...
...
@@ -10821,7 +10630,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 21
5
"__id__": 21
1
},
"_enabled": true,
"_id": "3eMT/DXoJNGZT/8Z3nuTUH"
...
...
@@ -10829,7 +10638,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 21
5
"__id__": 21
1
},
"asset": {
"__uuid__": "3d356c4d-cb23-4239-aa5f-8a913f420fa4"
...
...
@@ -10837,6 +10646,48 @@
"fileId": "",
"sync": false
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 210
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "f20BTU3S9O2qF/2RyA7ZKv"
},
{
"__type__": "cc.BlockInputEvents",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 210
},
"_enabled": true,
"_id": "d9Sm5lOKBAxKufJF2Q8Nr8"
},
{
"__type__": "cc.Node",
"_name": "bg",
...
...
@@ -10848,7 +10699,7 @@
"_active": false,
"_components": [
{
"__id__": 22
3
"__id__": 22
1
}
],
"_prefab": null,
...
...
@@ -10904,7 +10755,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 22
2
"__id__": 22
0
},
"_enabled": true,
"_materials": [
...
...
@@ -10942,7 +10793,7 @@
"_active": false,
"_components": [
{
"__id__": 22
5
"__id__": 22
3
}
],
"_prefab": null,
...
...
@@ -10998,7 +10849,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 22
4
"__id__": 22
2
},
"_enabled": true,
"_id": "c8RSZKHRJO95/RfIMIkSA5"
...
...
assets/middleLayer_for_debug/script/middleLayer.ts
View file @
ff228785
...
...
@@ -674,26 +674,6 @@ export default class NewClass extends middleLayerBase {
this
.
loadBundle
(
sceneName
,
version
,
bondleUrl
);
});
}
showMask
()
{
const
mask
=
cc
.
find
(
'
middleLayer/mask
'
);
mask
.
active
=
true
;
cc
.
tween
(
mask
)
.
set
({
opacity
:
0
})
.
to
(
0.5
,
{
opacity
:
0
})
.
start
();
}
hideMask
()
{
const
mask
=
cc
.
find
(
'
middleLayer/mask
'
);
mask
.
stopAllActions
();
cc
.
tween
(
mask
)
.
set
({
opacity
:
0
})
.
to
(
0.5
,
{
opacity
:
0
})
.
call
(()
=>
{
mask
.
active
=
false
;
})
.
start
();
}
reWriteAir
()
{
(
<
any
>
window
).
courseware
.
getData
=
(
callback
)
=>
{
...
...
@@ -776,15 +756,11 @@ export default class NewClass extends middleLayerBase {
const
laodingLayer
=
cc
.
find
(
'
middleLayer/loadingLayer
'
);
laodingLayer
.
active
=
true
;
// const loading = cc.find('middleLayer/loadingLayer/loading');
// const anim = loading.getComponent(cc.Animation)
// anim.play('loading')
const
script
=
cc
.
find
(
'
middleLayer/loadingLayer/progress
'
).
getComponent
(
'
progressScript
'
);
script
.
setProgress
(
0
);
const
id
=
setInterval
(()
=>
{
// console.log('changeObj.value: ', changeObj.value);
script
.
setProgress
(
changeObj
.
value
);
},
1
);
...
...
@@ -796,37 +772,12 @@ export default class NewClass extends middleLayerBase {
})
.
start
();
// const colorList = this.getRainbowColorList();
// const layout = cc.find('middleLayer/layout');
// layout.removeAllChildren();
// layout.active = true;
// const str = 'Now Loading...';
// str.split('').forEach((word, idx) => {
// const node = new cc.Node();
// const label = node.addComponent(cc.Label);
// label.string = word;
// node.parent = layout;
// node.color = colorList[idx];
// cc.tween(node)
// .delay(idx / 4)
// .by(0.3, { y: 50 }, { easing: 'sineOut' })
// .by(0.3, { y: -50 }, { easing: 'sineIn' })
// .delay((str.length - idx) / 4)
// .union()
// .repeatForever()
// .start();
// });
// const totalWidth = layout.children.reduce((width, node, idx) => {
// return width + node.width;
// }, 0);
// layout.width = totalWidth;
}
hideWaitingLetters
()
{
this
.
isShowWaiting
=
false
;
const
layout
=
cc
.
find
(
'
middleLayer/layout
'
);
layout
.
active
=
false
;
...
...
assets/middleLayer_for_debug/script/middleLayerBase.ts
View file @
ff228785
...
...
@@ -3,8 +3,6 @@ import { asyncDelay, randomSortByArr } from "./util";
export
abstract
class
middleLayerBase
extends
cc
.
Component
{
abstract
reWriteAir
():
void
;
abstract
showMask
():
void
;
abstract
hideMask
():
void
;
abstract
hideWaitingLetters
():
void
;
abstract
showWaitingLetters
():
void
;
...
...
@@ -193,7 +191,6 @@ export abstract class middleLayerBase extends cc.Component {
const
middleLayer
=
cc
.
find
(
'
middleLayer
'
);
cc
.
find
(
'
middleLayer/ExitBtn
'
).
active
=
true
;
this
.
hideWaitingLetters
();
this
.
hideMask
();
canvas
.
getComponent
(
cc
.
Widget
).
updateAlignment
();
middleLayer
.
scale
=
canvas
.
width
/
middleLayer
.
width
;
...
...
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