Commit 1ad21c4a authored by 范雪寒's avatar 范雪寒

feat:

parent 810ea134
......@@ -386,8 +386,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
"width": 2048,
"height": 1152
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -398,8 +398,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-59.759,
277.71,
-59.759000000000015,
277.71000000000004,
0,
0,
0,
......@@ -1219,7 +1219,7 @@
"ctor": "Float64Array",
"array": [
0,
0,
399.133,
0,
0,
0,
......@@ -1399,7 +1399,7 @@
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"x": 0,
"y": 0.5
},
"_trs": {
......@@ -1627,7 +1627,7 @@
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"x": 0,
"y": 0.5
},
"_trs": {
......
......@@ -31,6 +31,18 @@ export default class PS_001_scene1 extends cc.Component {
this.camera = cameraNode
this.parent = parent
this.camera.zIndex = 1;
const light_left = cc.find('Canvas/Main Camera/light_left');
const light_right = cc.find('Canvas/Main Camera/light_right');
const bg = cc.find('Canvas/Main Camera/bg');
light_left.active = false;
light_left.angle = 0;
light_right.active = false;
light_right.angle = 0;
bg.active = false;
if (PS_001_Ctrl.getIns().time == 0) {
this.beforeStartFirstTime();
} else {
......@@ -42,9 +54,6 @@ export default class PS_001_scene1 extends cc.Component {
const light_left = cc.find('Canvas/Main Camera/light_left');
const light_right = cc.find('Canvas/Main Camera/light_right');
const bg = cc.find('Canvas/Main Camera/bg');
light_left.active = false;
light_right.active = false;
bg.active = false;
const canvas = cc.find('Canvas');
const zoom = this.camera.getComponent(cc.Camera).zoomRatio;
const cameraWidth = canvas.width / zoom;
......@@ -54,6 +63,8 @@ export default class PS_001_scene1 extends cc.Component {
light_right.active = true;
bg.active = true;
console.log('cameraWidth = ' + cameraWidth);
cc.tween(light_left)
.set({ x: -cameraWidth / 2, y: cameraHeight / 2 })
.to(1, { angle: angle }, { easing: 'cubicIn' })
......
......@@ -70,8 +70,7 @@ export default class PS_001_scene8 extends cc.Component {
.delay(5)
.delay(10)
.call(() => {
this.parent.toNext(8)
this.node.destroy()
this.onFinishFrirstTime();
})
.start()
}
......@@ -123,8 +122,10 @@ export default class PS_001_scene8 extends cc.Component {
} else {
const bg = cc.find('Canvas/Main Camera/bg');
bg.active = true;
bg.zIndex = 1;
cc.tween(bg).to(1, { opacity: 255 }).start();
const wellDown = cc.find('Canvas/wellDown');
wellDown.zIndex = 1;
wellDown.active = true;
wellDown.x = this.camera.x;
wellDown.y = this.camera.y;
......@@ -139,6 +140,7 @@ export default class PS_001_scene8 extends cc.Component {
}
async onFinishFrirstTime() {
console.log('汪汪汪8');
const canvas = cc.find('Canvas');
const zoom = this.camera.getComponent(cc.Camera).zoomRatio;
const cameraWidth = canvas.width / zoom;
......@@ -146,6 +148,7 @@ export default class PS_001_scene8 extends cc.Component {
const ranbow = cc.find('Canvas/ranbow');
ranbow.active = true;
ranbow.zIndex = 1;
ranbow.scale = (cameraHeight + 20) / ranbow.height;
ranbow.x = cameraWidth / 2 + this.camera.x;
ranbow.y = this.camera.y;
......
......@@ -52,46 +52,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
PS_001_Ctrl.getIns().time = 1;
PS_001_Ctrl.getIns().goscene(conf[step].id);
});
// if (!cc.game.isPersistRootNode(cc.find('bk'))) {
// cc.game.addPersistRootNode(cc.find('bk'));
// cc.game.addPersistRootNode(cc.find('hand'));
// }
// cc.director.loadScene(`PS_001_scene1`);
// if (this.data.step == 0) {
// // handManager.getIns().isStart = false;
// cc.director.loadScene(`PS_001_scene1`, () => {
// // cc.find('Canvas').getComponent(`PS_001_scene1`).play();
// });
// } else if (this.data.step <= PS_001_handManager.getIns().conf.length + 1) {
// this.jumpToStep(this.data.step);
// } else {
// cc.director.loadScene(`PS_001_scene8`, () => {
// // cc.find('Canvas').getComponent(`PS_001_scene8`).play();
// });
// }
}
jumpToStep(step) {
const conf = [
null,
{ time: 5, scene: 1 },
{ time: 12, scene: 1 },
{ time: 9, scene: 2 },
{ time: 13, scene: 3 },
{ time: 18, scene: 4 },
{ time: 18, scene: 5 },
{ time: 10, scene: 6 },
{ time: 16, scene: 6 },
{ time: 18, scene: 7 },
{ time: 24, scene: 8 },
{ time: 33, scene: 8 },
{ time: 50, scene: 8 },
];
cc.director.loadScene(`PS_001_scene${conf[step].scene}`, () => {
cc.find('Canvas').getComponent(`PS_001_scene${conf[step].scene}`).play(step);
});
}
playLocalAudio(audioName) {
......
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