Skip to content

Instantly share code, notes, and snippets.

@zhixu
Created August 4, 2014 09:41
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/acfc7219e431c43202a3 to your computer and use it in GitHub Desktop.
Save zhixu/acfc7219e431c43202a3 to your computer and use it in GitHub Desktop.
public void setExpression(string name)
{
if( ! expressions.ContainsKey( name ) )return;
if( LAppDefine.DEBUG_LOG ) Debug.Log( "Setting expression : " + name ) ;
AMotion motion=expressions[ name ] ;
expressionManager.startMotion( motion , false ) ;
}
public void setRandomExpression()
{
int no=(int)(rand.NextDouble() * expressions.Count);
string[] keys = new string[expressions.Count];
expressions.Keys.CopyTo(keys,0);
setExpression(keys[no]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment