Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
l4_boardgame_space
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
l4_boardgame_space
Commits
4df97b9c
Commit
4df97b9c
authored
Oct 24, 2022
by
liubing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
象限计算错误,fix。
parent
73c8cb55
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
l4_boardgame_space.ts
assets/l4_boardgame_space/scene/l4_boardgame_space.ts
+1
-1
No files found.
assets/l4_boardgame_space/scene/l4_boardgame_space.ts
View file @
4df97b9c
...
@@ -667,7 +667,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -667,7 +667,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
angle
=
180
/
Math
.
PI
*
Math
.
atan
(
Math
.
abs
((
targetNode
.
x
-
curNode
.
x
)
/
(
targetNode
.
y
-
curNode
.
y
)));
angle
=
180
/
Math
.
PI
*
Math
.
atan
(
Math
.
abs
((
targetNode
.
x
-
curNode
.
x
)
/
(
targetNode
.
y
-
curNode
.
y
)));
}
else
if
(
targetNode
.
x
>
curNode
.
x
&&
targetNode
.
y
<
curNode
.
y
)
{
// 落点在起点右下
}
else
if
(
targetNode
.
x
>
curNode
.
x
&&
targetNode
.
y
<
curNode
.
y
)
{
// 落点在起点右下
angle
=
-
180
/
Math
.
PI
*
Math
.
atan
(
Math
.
abs
((
targetNode
.
y
-
curNode
.
y
)
/
(
targetNode
.
x
-
curNode
.
x
)))
-
90
;
angle
=
-
180
/
Math
.
PI
*
Math
.
atan
(
Math
.
abs
((
targetNode
.
y
-
curNode
.
y
)
/
(
targetNode
.
x
-
curNode
.
x
)))
-
90
;
}
else
if
(
targetNode
.
x
>
curNode
.
x
&&
targetNode
.
y
<
curNode
.
y
)
{
// 落点在起点左下
}
else
if
(
targetNode
.
x
<
curNode
.
x
&&
targetNode
.
y
<
curNode
.
y
)
{
// 落点在起点左下
angle
=
180
/
Math
.
PI
*
Math
.
atan
(
Math
.
abs
((
targetNode
.
y
-
curNode
.
y
)
/
(
targetNode
.
x
-
curNode
.
x
)))
+
90
;
angle
=
180
/
Math
.
PI
*
Math
.
atan
(
Math
.
abs
((
targetNode
.
y
-
curNode
.
y
)
/
(
targetNode
.
x
-
curNode
.
x
)))
+
90
;
}
}
return
angle
;
return
angle
;
...
...
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