Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
op72_plus
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
op72_plus
Commits
7906653e
Commit
7906653e
authored
Dec 02, 2022
by
yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
f3a5ca6d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
op72_plus.ts
assets/op72_plus/scene/op72_plus.ts
+7
-3
No files found.
assets/op72_plus/scene/op72_plus.ts
View file @
7906653e
...
@@ -212,6 +212,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -212,6 +212,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
target
.
active
=
false
;
target
.
active
=
false
;
}
}
private
onTouchCancel
(
e
)
{
private
onTouchCancel
(
e
)
{
if
(
!
this
.
isClick
||
!
this
.
touching
)
return
;
let
target
:
cc
.
Node
=
e
.
target
;
let
target
:
cc
.
Node
=
e
.
target
;
this
.
playWrongAudio
();
this
.
playWrongAudio
();
target
.
parent
=
this
.
layout_word
;
target
.
parent
=
this
.
layout_word
;
...
@@ -219,19 +220,22 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -219,19 +220,22 @@ export default class SceneComponent extends MyCocosSceneComponent {
target
.
setPosition
(
data
.
pos
);
target
.
setPosition
(
data
.
pos
);
}
}
private
isClick
;
private
isClick
;
private
touching
;
private
onTouchStart
(
e
)
{
private
onTouchStart
(
e
)
{
if
(
!
this
.
isClick
)
return
;
if
(
!
this
.
isClick
||
this
.
touching
)
return
;
this
.
touching
=
true
;
let
target
:
cc
.
Node
=
e
.
target
;
let
target
:
cc
.
Node
=
e
.
target
;
target
.
parent
=
this
.
node
;
target
.
parent
=
this
.
node
;
this
.
setTouchPos
(
e
);
this
.
setTouchPos
(
e
);
}
}
private
onTouchMove
(
e
)
{
private
onTouchMove
(
e
)
{
if
(
!
this
.
isClick
)
return
;
if
(
!
this
.
isClick
||
!
this
.
touching
)
return
;
let
target
:
cc
.
Node
=
e
.
target
;
let
target
:
cc
.
Node
=
e
.
target
;
this
.
setTouchPos
(
e
);
this
.
setTouchPos
(
e
);
}
}
private
onTouchEnd
(
e
)
{
private
onTouchEnd
(
e
)
{
if
(
!
this
.
isClick
)
return
;
if
(
!
this
.
isClick
||
!
this
.
touching
)
return
;
this
.
touching
=
false
;
let
target
:
cc
.
Node
=
e
.
target
;
let
target
:
cc
.
Node
=
e
.
target
;
let
data
=
target
.
data
;
let
data
=
target
.
data
;
let
item
:
any
=
this
.
layout_box
.
children
.
find
((
ch
)
=>
{
let
item
:
any
=
this
.
layout_box
.
children
.
find
((
ch
)
=>
{
...
...
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