local druid = require("druid.druid")
function init(self)
self.druid = druid.new(self)
local prefab = gui.get_node("prefab")
gui.set_enabled(prefab, false)
local grid_w = self.druid:new_static_grid("grid_C_anchor", prefab, 5)
local update_pos_func = function(node, pos) gui.animate(node, "position", pos, gui.EASING_OUTSINE, 0.2) end
grid_w:set_position_function(update_pos_func)
local grids = {
grid_w
}
for i = 1, #grids do
grids[i].style.IS_DYNAMIC_NODE_POSES = false
end
local animate_grides = function()
for _, grid in ipairs(grids) do
for i = 1, #grid.nodes do
gui.delete_node(grid.nodes[i])
end
grid:clear()
for i = 1, 10 do
timer.delay(0, false, function()
local node = gui.clone(prefab)
gui.set_enabled(node, true)
grid:add(node)
end)
end
end
end
animate_grides()
timer.delay(10, true, animate_grides)
end
function final(self)
self.druid:final()
end
function update(self, dt)
self.druid:update(dt)
end
function on_message(self, message_id, message, sender)
self.druid:on_message(message_id, message, sender)
end
function on_input(self, action_id, action)
return self.druid:on_input(action_id, action)
end
editor
build
where is 1