Added a move function to the position class

skamkraft_proto
Anulax ago%!(EXTRA string=1 year)
parent 3095151e5e
commit 9fac2957d8
  1. 5
      js/skama_code/commun/position.js

@ -10,4 +10,9 @@ export class Position {
get_canvas_pos(w, h) {
return new Position(x - w/2, y - h/2)
}
move(position) {
this.x += position.x;
this.y += position.y;
}
}
Loading…
Cancel
Save