diff --git a/druid/custom/tiling_node/tiling_node.lua b/druid/custom/tiling_node/tiling_node.lua index 2fef09b..bea3cd6 100644 --- a/druid/custom/tiling_node/tiling_node.lua +++ b/druid/custom/tiling_node/tiling_node.lua @@ -1,6 +1,6 @@ local component = require("druid.component") local helper = require("druid.helper") -local defer = require("event.defer") +local queues = require("event.queues") ---@class druid.tiling_node: druid.component ---@field animation table @@ -28,7 +28,7 @@ function M:init(node) print("The druid.script is not found, please add it nearby to the GUI collection", msg.url()) end) - defer.push("druid.get_atlas_path", { + queues.push("druid.get_atlas_path", { texture_name = gui.get_texture(self.node), sender = msg.url(), }, self.on_get_atlas_path, self) diff --git a/druid/druid.script b/druid/druid.script index 61738f7..09b3b77 100644 --- a/druid/druid.script +++ b/druid/druid.script @@ -3,7 +3,7 @@ -- This one is a required to make a unified "Shaders" pipeline in the GUI scripts -- This required to grab a texture data with `go.get` function -local defer = require("event.defer") +local queues = require("event.queues") ---Usage: defer.push("druid.get_atlas_path", { --- texture_name = gui.get_texture(self.node), @@ -35,10 +35,10 @@ end function init(self) - defer.subscribe(MESSAGE_GET_ATLAS_PATH, get_atlas_path, self) + queues.subscribe(MESSAGE_GET_ATLAS_PATH, get_atlas_path, self) end function final(self) - defer.unsubscribe(MESSAGE_GET_ATLAS_PATH, get_atlas_path, self) + queues.unsubscribe(MESSAGE_GET_ATLAS_PATH, get_atlas_path, self) end