Commit ff228785 authored by liujiangnan's avatar liujiangnan

feat: base版本

parent 55da5f92
......@@ -317,25 +317,22 @@
"__id__": 208
},
{
"__id__": 212
"__id__": 210
},
{
"__id__": 214
"__id__": 220
},
{
"__id__": 222
},
{
"__id__": 224
}
],
"_active": true,
"_components": [
{
"__id__": 226
"__id__": 224
},
{
"__id__": 227
"__id__": 225
}
],
"_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__": 213
"__id__": 209
}
],
"_prefab": null,
......@@ -10517,7 +10319,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 212
"__id__": 208
},
"_enabled": true,
"_layoutSize": {
......@@ -10553,11 +10355,18 @@
},
"_children": [
{
"__id__": 215
"__id__": 211
}
],
"_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": 5000,
"height": 5000
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -10611,24 +10420,24 @@
"_name": "progress",
"_objFlags": 0,
"_parent": {
"__id__": 214
"__id__": 210
},
"_children": [
{
"__id__": 216
"__id__": 212
}
],
"_active": true,
"_components": [
{
"__id__": 219
"__id__": 215
},
{
"__id__": 220
"__id__": 216
}
],
"_prefab": {
"__id__": 221
"__id__": 217
},
"_opacity": 255,
"_color": {
......@@ -10682,17 +10491,17 @@
"_name": "bar",
"_objFlags": 0,
"_parent": {
"__id__": 215
"__id__": 211
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 217
"__id__": 213
}
],
"_prefab": {
"__id__": 218
"__id__": 214
},
"_opacity": 255,
"_color": {
......@@ -10746,7 +10555,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 216
"__id__": 212
},
"_enabled": true,
"_materials": [
......@@ -10776,7 +10585,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 215
"__id__": 211
},
"asset": {
"__uuid__": "3d356c4d-cb23-4239-aa5f-8a913f420fa4"
......@@ -10789,7 +10598,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 215
"__id__": 211
},
"_enabled": true,
"_materials": [
......@@ -10821,7 +10630,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 215
"__id__": 211
},
"_enabled": true,
"_id": "3eMT/DXoJNGZT/8Z3nuTUH"
......@@ -10829,7 +10638,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 215
"__id__": 211
},
"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__": 223
"__id__": 221
}
],
"_prefab": null,
......@@ -10904,7 +10755,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 222
"__id__": 220
},
"_enabled": true,
"_materials": [
......@@ -10942,7 +10793,7 @@
"_active": false,
"_components": [
{
"__id__": 225
"__id__": 223
}
],
"_prefab": null,
......@@ -10998,7 +10849,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 224
"__id__": 222
},
"_enabled": true,
"_id": "c8RSZKHRJO95/RfIMIkSA5"
......
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment