Commit c18813a4 authored by spc's avatar spc

1

parent c6cc89cb
......@@ -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)
}
......
......@@ -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() {
......
{
"success": true,
"code": "",
"message": "",
"data": null
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment