a new event: receiving code changes from the driver
This commit is contained in:
parent
25b1fb8cc5
commit
6a5eca342c
1
0001-on
1
0001-on
|
@ -4,6 +4,7 @@ on = {
|
||||||
-- supported handlers:
|
-- supported handlers:
|
||||||
-- on.initialize (see love.load)
|
-- on.initialize (see love.load)
|
||||||
-- on.quit
|
-- on.quit
|
||||||
|
-- on.code_changed (runs after every time the driver sends a new definition)
|
||||||
-- on.draw
|
-- on.draw
|
||||||
-- on.update
|
-- on.update
|
||||||
-- on.resize
|
-- on.resize
|
||||||
|
|
1
live.lua
1
live.lua
|
@ -148,6 +148,7 @@ function live.update(dt)
|
||||||
local buf = live.receive()
|
local buf = live.receive()
|
||||||
if buf then
|
if buf then
|
||||||
live.run(buf)
|
live.run(buf)
|
||||||
|
if on.code_changed then on.code_changed() end
|
||||||
end
|
end
|
||||||
Live.Previous_read = Current_time
|
Live.Previous_read = Current_time
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue