|
@@ -108,7 +108,7 @@ export class car extends Component {
|
|
this.hp_bar.getComponent(hp_bar).updateHp(this.hp)
|
|
this.hp_bar.getComponent(hp_bar).updateHp(this.hp)
|
|
// this.hp = 100000
|
|
// this.hp = 100000
|
|
if(isReLife){
|
|
if(isReLife){
|
|
-
|
|
|
|
|
|
+
|
|
}else{
|
|
}else{
|
|
this.scores = 0
|
|
this.scores = 0
|
|
}
|
|
}
|
|
@@ -252,7 +252,7 @@ export class car extends Component {
|
|
let buff_active_node = instantiate(this.buff_active_effect_pf)
|
|
let buff_active_node = instantiate(this.buff_active_effect_pf)
|
|
buff_active_node.parent = buff_info.node.parent
|
|
buff_active_node.parent = buff_info.node.parent
|
|
|
|
|
|
- console.log("data.buff_type::",data.buff_type)
|
|
|
|
|
|
+ // console.log("data.buff_type::",data.buff_type)
|
|
let box_p = buff_info.node.parent.getComponent(UITransform).convertToNodeSpaceAR(data.pos)
|
|
let box_p = buff_info.node.parent.getComponent(UITransform).convertToNodeSpaceAR(data.pos)
|
|
switch (data.buff_type) {
|
|
switch (data.buff_type) {
|
|
case config.buff_type.dun:
|
|
case config.buff_type.dun:
|
|
@@ -335,13 +335,13 @@ export class car extends Component {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- public buff_dun(){
|
|
|
|
|
|
+ public buff_dun(time:number =null){
|
|
this.addSpeedNum(tools.game_config.buff_dun_add_speed+this.mCarData.attribute.n_shield_cd)
|
|
this.addSpeedNum(tools.game_config.buff_dun_add_speed+this.mCarData.attribute.n_shield_cd)
|
|
// Tween.stopAllByTarget(this.game_manager.getBuffShowView().getBuffDun())
|
|
// Tween.stopAllByTarget(this.game_manager.getBuffShowView().getBuffDun())
|
|
// this.cancelScheduleBuffDun()
|
|
// this.cancelScheduleBuffDun()
|
|
// tween(this.game_manager.getBuffShowView().getBuffDun()).delay(tools.game_config.buff_dun).call(this.cancelScheduleBuffDun.bind(this)).start()
|
|
// tween(this.game_manager.getBuffShowView().getBuffDun()).delay(tools.game_config.buff_dun).call(this.cancelScheduleBuffDun.bind(this)).start()
|
|
// this.scheduleOnce(this.cancelScheduleBuffDun.bind(this),tools.game_config.buff_dun)
|
|
// this.scheduleOnce(this.cancelScheduleBuffDun.bind(this),tools.game_config.buff_dun)
|
|
- this.game_manager.getBuffShowView().showBuffDun(this.cancelScheduleBuffDun.bind(this),tools.game_config.buff_dun)
|
|
|
|
|
|
+ this.game_manager.getBuffShowView().showBuffDun(this.cancelScheduleBuffDun.bind(this),time!=null?time:tools.game_config.buff_dun)
|
|
audioManager.Instance().playSound(config.AUDIO.buff_dun)
|
|
audioManager.Instance().playSound(config.AUDIO.buff_dun)
|
|
this.spr.getComponent(buff_manager).updateStatus(config.SHOW_BUFF_STATUS.DUN)
|
|
this.spr.getComponent(buff_manager).updateStatus(config.SHOW_BUFF_STATUS.DUN)
|
|
this.buff_dun_status = true;
|
|
this.buff_dun_status = true;
|
|
@@ -364,6 +364,13 @@ export class car extends Component {
|
|
public startGame(){
|
|
public startGame(){
|
|
this.isStartGame = true
|
|
this.isStartGame = true
|
|
this.smoke_particle.node.active = true
|
|
this.smoke_particle.node.active = true
|
|
|
|
+ if(this.mCarData.attribute.k_sprint_cd>0){
|
|
|
|
+ this.k_sprint_cd()
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public k_sprint_cd(){
|
|
|
|
+ this.buff_dun(this.mCarData.attribute.k_sprint_cd)
|
|
}
|
|
}
|
|
public stopGame(){
|
|
public stopGame(){
|
|
this.smoke_particle.node.active = false
|
|
this.smoke_particle.node.active = false
|