Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
db-game-template
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
崔立强
db-game-template
Commits
f2edbe76
Commit
f2edbe76
authored
Feb 01, 2021
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
06bc45f7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
publish.js
egret/publish.js
+2
-2
PlayScene.ts
egret/src/playScene/PlayScene.ts
+9
-9
No files found.
egret/publish.js
View file @
f2edbe76
...
@@ -24,8 +24,8 @@ class TuiaAutoUpload {
...
@@ -24,8 +24,8 @@ class TuiaAutoUpload {
var
_this
=
this
;
var
_this
=
this
;
this
.
client
=
new
OSS
({
this
.
client
=
new
OSS
({
region
:
'oss-cn-hangzhou'
,
region
:
'oss-cn-hangzhou'
,
accessKeyId
:
'LTAI
qO2wblIxQvwc
'
,
accessKeyId
:
'LTAI
4Fw25WcfcGv7FvcHoiHK
'
,
accessKeySecret
:
'
4brsaSRbRpjxw3oDIxJi6bNMcndIR6
'
,
accessKeySecret
:
'
NZk1NtT9J5HFaAolNbtQdzTzLLvLYm
'
,
bucket
:
_this
.
type
===
'prod'
?
'duiba'
:
'daily-duiba'
bucket
:
_this
.
type
===
'prod'
?
'duiba'
:
'daily-duiba'
});
});
this
.
bar
=
new
ProgressBar
(
chalk
.
yellow
(
` 文件上传中 [:bar] :current/
${
this
.
files
().
length
}
:percent :elapseds`
),
{
this
.
bar
=
new
ProgressBar
(
chalk
.
yellow
(
` 文件上传中 [:bar] :current/
${
this
.
files
().
length
}
:percent :elapseds`
),
{
...
...
egret/src/playScene/PlayScene.ts
View file @
f2edbe76
...
@@ -25,7 +25,7 @@ import { degToRad, radToDeg } from "./physics/Const";
...
@@ -25,7 +25,7 @@ import { degToRad, radToDeg } from "./physics/Const";
import
{
RegTriangle
}
from
"./physics/RegTriangle"
;
import
{
RegTriangle
}
from
"./physics/RegTriangle"
;
import
Pool
from
"./Pool"
;
import
Pool
from
"./Pool"
;
import
{
getBounce
,
getLadderGap
,
getLadderHPosition
,
getLadderPosition
,
isSpecialBody
,
isSpecialCircle
}
from
"./utils"
;
import
{
getBounce
,
getLadderGap
,
getLadderHPosition
,
getLadderPosition
,
isSpecialBody
,
isSpecialCircle
}
from
"./utils"
;
var
_ANGLE
=
45
;
export
default
class
PlayScene
extends
Scene
{
export
default
class
PlayScene
extends
Scene
{
initEvents
()
{
initEvents
()
{
this
.
stage
.
addEventListener
(
egret
.
Event
.
ENTER_FRAME
,
this
.
onEnterFrame
,
this
);
this
.
stage
.
addEventListener
(
egret
.
Event
.
ENTER_FRAME
,
this
.
onEnterFrame
,
this
);
...
@@ -167,10 +167,10 @@ export default class PlayScene extends Scene {
...
@@ -167,10 +167,10 @@ export default class PlayScene extends Scene {
const
detaY
=
e
.
localY
-
0
;
const
detaY
=
e
.
localY
-
0
;
if
(
detaY
!=
0
)
{
if
(
detaY
!=
0
)
{
let
angle
=
Math
.
atan
(
detaX
/
detaY
);
let
angle
=
Math
.
atan
(
detaX
/
detaY
);
if
(
angle
>
Math
.
PI
/
180
*
75
)
if
(
angle
>
Math
.
PI
/
180
*
_ANGLE
)
angle
=
Math
.
PI
/
180
*
75
;
angle
=
Math
.
PI
/
180
*
_ANGLE
;
if
(
angle
<
-
Math
.
PI
/
180
*
75
)
if
(
angle
<
-
Math
.
PI
/
180
*
_ANGLE
)
angle
=
-
Math
.
PI
/
180
*
75
;
angle
=
-
Math
.
PI
/
180
*
_ANGLE
;
this
.
line
.
rotation
=
this
.
shooter
.
rotation
=
-
angle
*
radToDeg
;
this
.
line
.
rotation
=
this
.
shooter
.
rotation
=
-
angle
*
radToDeg
;
this
.
directionAngle
=
angle
;
this
.
directionAngle
=
angle
;
this
.
updateLine
();
this
.
updateLine
();
...
@@ -201,10 +201,10 @@ export default class PlayScene extends Scene {
...
@@ -201,10 +201,10 @@ export default class PlayScene extends Scene {
if
(
detaY
!=
0
)
{
if
(
detaY
!=
0
)
{
let
angle
=
Math
.
atan
(
detaX
/
detaY
);
let
angle
=
Math
.
atan
(
detaX
/
detaY
);
if
(
angle
>
Math
.
PI
/
180
*
75
)
if
(
angle
>
Math
.
PI
/
180
*
_ANGLE
)
angle
=
Math
.
PI
/
180
*
75
;
angle
=
Math
.
PI
/
180
*
_ANGLE
;
if
(
angle
<
-
Math
.
PI
/
180
*
75
)
if
(
angle
<
-
Math
.
PI
/
180
*
_ANGLE
)
angle
=
-
Math
.
PI
/
180
*
75
;
angle
=
-
Math
.
PI
/
180
*
_ANGLE
;
this
.
line
.
rotation
=
this
.
shooter
.
rotation
=
-
angle
*
radToDeg
;
this
.
line
.
rotation
=
this
.
shooter
.
rotation
=
-
angle
*
radToDeg
;
this
.
directionAngle
=
angle
;
this
.
directionAngle
=
angle
;
this
.
updateLine
();
this
.
updateLine
();
...
...
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