working ECS base
This commit is contained in:
parent
f3c17f6d03
commit
4078cdea8f
8 changed files with 104 additions and 23 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue