|
@@ -89,22 +89,21 @@ cc.Class({
|
|
|
});
|
|
});
|
|
|
this.Charactor.on("hurt_ord", () => {
|
|
this.Charactor.on("hurt_ord", () => {
|
|
|
// console.log("检测到受普攻");
|
|
// console.log("检测到受普攻");
|
|
|
- this.UiController.Shake(this.Charactor, 1);
|
|
|
|
|
|
|
+ this.UiController.Shake(this.Charactor, 2);
|
|
|
cc.audioEngine.playEffect(this.UiController.audioArr[4]);
|
|
cc.audioEngine.playEffect(this.UiController.audioArr[4]);
|
|
|
this._hp = this.minusblood(this._hp);
|
|
this._hp = this.minusblood(this._hp);
|
|
|
this.progressBar_hp.getComponent(cc.Sprite).fillRange = this._hp / this._maxhp;
|
|
this.progressBar_hp.getComponent(cc.Sprite).fillRange = this._hp / this._maxhp;
|
|
|
});
|
|
});
|
|
|
this.Charactor.on("hurt_critical", () => {
|
|
this.Charactor.on("hurt_critical", () => {
|
|
|
//console.log("检测到受暴击");
|
|
//console.log("检测到受暴击");
|
|
|
- this.UiController.Shake(this.Charactor, 1);
|
|
|
|
|
|
|
+ this.UiController.Shake(this.Charactor, 2);
|
|
|
cc.audioEngine.playEffect(this.UiController.audioArr[4]);
|
|
cc.audioEngine.playEffect(this.UiController.audioArr[4]);
|
|
|
this._hp = this.minusblood_critical(this._hp);
|
|
this._hp = this.minusblood_critical(this._hp);
|
|
|
//console.log("暴击后的血量:", this._hp);
|
|
//console.log("暴击后的血量:", this._hp);
|
|
|
this.progressBar_hp.getComponent(cc.Sprite).fillRange = this._hp / this._maxhp;
|
|
this.progressBar_hp.getComponent(cc.Sprite).fillRange = this._hp / this._maxhp;
|
|
|
});
|
|
});
|
|
|
this.Charactor.on("hurt_double", () => {
|
|
this.Charactor.on("hurt_double", () => {
|
|
|
- this.UiController.Shake(this.Charactor, 1);
|
|
|
|
|
- this.UiController.Shake(this.Charactor, 1);
|
|
|
|
|
|
|
+ this.UiController.Shake(this.Charactor, 2);
|
|
|
cc.audioEngine.playEffect(this.UiController.audioArr[4]);
|
|
cc.audioEngine.playEffect(this.UiController.audioArr[4]);
|
|
|
|
|
|
|
|
cc.audioEngine.playEffect(this.UiController.audioArr[4]);
|
|
cc.audioEngine.playEffect(this.UiController.audioArr[4]);
|
|
@@ -128,12 +127,7 @@ cc.Class({
|
|
|
self.PanelResult.addChild(cc.instantiate(ResultArr));
|
|
self.PanelResult.addChild(cc.instantiate(ResultArr));
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
- if (this._hp <= this._damage) {
|
|
|
|
|
- this.UiController.Ui_Shake(4); //气血不足
|
|
|
|
|
- }
|
|
|
|
|
- if (this._endurance <= this._block_minus_endurance) {
|
|
|
|
|
- this.UiController.Ui_Shake(5); //能量不足不足
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
init() {
|
|
init() {
|
|
|
this.gamestate = cc.find("Canvas/Game/Interface_Game").getComponent('Interface_game');
|
|
this.gamestate = cc.find("Canvas/Game/Interface_Game").getComponent('Interface_game');
|