You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hackathon = class("Hackathon")
function Hackathon:initialize(entity)
self.exports = {
variable = "Hello Rootex!"
}
end
function Hackathon:begin(entity)
print("hello")
self.mybox = RTX.Scene.CreateEmpty()
self.mybox.name = "MyBox"
self.mybox.entity:addDefaultComponent("TransformComponent")
self.mybox.entity:addDefaultComponent("ModelComponent")
self.mybox.entity:addDefaultComponent("BoxColliderComponent")
self.mybox.entity.boxCollider.sleepable = false
RTX.GetCurrentScene():addChild(self.mybox)
end
function Hackathon:update(entity, delta)
if RTX.Input.WasPressed("space") and #RTX.Scene.FindScenesByName("MyBox")==1 then
RTX.GetCurrentScene():removeChild(RTX.Scene.FindScenesByName("MyBox")[1])
end
end
function Hackathon:destroy(entity)
end
return Hackathon
No description provided.
The text was updated successfully, but these errors were encountered: