Jump to content

Callback through resources


dugasz1

Recommended Posts

Hello!

Is it possible to make callbacks through resource without exports ?
Like:

resource1:

function addCallback(theFunc)
  --Somehow store the func for later
end

function callCallback()
  --Call the callback when it's  needed
end

resource2:

function callback()
  --Callback handle something
end

exports.resource1:addCallback(callback) --Added the callback

Any tip or solution?

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...