Fix new sprites only showing up in the top-right quadrant

This commit is contained in:
Florrie 2018-06-18 17:20:59 -03:00
parent 173fb6127c
commit 0527fcde64

View file

@ -1004,8 +1004,8 @@ class RenderedTarget extends Target {
const newTarget = newSprite.createClone(); const newTarget = newSprite.createClone();
// Copy all properties. // Copy all properties.
// @todo refactor with clone methods // @todo refactor with clone methods
newTarget.x = Math.random() * 400 / 2; newTarget.x = (Math.random() - 0.5) * 400 / 2;
newTarget.y = Math.random() * 300 / 2; newTarget.y = (Math.random() - 0.5) * 300 / 2;
newTarget.direction = this.direction; newTarget.direction = this.direction;
newTarget.draggable = this.draggable; newTarget.draggable = this.draggable;
newTarget.visible = this.visible; newTarget.visible = this.visible;