Scripting Animation?
I'm making a 2d game and have a movement script attached to my slime enemy. This is the section that tells it to move:
IEnumerator Idle () { direction = -1;
while (true)
{
print ("slime has moved");
// Move in a direction
body.velocity = ( new Vector2( idleSpeed * direction, 0) );
// Wait
yield return new WaitForSeconds (2);
}
}
I want to be able to play an animation once every time the slime moves, how can I do this? I've tried setting parameters to true, but it doesn't seem to work...
Answer by PersianKiller · Sep 19, 2017 at 07:57 AM
download and watch this ,it will help you.
https://expirebox.com/download/4026f2f82efb6229fce1b4c20b2a55e8.html
Ins$$anonymous$$d of giving Persian$$anonymous$$iller manually two of your reputation points you can simply upvote his answer which gives him 10 rep points without you loosing anything. Accepting an answer gives 15 rep.
Likewise upvoting the question gives 10 rep points to the one who asked the question. Unfortunately the Unity community is vote-lazy (and half the people never accepts any answer...)
Your answer
Follow this Question
Related Questions
[Question] Unity C# Set a Player Class and refence issue 0 Answers
How to assign GameObject to Script? 1 Answer
Flashlight flickering script? 0 Answers
Get Public Methods from MonoScript 4 Answers
Menu object not responding 0 Answers