Commit bf032c37 authored by 范雪寒's avatar 范雪寒

feat:

parent 1ad21c4a
...@@ -31,23 +31,25 @@ export default class PS_001_scene1 extends cc.Component { ...@@ -31,23 +31,25 @@ export default class PS_001_scene1 extends cc.Component {
this.camera = cameraNode this.camera = cameraNode
this.parent = parent this.parent = parent
this.camera.zIndex = 1; this.initUI();
if (PS_001_Ctrl.getIns().time == 0) {
this.beforeStartFirstTime();
} else {
this.beforeStartLastTime();
}
}
initUI() {
this.camera.zIndex = 1;
const light_left = cc.find('Canvas/Main Camera/light_left'); const light_left = cc.find('Canvas/Main Camera/light_left');
const light_right = cc.find('Canvas/Main Camera/light_right'); const light_right = cc.find('Canvas/Main Camera/light_right');
const bg = cc.find('Canvas/Main Camera/bg'); const bg = cc.find('Canvas/Main Camera/bg');
light_left.active = false; light_left.active = false;
light_left.angle = 0; light_left.angle = -30;
light_right.active = false; light_right.active = false;
light_right.angle = 0; light_right.angle = 30;
bg.active = false; bg.active = false;
if (PS_001_Ctrl.getIns().time == 0) {
this.beforeStartFirstTime();
} else {
this.beforeStartLastTime();
}
} }
async beforeStartFirstTime() { async beforeStartFirstTime() {
...@@ -271,6 +273,7 @@ export default class PS_001_scene1 extends cc.Component { ...@@ -271,6 +273,7 @@ export default class PS_001_scene1 extends cc.Component {
gofive(cameraNode: cc.Node, parent: PS_001_Ctrl) {//4 gofive(cameraNode: cc.Node, parent: PS_001_Ctrl) {//4
this.camera = cameraNode this.camera = cameraNode
this.parent = parent this.parent = parent
this.initUI();
this.camera.setPosition(-30.6, 140.7) this.camera.setPosition(-30.6, 140.7)
this.camera.getComponent(cc.Camera).zoomRatio = 1.5 this.camera.getComponent(cc.Camera).zoomRatio = 1.5
this.tweenary.push(cc.tween(this.camera.getComponent(cc.Camera)).to(1, { zoomRatio: 1 }).call(this.func2, this).start()) this.tweenary.push(cc.tween(this.camera.getComponent(cc.Camera)).to(1, { zoomRatio: 1 }).call(this.func2, this).start())
...@@ -283,6 +286,7 @@ export default class PS_001_scene1 extends cc.Component { ...@@ -283,6 +286,7 @@ export default class PS_001_scene1 extends cc.Component {
cc.audioEngine.playMusic(this.sound[1], false) cc.audioEngine.playMusic(this.sound[1], false)
this.camera = cameraNode this.camera = cameraNode
this.parent = parent this.parent = parent
this.initUI();
this.camera.setPosition(-5, -182) this.camera.setPosition(-5, -182)
this.camera.getComponent(cc.Camera).zoomRatio = 1.5 this.camera.getComponent(cc.Camera).zoomRatio = 1.5
PS_001_dialogueManager.getIns().start(1, 12) PS_001_dialogueManager.getIns().start(1, 12)
......
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