Movable object

This commit is contained in:
MaddoScientisto 2024-04-26 14:24:25 +02:00
commit 5e667fd6d2
6 changed files with 97 additions and 17 deletions

View file

@ -56,6 +56,7 @@ local mouse_debug = require(make_path("mouse_debug"))
local map_manager = require(make_path("map"))
local weapons_manager = require(make_path("weapons"))
local Barrel = require(make_path("barrel"))
local Strawberry = require(make_path("strawberry"))
tile_width = 16
tile_height = 16
@ -104,7 +105,7 @@ function _draw()
mouse_debug.draw(4, tile_width, tile_height)
weapons_manager.debug_draw()
print(string.format("Actors: %d", count(actors)),0,32+8)
end
@ -121,7 +122,11 @@ function spawn_objects()
if (tile == 3) then
local b = Barrel:new(x*tile_width,y*tile_height)
add(actors,b)
elseif(tile == 72) then
local s = Strawberry:new(x*tile_width,y*tile_height)
add(actors,s)
end
end
end