Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dap-hu
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
Vũ Gia Vương
dap-hu
Commits
7b213904
Commit
7b213904
authored
Apr 02, 2025
by
Vũ Gia Vương
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
uodate time rotate HuController
parent
a81242c4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
13 deletions
+10
-13
HuController.ts
assets/scripts/GamePlay/HuController.ts
+9
-10
RotateTutorialController.ts
assets/scripts/Tutorial/RotateTutorialController.ts
+1
-1
ActionScreen.ts
assets/scripts/UI/ActionScreen.ts
+0
-2
No files found.
assets/scripts/GamePlay/HuController.ts
View file @
7b213904
...
...
@@ -79,9 +79,9 @@ export default class HuController extends cc.Component {
private
initBottle
()
{
this
.
_spine
.
setAnimation
(
1
,
"Rotate"
,
false
);
this
.
_spine
.
timeScale
=
this
.
_pointStart
?
0
:
0.5
;
// this._spine.timeScale = this._pointStart ? 0 : 1.3
;
this
.
_track
=
this
.
_spine
.
getState
().
tracks
[
1
];
this
.
_spine
.
timeScale
=
0
;
//
this._spine.timeScale = 0;
}
private
onTouchStart
(
event
:
cc
.
Event
.
EventTouch
):
void
{
...
...
@@ -94,29 +94,28 @@ export default class HuController extends cc.Component {
private
onTouchEnd
():
void
{
this
.
scheduleOnce
(()
=>
{
this
.
_spine
.
timeScale
=
0
;
if
(
this
.
_track
.
trackTime
<
0
)
{
this
.
_track
.
trackTime
=
this
.
_track
.
animationEnd
-
1
e
-
9
;
}
},
0.5
);
}
private
onTouchMove
(
event
:
cc
.
Event
.
EventTouch
):
void
{
const
newPoint
=
event
.
getLocation
();
const
distance
=
newPoint
.
x
-
this
.
_pointStart
.
x
;
if
(
Math
.
abs
(
distance
)
<
5
)
{
if
(
Math
.
abs
(
distance
)
<
10
)
{
this
.
_spine
.
timeScale
=
0
;
return
;
}
if
(
this
.
_track
.
trackTime
<
0
)
{
this
.
_track
.
trackTime
=
this
.
_track
.
animationEnd
-
1
e
-
3
;
}
this
.
_pointStart
=
newPoint
;
this
.
_spine
.
timeScale
=
distance
>
0
?
-
1.
3
:
1.3
;
this
.
_spine
.
timeScale
=
distance
>
0
?
-
1.
5
:
1.5
;
}
private
onRotateGuild
()
{
this
.
_spine
.
timeScale
=
0.
5
;
this
.
_spine
.
timeScale
=
0.
8
;
this
.
scheduleOnce
(()
=>
{
this
.
_spine
.
timeScale
=
0
;
},
1
.2
);
},
1
);
}
private
setDeviceMotion
()
{
...
...
assets/scripts/Tutorial/RotateTutorialController.ts
View file @
7b213904
...
...
@@ -27,7 +27,7 @@ export default class RotateTutorialController extends cc.Component {
.
to
(
0.5
,
{
angle
:
-
10
})
.
to
(
0.5
,
{
angle
:
15
})
.
call
(()
=>
eventTarget
.
emit
(
ROTATE_GUILD
))
.
to
(
1.2
,
{
position
:
cc
.
v3
(
-
150
)
})
.
to
(
0.8
,
{
position
:
cc
.
v3
(
-
150
)
})
)
.
start
();
}
...
...
assets/scripts/UI/ActionScreen.ts
View file @
7b213904
...
...
@@ -14,8 +14,6 @@ export default class ActionScreen extends cc.Component {
private
_spine
:
sp
.
Skeleton
=
null
;
onLoad
()
{
return
;
eventTarget
.
on
(
SHOW_ACTION_SCREEN
,
this
.
showScreen
,
this
);
eventTarget
.
on
(
SHOW_START_SCREEN
,
this
.
hideScreen
,
this
);
eventTarget
.
on
(
PLAY_ANIM_NUT1
,
this
.
hideBottle
,
this
);
...
...
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