Little refactoring in VariablesSystem so it can also be used to evaluate anonymous expressions and conditions
Basic model (+engine) component that can holds an expression. Convenient for implementing a "conditioned visibility" component (next commit)
Reusable base system for conditions.
Adding support for conditioned visibility
- ModelEntities may contain "visbility" model components (Visibility), which just holds an expression that will condition the visibility of the entity on the screen (expression==true?visible:not_visible).
- Visibility components are transformed to VisibilityComponent in the engine through VisibilityProcessor.
- VisibilitySystem processes all VisibilityComponents, checking all the time if the expressions are met. VisibilitySystem extends ConditionalSystem
Simple VisibilityTest
Cool demo updated. A button that shows and hides the bee has been included
Adding conditions to timers. Test updated.
Adding conditions to touches. Have been refactored a little and now their implementation ressembles timers (RuntimeTouch added)
Adding support for conditional effects
Updating TouchesTest. Tests touches with conditions and also effects with conditions
(DOES NOT NEED TO BE REVIEWED) bindings.json