Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
ET26
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
ET26
Commits
a9489a3b
Commit
a9489a3b
authored
3 years ago
by
Lwd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit
parent
d4b9be3b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
item.js
play/assets/ET26/script/game/item.js
+5
-1
No files found.
play/assets/ET26/script/game/item.js
View file @
a9489a3b
...
...
@@ -35,7 +35,6 @@ cc.Class({
this
.
node
.
on
(
cc
.
Node
.
EventType
.
TOUCH_CANCEL
,
this
.
touchCancel
,
this
);
},
//触摸开始
touchBegan
:
function
(
event
)
{
this
.
isMove
=
false
;
...
...
@@ -44,7 +43,10 @@ cc.Class({
//触摸移动
touchMove
:
function
(
event
)
{
console
.
log
(
"
触发移动事件
"
)
if
(
this
.
node
.
isComplent
||
this
.
_isRotate
)
{
console
.
log
(
"
移动停止
"
)
return
}
...
...
@@ -52,6 +54,8 @@ cc.Class({
this
.
node
.
x
+=
delta
.
x
;
this
.
node
.
y
+=
delta
.
y
;
console
.
log
(
"
开始移动
"
,
"
x坐标:
"
+
this
.
node
.
x
,
"
y坐标:
"
+
this
.
node
.
y
)
var
deltaPos
=
this
.
node
.
x
+
this
.
node
.
y
;
if
(
Math
.
abs
(
this
.
deltaPos
-
deltaPos
)
>
10
)
{
this
.
isMove
=
true
;
...
...
This diff is collapsed.
Click to expand it.
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