Transition with parameters
Posted: 2021/05/03 00:26
Hello arbor team,
I am wondering if there are any transition with parameters?
Something like this:
or
But personally I prefer way # 1 since being able to access the exact parameter by id and check for its existence.
And on OnBegin will be OnBegin (Dictionary <object, object> paremeters).
Either a way to access these parameters, such as the GetTransitionParameters () method or the TransitionParameters property.
And these parameters will be deleted when leaving the state.
I know in arbor3 there is ParameterContainer. But it would be troublesome to just add everything to it. It would be simpler and cleaner if it was possible to pass separate parameters for each state separately.
It would be great if we could Transition to Attack, Move, Jump, or EndGame with some special contextual config such as attackType, attackDirection, moveSpeed (if empty, use default moveSpeed), jumpDirection, endGameResult.
I am wondering if there are any transition with parameters?
Something like this:
Code: Select all
1, Transition (Dictionary <object, object> paremeters)
Code: Select all
2, Transition (params object [] parameters)
And on OnBegin will be OnBegin (Dictionary <object, object> paremeters).
Either a way to access these parameters, such as the GetTransitionParameters () method or the TransitionParameters property.
And these parameters will be deleted when leaving the state.
I know in arbor3 there is ParameterContainer. But it would be troublesome to just add everything to it. It would be simpler and cleaner if it was possible to pass separate parameters for each state separately.
It would be great if we could Transition to Attack, Move, Jump, or EndGame with some special contextual config such as attackType, attackDirection, moveSpeed (if empty, use default moveSpeed), jumpDirection, endGameResult.