Moved triggers in green-valley in preparation for implementing 'move' for track objects

This commit is contained in:
Sachith Hasaranga Seneviratne
2014-07-03 09:56:29 +05:30
parent b47ad6df4d
commit 8292b4bce7
6 changed files with 39 additions and 21 deletions

View File

@@ -0,0 +1,4 @@
void onCollision()
{
}

View File

@@ -0,0 +1,4 @@
void onCollision()
{
}

View File

@@ -1,11 +0,0 @@
void onTrigger()
{
//TrackObject @t_obj = getTrackObject("anim_sheep2.b3d");
//t_obj.setEnable(false);
//Mesh @sheepMesh = t_obj.getMesh();
//displayMessage("moo");
//sheepMesh.setLoop(6,9); //rapid-nod sheep
runScript("sheep_dance");
}

View File

@@ -1,10 +0,0 @@
void onTrigger()
{
TrackObject @t_obj = getTrackObject("anim_sheep2.b3d");
//t_obj.setEnable(false);
Mesh @sheepMesh = t_obj.getMesh();
//displayMessage("moo");
sheepMesh.setLoop(1,3); //rapid-nod sheep
//runScript("sheep_approach");
}

View File

@@ -0,0 +1,24 @@
void sheep_dance()
{
TrackObject @t_obj = getTrackObject("anim_sheep2.b3d");
//t_obj.setEnable(false);
Mesh @sheepMesh = t_obj.getMesh();
//displayMessage("moo");
sheepMesh.setLoop(1,3); //rapid-nod sheep
//runScript("sheep_approach");
}
void sheep_approach()
{
//TrackObject @t_obj = getTrackObject("anim_sheep2.b3d");
//t_obj.setEnable(false);
//Mesh @sheepMesh = t_obj.getMesh();
//displayMessage("moo");
//sheepMesh.setLoop(6,9); //rapid-nod sheep
runScript("sheep_dance");
}

View File

@@ -69,6 +69,13 @@ namespace Scripting
{
((ThreeDAnimation*)(memory))->setPaused(mode);
}
void move(void *memory) //TODO get other params using vec3
{
core::vector3df xyz = core::vector3df(0, 0, 0);
core::vector3df hpr = core::vector3df(0, 0, 0);
core::vector3df scale = core::vector3df(1, 1, 1);
((TrackObjectPresentationMesh*)(memory))->move(xyz, hpr, scale);
}
void setLoop(int start, int end, void *memory)
{
((TrackObjectPresentationMesh*)(memory))->setLoop(start,end);