Skip to content

Instantly share code, notes, and snippets.

@zhixu
Created August 5, 2014 03:17
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 zhixu/7367fd6a1a050b08a43d to your computer and use it in GitHub Desktop.
Save zhixu/7367fd6a1a050b08a43d to your computer and use it in GitHub Desktop.
public bool tapEvent(float x,float y)
{
if(LAppDefine.DEBUG_LOG) Debug.Log("tapEvent view x:"+x+" y:"+y);
if(hitTest( "D_REF.HEAD",x, y ))
{
startMotion("nod", 0, LAppDefine.PRIORITY_NORMAL); // display motion
Camera.main.GetComponent<GUIAnswers>().eliminateAnswer (); // eliminate answer
}
if(hitTest( LAppDefine.HIT_AREA_MOUTH, x, y))
{
string var = Camera.main.GetComponent<GameController>().getCurrentPronunciation();
getAudio(var); // calls function to get pronunciation of variable
}
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment