pixwerx/src/scripts/demos/simple_001.lua

28 lines
308 B
Lua
Raw Normal View History

2020-12-08 23:06:09 +01:00
--
-- small demonstrator for Lua binding on pixwerx
--
pw.script:load_all()
print("hello pixwerx!")
local s = pw.scene.new()
2020-12-11 22:54:27 +01:00
print(s)
local e = pw.entity.new(s)
c = pw.entity.new(s)
2020-12-09 12:55:33 +01:00
print(e)
2020-12-11 22:54:27 +01:00
print(e.child_count)
-- add child
e.add_child(c)
2020-12-11 22:54:27 +01:00
print(e.child_count)
2020-12-11 22:54:27 +01:00
print("bye, bye pixwerx!")
2020-12-08 23:06:09 +01:00
2020-12-11 22:54:27 +01:00
return 1