Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hy08_caici
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
hy08_caici
Commits
6886bf74
Commit
6886bf74
authored
Jul 17, 2023
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改图片坐标
parent
089e2235
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
hy08_caici.fire
assets/hy08_caici/scene/hy08_caici.fire
+1
-1
hy08_caici.ts
assets/hy08_caici/scene/hy08_caici.ts
+6
-4
No files found.
assets/hy08_caici/scene/hy08_caici.fire
View file @
6886bf74
...
@@ -3796,7 +3796,7 @@
...
@@ -3796,7 +3796,7 @@
"_enabled": true,
"_enabled": true,
"alignMode": 1,
"alignMode": 1,
"_target": null,
"_target": null,
"_alignFlags":
4
0,
"_alignFlags": 0,
"_left": 0,
"_left": 0,
"_right": 0,
"_right": 0,
"_top": 513,
"_top": 513,
...
...
assets/hy08_caici/scene/hy08_caici.ts
View file @
6886bf74
...
@@ -203,6 +203,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -203,6 +203,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
private
currentTime
:
number
;
private
currentTime
:
number
;
private
currentItemQuestion
:
cc
.
Node
;
private
currentItemQuestion
:
cc
.
Node
;
private
nextItemQuestion
:
cc
.
Node
;
private
nextItemQuestion
:
cc
.
Node
;
private
defaultPos
:
cc
.
Vec2
;
startQuestion
()
{
startQuestion
()
{
// 游戏所需的初始化数据
// 游戏所需的初始化数据
this
.
currentId
=
0
this
.
currentId
=
0
...
@@ -212,7 +213,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -212,7 +213,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
right
=
0
this
.
right
=
0
this
.
gameStart
=
true
;
this
.
gameStart
=
true
;
this
.
state
=
State
.
Recording
;
this
.
state
=
State
.
Recording
;
this
.
currentItemQuestion
=
this
.
createQuestionItem
(
cc
.
v2
(
0
,
-
100
));
this
.
defaultPos
=
cc
.
v2
(
0
,
-
100
);
this
.
currentItemQuestion
=
this
.
createQuestionItem
(
this
.
defaultPos
);
this
.
updateQuestion
(
this
.
currentItemQuestion
,
this
.
getCurrent
());
this
.
updateQuestion
(
this
.
currentItemQuestion
,
this
.
getCurrent
());
this
.
updateProgress
();
this
.
updateProgress
();
}
}
...
@@ -240,11 +242,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -240,11 +242,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
return
;
return
;
}
}
this
.
hideAnswer
();
this
.
hideAnswer
();
this
.
nextItemQuestion
=
this
.
createQuestionItem
(
cc
.
v2
(
2000
,
50
));
this
.
nextItemQuestion
=
this
.
createQuestionItem
(
cc
.
v2
(
2000
,
this
.
defaultPos
.
y
));
this
.
updateQuestion
(
this
.
nextItemQuestion
,
this
.
getCurrent
());
this
.
updateQuestion
(
this
.
nextItemQuestion
,
this
.
getCurrent
());
pg
.
hw
.
playLocalAudio
(
'
showCard
'
)
pg
.
hw
.
playLocalAudio
(
'
showCard
'
)
cc
.
tween
(
this
.
currentItemQuestion
).
to
(
0.5
,
{
x
:
-
2000
,
y
:
50
}).
start
();
cc
.
tween
(
this
.
currentItemQuestion
).
to
(
0.5
,
{
x
:
-
2000
,
y
:
this
.
defaultPos
.
y
}).
start
();
cc
.
tween
(
this
.
nextItemQuestion
).
to
(
0.5
,
{
x
:
0
,
y
:
50
}).
call
(()
=>
{
cc
.
tween
(
this
.
nextItemQuestion
).
to
(
0.5
,
{
x
:
0
,
y
:
this
.
defaultPos
.
y
}).
call
(()
=>
{
this
.
currentItemQuestion
.
parent
=
null
;
this
.
currentItemQuestion
.
parent
=
null
;
this
.
currentItemQuestion
=
this
.
nextItemQuestion
;
this
.
currentItemQuestion
=
this
.
nextItemQuestion
;
this
.
nextItemQuestion
=
null
;
this
.
nextItemQuestion
=
null
;
...
...
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