X-Git-Url: https://git.auder.net/?p=xogo.git;a=blobdiff_plain;f=utils%2FMove.js;h=776be9fbde3d7c5dd504f3c261b173a5cd21813c;hp=62eddea3ee3f739b538d55d4a4e1eb38d5105f55;hb=15106e8201ee8e46ce14f1dd369cae960e9a860c;hpb=728cb1e3b2ae84b1cf4aaa7e66b295f77dea359e diff --git a/utils/Move.js b/utils/Move.js index 62eddea..776be9f 100644 --- a/utils/Move.js +++ b/utils/Move.js @@ -1,12 +1,14 @@ // class "Move": generic ready-to-play verbose move, standardised format. export default class Move { + // o: {appear, vanish, [start,] [end,]} // appear,vanish = arrays of PiPo // start,end = coordinates to apply to trigger move visually (think castle) constructor(o) { this.appear = o.appear; this.vanish = o.vanish; - this.start = o.start || { x: o.vanish[0].x, y: o.vanish[0].y }; - this.end = o.end || { x: o.appear[0].x, y: o.appear[0].y }; + this.start = o.start || {x: o.vanish[0].x, y: o.vanish[0].y}; + this.end = o.end || {x: o.appear[0].x, y: o.appear[0].y}; } + };