Exemple #1
0
 /// <summary>
 /// Called when the state machine transitions from a state to another.
 /// </summary>
 /// <param name="e">Custom event arguments.</param>
 protected virtual void OnStateChanged(StateChangedEventArgs e)
 {
     StateChanged?.Invoke(this, e);
 }
Exemple #2
0
 /// <summary>
 /// UI Setups
 /// </summary>
 public void SetupGUI(object sender, Bitcraft.StateMachine.StateChangedEventArgs e)
 {
     generateColorSection.gameObject.SetActive(e.NewState.Token == BitcraftTestStateTokens.GenerateColor);
     validateColorSection.gameObject.SetActive(e.NewState.Token == BitcraftTestStateTokens.ValidateColor);
     showColorSection.gameObject.SetActive(e.NewState.Token == BitcraftTestStateTokens.DisplayColor);
 }