working ECS base

This commit is contained in:
Hartmut Seichter 2020-12-14 00:07:27 +01:00
parent f3c17f6d03
commit 4078cdea8f
8 changed files with 104 additions and 23 deletions

View file

@ -11,17 +11,26 @@ local s = pw.scene.new()
print(s)
local e = pw.entity.new(s)
c = pw.entity.new(s)
local c = pw.entity.new(s)
print(e)
print(c)
print(e.child_count)
-- add child
e.add_child(c)
e:add_child(c)
print(e.child_count)
if e:remove_child(c) then
print("remove_child success")
else
print("remove_child fail")
end
print(e.child_count)
print("bye, bye pixwerx!")
return 1