Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
PS_001
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
PS_001
Commits
bf032c37
Commit
bf032c37
authored
Jan 14, 2022
by
范雪寒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:
parent
1ad21c4a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
11 deletions
+15
-11
PS_001_scene1.ts
assets/PS_001/ani/script/PS_001_scene1.ts
+15
-11
No files found.
assets/PS_001/ani/script/PS_001_scene1.ts
View file @
bf032c37
...
@@ -30,18 +30,8 @@ export default class PS_001_scene1 extends cc.Component {
...
@@ -30,18 +30,8 @@ export default class PS_001_scene1 extends cc.Component {
init
(
cameraNode
:
cc
.
Node
,
parent
:
PS_001_Ctrl
)
{
//4
init
(
cameraNode
:
cc
.
Node
,
parent
:
PS_001_Ctrl
)
{
//4
this
.
camera
=
cameraNode
this
.
camera
=
cameraNode
this
.
parent
=
parent
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
;
this
.
initUI
();
if
(
PS_001_Ctrl
.
getIns
().
time
==
0
)
{
if
(
PS_001_Ctrl
.
getIns
().
time
==
0
)
{
this
.
beforeStartFirstTime
();
this
.
beforeStartFirstTime
();
...
@@ -50,6 +40,18 @@ export default class PS_001_scene1 extends cc.Component {
...
@@ -50,6 +40,18 @@ export default class PS_001_scene1 extends cc.Component {
}
}
}
}
initUI
()
{
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
=
-
30
;
light_right
.
active
=
false
;
light_right
.
angle
=
30
;
bg
.
active
=
false
;
}
async
beforeStartFirstTime
()
{
async
beforeStartFirstTime
()
{
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
'
);
...
@@ -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
)
...
...
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