You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a question about the recommended use of the hierarchy.
I use the SM.state property to do alot of conditional evaluation. i.e: if(SM.state == "active")
I would like to have say 2 states , "dying" and "dead". If I was to check this
if(SM.state == "dead") , is there a way that I could have that condition also = "dying" ?
I thought maybe if dead was the parent state and dying was the child, but that doesn't work
do I need to do if(state == "dying" || state == "dead") everytime ? that doesn't feel right to me.
Or should I have 3 states "deadAsParent" as the parent, and "dying" and "dead' as the child
and then only ever test (SM.parentState == "deadAsParent")
I may be overcomplicating this, as I am still grasping how to use this class in real-world cases.
Thanks again
Ryan
The text was updated successfully, but these errors were encountered:
I have a question about the recommended use of the hierarchy.
I use the SM.state property to do alot of conditional evaluation. i.e: if(SM.state == "active")
I would like to have say 2 states , "dying" and "dead". If I was to check this
if(SM.state == "dead") , is there a way that I could have that condition also = "dying" ?
I thought maybe if dead was the parent state and dying was the child, but that doesn't work
do I need to do if(state == "dying" || state == "dead") everytime ? that doesn't feel right to me.
Or should I have 3 states "deadAsParent" as the parent, and "dying" and "dead' as the child
and then only ever test (SM.parentState == "deadAsParent")
I may be overcomplicating this, as I am still grasping how to use this class in real-world cases.
Thanks again
Ryan
The text was updated successfully, but these errors were encountered: