many exports to scriptengine
This commit is contained in:
@ -81,8 +81,15 @@ function Initialize()
|
||||
::body = RigidBody();
|
||||
::camera = Camera();
|
||||
::mainSceneGraph = SceneGraph();
|
||||
::camera.lookAt (0.0, 0.0, 0.0);
|
||||
// ::camera.lookAt (0.0, 0.0, 0.0);
|
||||
::mainSceneGraph.setCamera (::camera);
|
||||
setSceneGraph(::mainSceneGraph);
|
||||
local model = Model ("combat");
|
||||
local node = SceneNode("test");
|
||||
node.setModel (model);
|
||||
node.setPosition (0.0, 0.0, -50.0);
|
||||
::mainSceneGraph.attachNode (node);
|
||||
|
||||
}
|
||||
|
||||
function OnFrame (delta, total)
|
||||
@ -101,10 +108,11 @@ function OnOverlay (delta, total)
|
||||
::frameCount = 0;
|
||||
::lastFPS -= 0.1;
|
||||
}
|
||||
|
||||
/*
|
||||
if (total < 2.0)
|
||||
::logo.draw (0.5, 0.5);
|
||||
else
|
||||
*/
|
||||
{
|
||||
v <- ::body.getPosition();
|
||||
::font.print(10, 40, "Position: " + v.x + ", " + v.y + ", " + v.z, 1, 1 );
|
||||
@ -125,7 +133,7 @@ function OnOverlay (delta, total)
|
||||
|
||||
function OnStep (delta, total)
|
||||
{
|
||||
::body.applyLocalForce( Vector(1.0, 0.0, 1.0) );
|
||||
::body.applyLocalForce( Vector(0.0, 0.0, 1.0) );
|
||||
}
|
||||
|
||||
function Shutdown()
|
||||
|
Reference in New Issue
Block a user