mirror of
https://gitlab.com/MaddoScientisto/cirnofarm.git
synced 2026-06-05 00:15:54 +00:00
Movable object
This commit is contained in:
parent
56fa9bce02
commit
5e667fd6d2
6 changed files with 97 additions and 17 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue