arena: Fixed drone sprite rotation
This commit is contained in:
parent
ee1cbc9c14
commit
2f3a39199a
|
@ -203,14 +203,14 @@ module TS.SpaceTac.UI {
|
|||
|
||||
if (animate) {
|
||||
sprite.position.set(drone.owner.arena_x, drone.owner.arena_y);
|
||||
sprite.rotation = drone.owner.arena_angle;
|
||||
let move_duration = Animations.moveInSpace(sprite, drone.x, drone.y, angle);
|
||||
sprite.sprite.rotation = drone.owner.arena_angle;
|
||||
let move_duration = Animations.moveInSpace(sprite, drone.x, drone.y, angle, sprite.sprite);
|
||||
this.game.tweens.create(sprite.radius).from({ alpha: 0 }, 500, Phaser.Easing.Cubic.In, true, move_duration);
|
||||
|
||||
return move_duration + 500;
|
||||
} else {
|
||||
sprite.position.set(drone.x, drone.y);
|
||||
sprite.rotation = angle;
|
||||
sprite.sprite.rotation = angle;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -101,7 +101,6 @@ module TS.SpaceTac.UI {
|
|||
if (active) {
|
||||
this.duration.text = `${this.drone.duration}`;
|
||||
}
|
||||
this.sprite.rotation = active ? -this.rotation : 0;
|
||||
this.sprite.scale.set(active ? 0.2 : 0.1);
|
||||
this.view.animations.setVisible(this.duration, active, 200);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue