|
|
@@ -17,11 +17,14 @@ export default class CommonNode extends cc.Component {
|
|
|
return this.ins;
|
|
|
}
|
|
|
|
|
|
- private timerSkillCool = 0;
|
|
|
+ //private timerSkillCool = 0;
|
|
|
private toggleSkillCool = false;
|
|
|
|
|
|
onLoad() {
|
|
|
CommonNode.ins = this;
|
|
|
+ if (GameController.gameData.player.skill_cooling_time > 0){
|
|
|
+ this.timerStartSkillCooling();
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
update(dt) {
|
|
|
@@ -29,13 +32,13 @@ export default class CommonNode extends cc.Component {
|
|
|
}
|
|
|
|
|
|
timerStartSkillCooling() {
|
|
|
- this.timerSkillCool = 0;
|
|
|
+ //this.timerSkillCool = 0;
|
|
|
this.toggleSkillCool = true;
|
|
|
}
|
|
|
|
|
|
timerUpdateSkillCooling(dt) {
|
|
|
if (this.toggleSkillCool) {
|
|
|
- this.timerSkillCool += dt;
|
|
|
+ //this.timerSkillCool += dt;
|
|
|
//if (this.timerSkillCool > 1) {
|
|
|
// this.timerSkillCool = 0;
|
|
|
GameController.gameData.player.skill_cooling_time -= dt;
|