Some Tips for Behavior DefinitionForeUI provides the flexibility to define actions for each element, we can use Event, Flow Control and Action to define the behavior as a flowchart. Here are some tips to help defining a clear and effective flowchart. Don't Place Pause Action at the EndThe Pause action can wait for a while before executing the subsequent actions. The correct understanding is that, Pause action can delay the subsequent actions. So if there is no action defined after the Pause action, the Pause action will not take effect, even if you place it in a loop, the Pause action will not take effect in next circle. So Please don't place Pause action at the end, the table below show some examples:
Use Only One (or don't use) Pause Action In the LoopPause action is very useful when you want to implement an animation, we may want to place the Pause action in a loop. But please notice that if you place multiple Pause actions in one loop, the loop will not really work. This is a limitation of the Pause action implementation, and it seems to limit our design. Fortunately in most cases the "one Pause in one loop" can meet our requirement.
If you really need the case listed as bad case above, you can change it to this structure:
With this structure, you can perform one action in one circle, and the interval between circles will be 1 second. From V2.00, the loop support delay itself, so you don't need to use Pause action in loop. Make Good Use of Copy and PasteThe copy and paste for behavior editor is supported from V1.70, you can right click the item in the behavior tree and perform cut, copy or paste. You can do the copy and paste cross events, or even cross elements. That will save you a lot of time to define similar behavior for multiple elements. You can also use drag and drop to move or copy items of behavior tree.
|
||||||||||||||||