diff --git a/js/goal.mjs b/js/goal.mjs index 940fdb4..7a6c6db 100644 --- a/js/goal.mjs +++ b/js/goal.mjs @@ -32,9 +32,14 @@ Event.listen("level/load/goal", (data = {}) => { x: 0, y: 0, }, + size: { + x: 40, + y: 40, + }, }); Entity.set_pos(goal, data.pos.x, data.pos.y); + Entity.set_size(goal, data.size.x, data.size.y); Entity.set_visible(goal, true); Entity.set_physical(goal, true); diff --git a/js/player.mjs b/js/player.mjs index d741fad..b504481 100644 --- a/js/player.mjs +++ b/js/player.mjs @@ -11,9 +11,7 @@ import { underride } from "./underride.mjs"; const player = Entity.create(0, 0, 20, 20); -export function get_player () { - return player; -} +export function get_player () { return player; } function tick_player (deltatime) { const meta = Entity.get_meta(player); @@ -43,10 +41,15 @@ Event.listen("level/load/player", (data = {}) => { x: 0, y: 0, }, + size: { + x: 20, + y: 20, + }, speed: 100, }); Entity.set_pos(player, data.pos.x, data.pos.y); + Entity.set_size(player, data.size.x, data.size.y); const meta = Entity.get_meta(player);