mirror of
https://gitlab.com/MaddoScientisto/cirnofarm.git
synced 2026-06-16 05:13:47 +00:00
Converted cirno to movable object
This commit is contained in:
parent
5e667fd6d2
commit
81a8c11823
5 changed files with 76 additions and 186 deletions
11
src/game.lua
11
src/game.lua
|
|
@ -51,7 +51,7 @@ end
|
|||
--local strawberry = require(make_path("strawberry"))
|
||||
--strawberry.func()
|
||||
|
||||
local cirno = require(make_path("cirno"))
|
||||
local Cirno = require(make_path("cirno"))
|
||||
local mouse_debug = require(make_path("mouse_debug"))
|
||||
local map_manager = require(make_path("map"))
|
||||
local weapons_manager = require(make_path("weapons"))
|
||||
|
|
@ -63,11 +63,12 @@ tile_height = 16
|
|||
|
||||
function _init()
|
||||
spawn_objects()
|
||||
cirnoInstance = cirno.init()
|
||||
cirnoInstance = Cirno.init()
|
||||
add(actors,cirnoInstance)
|
||||
end
|
||||
|
||||
function _update()
|
||||
cirno.update()
|
||||
--cirno.update()
|
||||
|
||||
weapons_manager.update()
|
||||
|
||||
|
|
@ -106,7 +107,7 @@ function _draw()
|
|||
weapons_manager.debug_draw()
|
||||
|
||||
print(string.format("Actors: %d", count(actors)),0,32+8)
|
||||
|
||||
print(string.format("%.4f %dfps",stat(1),stat(7)),2,16,5)
|
||||
end
|
||||
|
||||
function spawn_objects()
|
||||
|
|
@ -142,7 +143,7 @@ function render_layer(layer)
|
|||
|
||||
if (layer.render_objects) then
|
||||
-- Render all objects here
|
||||
cirno.draw()
|
||||
--cirno.draw()
|
||||
|
||||
weapons_manager.draw()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue