var lever : AudioClip;
if (GUI.Button (Rect(510,150,80,20), "Lever"))
{
animation.Play ("lever1");
audio.PlayOneShot(lever);
}
=====================================================================================================================================================================
// Plays the default animation
animation.Play();
animation.Play();
// Plays the walk animation - stops all other animations in the same layer
animation.Play("walk");
// Plays the walk animation - stops all other animations
animation.Play("walk", PlayMode.StopAll);
animation.Play("walk");
// Plays the walk animation - stops all other animations
animation.Play("walk", PlayMode.StopAll);
====================================================================================================================================================================
No comments:
Post a Comment