Home > other >  Questions about the state machine
Questions about the state machine

Time:09-20

My skill has two actions below, one is ready to another is mount Action, as shown in figure: I defines a variable of type int the Action, Action=1 sow when skill skill when Action=2 ready, Action=3 when sowing mount Action, I write code so that the feeling of not ah, hasExittime also causes... But don't put skills
Animator. SetInteger (" Action ", 1);//ability
if (! The mount)
{
Animator. SetInteger (" Action ", 2);//ready state
}
The else {
Animator. SetInteger (" Action ", 3);//the mount state
}

CodePudding user response:

With the switch doesn't work, a total of three states, case different state control not value, value defined in the external

CodePudding user response:

Quotes is Action, not Action

CodePudding user response:

You code above, the Action can only be equal to 2 or 3, will never be equal to 1, can ability to blame,
  • Related