From 83a99a331e93b59c8be4817d7a3024bd8bc0894a Mon Sep 17 00:00:00 2001 From: Wolfyxon Date: Mon, 18 Dec 2023 16:52:52 +0100 Subject: [PATCH] Added moveLocalVec() --- scripts/lib/game.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/lib/game.js b/scripts/lib/game.js index 77b1f322..eda52ccd 100644 --- a/scripts/lib/game.js +++ b/scripts/lib/game.js @@ -202,6 +202,10 @@ function Sprite(image,x,y,rot,w,h){ return spr.moveXY(localX, localY); } + spr.moveLocalVec = function(vector){ + return spr.moveLocalXY(vector.x, vector.y); + } + spr.rescale = function(scale){ spr.area.rescale(scale); return spr;