Demo entry 6354573

test

   

Submitted by anonymous on Apr 08, 2017 at 17:28
Language: Lua. Code size: 826 Bytes.

function onAdd()
	--events:addListener(object.ownerNode, "onUpdate", up)
	--ch = object.ownerNode:getNode(2)
	--com = ch:getComponent(kite.Component.LOGIC, "myLogic")
	--com:getTable():onRemove()
	--ch:addListener(object.ownerNode, "onTest", up)
	--ch:removeListener(object.ownerNode, "onMsg")
	ch = k.Node("hhg")
	print(ch.name)
	--k.Node:getChilds()
	--childs = object.ownerNode.root:getChilds()
	--print(tostring(#childs))
end

function up(type, delta)
	--object.ownerNode:removeComponent(object)
	--kite.Engine:switchActiveHierarchy(kite.Engine.Manager:load("hir"))
	--object.ownerNode.parent:removeChild(object.ownerNode)
	--object.ownerNode:removeComponent(object)
	print(delta)
	events:removeListener(object.ownerNode, "onUpdate", up)
end

function onRemove()
	print("script 1 removed")
end

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).