0
\$\begingroup\$

I am currently trying to make a beat them up 2d game for learning purpose and was trying implement a combat system where if player hits with slash attack then enemy will be playing let's say "Hurt Animation 1" and if player jabs then enemy will play "Hurt Animation 2". This animation also depends upon direction of hit. I was able to get the animation state info to check which attack player was using by using GetCurrentAnimatorStateInfo. And there are other two inputs to check cctype and ccdirection. So there are total 3 inputs which will define which animation will be played. I can use some bools and it would be done but it would be too much complex for more type of cc like stun, knockback. I tried to use Animation Class with few variables like cctype, ccdire, cclocation but couldn't figure out how I would use that info. If you guys have any idea the please let me know. Thank you

\$\endgroup\$
1
  • \$\begingroup\$ How about a series of if-else in the code (rather than in animator) to find the animation to play? \$\endgroup\$
    – Mangata
    Jun 23 at 3:24

0

You must log in to answer this question.

Browse other questions tagged .