Commit 6c435b0f authored by 杨一航's avatar 杨一航

fix

parent 645893b9
...@@ -44,6 +44,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -44,6 +44,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
private _redDot: cc.Node; private _redDot: cc.Node;
private _blueDot: cc.Node; private _blueDot: cc.Node;
private _lastIndex: any; private _lastIndex: any;
private _checkLast: boolean;
addPreloadImage() { addPreloadImage() {
...@@ -312,6 +313,12 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -312,6 +313,12 @@ export default class SceneComponent extends MyCocosSceneComponent {
catAni(playAudio?) { catAni(playAudio?) {
let state = this._status.state let state = this._status.state
if (this._checkLast) {
this._checkLast = false
this.cat.getComponent(dragonBones.ArmatureDisplay).playAnimation("normal", 0);
return
}
if (!this.isMySide) { if (!this.isMySide) {
this.cat.getComponent(dragonBones.ArmatureDisplay).playAnimation("begin", 0); this.cat.getComponent(dragonBones.ArmatureDisplay).playAnimation("begin", 0);
...@@ -680,6 +687,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -680,6 +687,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
if (isRight) { if (isRight) {
if (this.isMySide) { if (this.isMySide) {
this._checkLast = true
this.cat.getComponent(dragonBones.ArmatureDisplay).playAnimation("right", 1); this.cat.getComponent(dragonBones.ArmatureDisplay).playAnimation("right", 1);
} }
...@@ -691,6 +699,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -691,6 +699,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
} else { } else {
if (this.isMySide) { if (this.isMySide) {
this._checkLast = true
this.cat.getComponent(dragonBones.ArmatureDisplay).playAnimation("wrong", 1); this.cat.getComponent(dragonBones.ArmatureDisplay).playAnimation("wrong", 1);
} }
} }
......
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