mirror of
https://github.com/Insality/druid.git
synced 2025-09-27 18:12:19 +02:00
Update
This commit is contained in:
25
example/other/go_bindings/go_bindings.script
Normal file
25
example/other/go_bindings/go_bindings.script
Normal file
@@ -0,0 +1,25 @@
|
||||
local panthera = require("panthera.panthera")
|
||||
|
||||
local animation = require("example.other.go_bindings.go_bindings_panthera")
|
||||
|
||||
local druid = require("druid.druid")
|
||||
local widget = require("example.other.go_bindings.go_widget")
|
||||
|
||||
function init(self)
|
||||
self.go_widget = druid.get_widget(widget, "#go_widget")
|
||||
self.go_widget:play_animation()
|
||||
self.go_widget:set_position(go.get_position())
|
||||
|
||||
self.animation = panthera.create_go(animation)
|
||||
panthera.play(self.animation, "default", {
|
||||
is_loop = true,
|
||||
})
|
||||
|
||||
msg.post(".", "acquire_input_focus")
|
||||
end
|
||||
|
||||
|
||||
function update(self, dt)
|
||||
self.go_widget:set_position(go.get_position())
|
||||
end
|
||||
|
Reference in New Issue
Block a user