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
42e9787f
Commit
42e9787f
authored
Mar 31, 2025
by
Vũ Gia Vương
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clear text test
parent
e57bca8c
Pipeline
#5652
canceled with stages
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
13 deletions
+6
-13
main.fire
assets/main.fire
+2
-2
BuaController.ts
assets/scripts/GamePlay/BuaController.ts
+4
-1
HuController.ts
assets/scripts/GamePlay/HuController.ts
+0
-10
No files found.
assets/main.fire
View file @
42e9787f
...
@@ -499,7 +499,7 @@
...
@@ -499,7 +499,7 @@
"node": {
"node": {
"__id__": 9
"__id__": 9
},
},
"_enabled":
tru
e,
"_enabled":
fals
e,
"_materials": [
"_materials": [
{
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
...
@@ -635,7 +635,7 @@
...
@@ -635,7 +635,7 @@
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
0,
0,
0,
15
0,
0,
0,
0,
0,
0,
0,
...
...
assets/scripts/GamePlay/BuaController.ts
View file @
42e9787f
...
@@ -10,7 +10,8 @@ export default class BuaController extends cc.Component {
...
@@ -10,7 +10,8 @@ export default class BuaController extends cc.Component {
private
spine
:
sp
.
Skeleton
=
null
;
private
spine
:
sp
.
Skeleton
=
null
;
private
_count
=
0
;
private
_count
=
0
;
private
_actions
:
Function
[]
=
[];
private
_actions
:
Function
[]
=
[];
private
_skins
=
[
"Bua"
,
"Ga"
,
"Gai_lung"
,
"Gay"
]
private
_skins
=
[
"Bua"
,
"Ga"
,
"Gai_lung"
,
"Gay"
];
private
_isPlay
=
false
;
protected
onLoad
():
void
{
protected
onLoad
():
void
{
this
.
spine
=
this
.
node
.
getComponent
(
sp
.
Skeleton
);
this
.
spine
=
this
.
node
.
getComponent
(
sp
.
Skeleton
);
...
@@ -19,6 +20,7 @@ export default class BuaController extends cc.Component {
...
@@ -19,6 +20,7 @@ export default class BuaController extends cc.Component {
this
.
node
.
on
(
cc
.
Node
.
EventType
.
TOUCH_START
,
this
.
onTouchStart
,
this
);
this
.
node
.
on
(
cc
.
Node
.
EventType
.
TOUCH_START
,
this
.
onTouchStart
,
this
);
this
.
_actions
=
[
this
.
playAnimationDap1
,
this
.
playAnimationDap2
,
this
.
playAnimationDap3
,
this
.
playAnimationDap4
];
this
.
_actions
=
[
this
.
playAnimationDap1
,
this
.
playAnimationDap2
,
this
.
playAnimationDap3
,
this
.
playAnimationDap4
];
this
.
_isPlay
=
true
;
}
}
public
onSetTool
()
{
public
onSetTool
()
{
...
@@ -28,6 +30,7 @@ export default class BuaController extends cc.Component {
...
@@ -28,6 +30,7 @@ export default class BuaController extends cc.Component {
private
onTouchStart
():
void
{
private
onTouchStart
():
void
{
this
.
_actions
[
this
.
_count
].
bind
(
this
)();
this
.
_actions
[
this
.
_count
].
bind
(
this
)();
this
.
_count
=
(
this
.
_count
+
1
)
%
this
.
_actions
.
length
;
this
.
_count
=
(
this
.
_count
+
1
)
%
this
.
_actions
.
length
;
}
}
...
...
assets/scripts/GamePlay/HuController.ts
View file @
42e9787f
...
@@ -26,14 +26,6 @@ export default class HuController extends cc.Component {
...
@@ -26,14 +26,6 @@ export default class HuController extends cc.Component {
this
.
spine
.
setCompleteListener
(()
=>
this
.
setRotateAnim
());
this
.
spine
.
setCompleteListener
(()
=>
this
.
setRotateAnim
());
this
.
scheduleOnce
(
this
.
testDevice
,
2
);
this
.
scheduleOnce
(
this
.
testDevice
,
2
);
// this.scheduleOnce(() => {
// (window.DeviceMotionEvent as any).requestPermission()
// .then(response => {
// this.text.string = (response);
// this.testDevice();
// }
// )
// }, 2);
}
}
private
testDevice
()
{
private
testDevice
()
{
...
@@ -41,7 +33,6 @@ export default class HuController extends cc.Component {
...
@@ -41,7 +33,6 @@ export default class HuController extends cc.Component {
if
(
!
event
.
accelerationIncludingGravity
)
{
if
(
!
event
.
accelerationIncludingGravity
)
{
return
;
return
;
}
}
this
.
text
.
string
=
'device motion'
;
const
x
=
event
.
accelerationIncludingGravity
.
x
;
const
x
=
event
.
accelerationIncludingGravity
.
x
;
const
y
=
event
.
accelerationIncludingGravity
.
y
;
const
y
=
event
.
accelerationIncludingGravity
.
y
;
...
@@ -61,7 +52,6 @@ export default class HuController extends cc.Component {
...
@@ -61,7 +52,6 @@ export default class HuController extends cc.Component {
if
(
this
.
_count
>
0
)
{
if
(
this
.
_count
>
0
)
{
this
.
scheduleOnce
(()
=>
{
this
.
scheduleOnce
(()
=>
{
this
.
text
.
string
=
`lac `
+
this
.
_count
;
this
.
_count
=
0
;
this
.
_count
=
0
;
},
2
)
},
2
)
}
}
...
...
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