Update 1. Introduction authored by Jake Carfagno's avatar Jake Carfagno
......@@ -113,6 +113,17 @@ Each EventCondition comes with one setting, and some EventCondition will contain
* **invertCondition:** A boolean allowing you to invert the output of the condition-check by applying a NOT operator to it. This allows you to use one class to check whether something is true or false instead of having to create separate EventConditions for each version.
# Sample Object
Below is a screenshot of a sample GameObject Controls_MoveLeft, taken from the sample scene within the asset. The GameObject below has 1 **EventTrigger** and 2 **EventActions**.
![Sample_MoveLeft_Captioned](uploads/8cf8a1d061a765dd79566ea445ca00db/Sample_MoveLeft_Captioned.png)
The EventTrigger, **TriggerInputKey**, activates during each Update() that the user is holding the 'A' key. The EventActions **ActionTransformPositionSet** and **ActionCanvasTextSet** have the following effect when the EventTrigger is invoked:
* **ActionTransformPositionSet** moves the target Transform, in this case the Player Transform, to the position where Pos Object (LeftPos Transform) is located. LeftPos is a GameObject child of the Player GameObject. As such, when the Player GameObject is moved, the LeftPos also moves to maintain its local position offset from the parent. This simple combination of TriggerInputKey and ActionTransformPositionSet gives the player the ability to move in one direction by holding down a key.
* **ActionCanvasTextSet** sets the text contents displayed by a Unity UI Canvas. The value to display can be hard-coded, but in the example here, the value is instead set using a pointer to another GameObject: the Controls_MoveLeft GameObject itself. The pointer's Target Field `name` indicates that, when this Action fires, the Canvas Text element will display the name of the Controls_MoveLeft GameObject. Within the example, this is used to show the player which GameObject is actively moving the player.
# System Flow
![ModularEventsFlow](uploads/7cd04eec96ce33577168440555bcd3e0/ModularEventsFlow.png)
......
......