Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
MingSnake_241120
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
SparkProjects
MingSnake_241120
Commits
c18813a4
Commit
c18813a4
authored
Dec 14, 2024
by
spc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
c6cc89cb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
11 deletions
+10
-11
Player.ts
assets/Scripts/Scenes/MainGame/Player.ts
+4
-0
Snake.ts
assets/Scripts/Scenes/MainGame/Snake.ts
+0
-11
consumeSp.do.json
preview-template/mock/game/consumeSp.do.json
+6
-0
No files found.
assets/Scripts/Scenes/MainGame/Player.ts
View file @
c18813a4
...
...
@@ -164,21 +164,25 @@ export class Player extends Snake {
clearDouble
():
void
{
super
.
clearDouble
();
console
.
warn
(
'clearDouble'
)
Target
.
ins
.
updateProgress
(
EPropType
.
DOUBLE_EXP
,
0
,
0
)
}
clearInvincible
():
void
{
super
.
clearInvincible
();
console
.
warn
(
'clearInvincible'
)
Target
.
ins
.
updateProgress
(
EPropType
.
SHIELD
,
0
,
0
)
}
clearSpeed
():
void
{
super
.
clearSpeed
();
console
.
warn
(
'clearSpeed'
)
Target
.
ins
.
updateProgress
(
EPropType
.
SPEED
,
0
,
0
)
}
clearMagnet
():
void
{
super
.
clearMagnet
();
console
.
warn
(
'clearMagnet'
)
Target
.
ins
.
updateProgress
(
EPropType
.
MAGNET
,
0
,
0
)
}
...
...
assets/Scripts/Scenes/MainGame/Snake.ts
View file @
c18813a4
...
...
@@ -565,7 +565,6 @@ export class Snake extends Component {
/****************************** 磁铁 ******************************/
magnetTw
:
Tween
<
any
>
=
null
;
useMagnet
()
{
console
.
warn
(
"useMagnet"
)
this
.
clearMagnet
();
this
.
magnetEffectNode
.
active
=
true
;
this
.
magnetEffectNode
.
getComponent
(
Animation
).
play
();
...
...
@@ -635,26 +634,21 @@ export class Snake extends Component {
breakDefenseTw
:
Tween
<
any
>
=
null
;
useDefense
()
{
console
.
warn
(
"useDefense"
)
this
.
clearInvincible
();
this
.
invincibleTime
=
Global
.
PROP_SHIELD_DUR_TIME
;
this
.
defenseEffectNode
.
active
=
true
;
console
.
warn
(
"闪烁shijian"
,
this
.
invincibleTime
-
Global
.
PROP_SHIELD_INVINCIBLE_TIME
)
this
.
defenseTw
=
tween
(
this
.
node
).
delay
(
this
.
invincibleTime
-
Global
.
PROP_SHIELD_INVINCIBLE_TIME
)
.
call
(()
=>
{
console
.
warn
(
"闪烁"
)
this
.
defenseEffectNode
.
getComponent
(
Animation
).
play
();
})
.
delay
(
Global
.
PROP_SHIELD_INVINCIBLE_TIME
)
.
call
(()
=>
{
console
.
warn
(
"移除"
)
this
.
clearInvincible
();
})
.
start
();
}
onUpdateDefense
()
{
console
.
warn
(
"xxx"
)
}
...
...
@@ -667,7 +661,6 @@ export class Snake extends Component {
this
.
breakDefenseTw
=
tween
(
this
.
node
)
.
delay
(
Global
.
PROP_SHIELD_INVINCIBLE_TIME
)
.
call
(()
=>
{
console
.
warn
(
"移除无敌"
)
this
.
clearInvincible
();
})
.
start
();
...
...
@@ -680,7 +673,6 @@ export class Snake extends Component {
* 使用加速道具
*/
useSpeed
()
{
console
.
warn
(
"useSpeed"
)
this
.
moveScale
=
2
;
this
.
isSpeed
=
true
;
this
.
speedTw
=
tween
(
this
.
node
)
...
...
@@ -699,7 +691,6 @@ export class Snake extends Component {
/***************************** 加长 ***************************/
useGrow
()
{
console
.
warn
(
"useGrow"
)
this
.
fastGrow
(
Math
.
floor
(
Global
.
PROP_ADD_LENGTH
*
this
.
bodyArr
.
length
))
}
...
...
@@ -709,14 +700,12 @@ export class Snake extends Component {
doubleTw
:
Tween
<
any
>
=
null
;
useDouble
()
{
console
.
warn
(
"useSpeed"
)
this
.
doubleStatus
=
true
;
this
.
doubleTw
=
tween
(
this
.
node
)
.
delay
(
Global
.
PROP_DOUBLE_EXP_DUR_TIME
)
.
call
(()
=>
{
this
.
clearDouble
()
}).
start
();
console
.
warn
(
"useDouble"
)
}
clearDouble
()
{
...
...
preview-template/mock/game/consumeSp.do.json
0 → 100644
View file @
c18813a4
{
"success"
:
true
,
"code"
:
""
,
"message"
:
""
,
"data"
:
null
}
\ No newline at end of file
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