x


Play one animation and rewind another

I have one animation controlled by a GUI button. When pressed an object slides onto the screen. Sometimes there might be another object on the screen that has slid on the screen from another GUI button. What can I add to my code to buttons to make the other animation rewind and slide off of the screen when one slides on. here is an example of my button.

function OnGUI () { if (GUI.Button (Rect (10,10,70,20), "RED")) {

        animation.Play("Redinfo");   
}

}

the name of the second animation clip is titled "blackinfo" I want this animation to rewind and slide off the screen when the Red GUI button is pressed. Thanks

more ▼

asked Feb 17 '11 at 07:07 PM

Dan Jimenez gravatar image

Dan Jimenez
20 13 13 18

(comments are locked)
10|3000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3768
x3668
x167
x20

asked: Feb 17 '11 at 07:07 PM

Seen: 1031 times

Last Updated: Feb 17 '11 at 07:07 PM