Skip to content

Instantly share code, notes, and snippets.

@Kruithne
Created July 4, 2014 01:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kruithne/0968627acd0562455979 to your computer and use it in GitHub Desktop.
Save Kruithne/0968627acd0562455979 to your computer and use it in GitHub Desktop.
OGRE!
if (ogre.isItching())
{
if (ogre.getItchStage() == 0)
{
boolean done = true;
if (rightarm.rotateAngleX > -2.96706F)
{
done = false;
rightarm.rotateAngleX -= 0.1F;
}
if (rightarm.rotateAngleZ < 0.418879F)
{
done = false;
rightarm.rotateAngleZ += 0.1F;
}
if (done)
ogre.nextItchStage();
}
else if (ogre.getItchStage() == 1 || ogre.getItchStage() == 3)
{
if (rightarm.rotateAngleX > -3.152065F)
rightarm.rotateAngleX -= 0.1F;
else
ogre.nextItchStage();
}
else if (ogre.getItchStage() == 2 || ogre.getItchStage() == 4)
{
if (rightarm.rotateAngleX < -2.96706F)
rightarm.rotateAngleX += 0.1F;
else
ogre.nextItchStage();
}
else if (ogre.getItchStage() == 5)
{
boolean done = true;
if (rightarm.rotateAngleX < -0.0F)
{
done = false;
rightarm.rotateAngleX += 0.1F;
}
if (rightarm.rotateAngleZ > 0.0F)
{
done = false;
rightarm.rotateAngleZ -= 0.1F;
}
if (done)
ogre.cancelItching();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment