Simple Entity Components

### Simple Collectable

**Description:** Use when your gameplay requires collectable items that can respawn on a timer.

**Example:** Crafting Items, Food, Weapons, Ammo, Med Pacs, etc.

**Properties:**

 Volume Color | The color of the transparent sphere that represents the trigger area (Note: Editor only).

 On Collectable Collected () | Fires after the collectable has been collected.

### Simple Counter

**Description:** Use when your gameplay needs to remember how many times something happened.

**Example:** Score, Ammo, Collected Items, etc.

**Properties:**

 Clamp To Min Max | Constrains the counters between the Min and Max values (inclusive).

**Input Methods:**

 DecrementValue(int value) | Subtracts the specified value from the counter.

**Output Events:**

 On Count Max() | Fires when the value of the counter equals the Max Value property.

### Simple CounterCompare

**Description:** Tests the value of a specified counter against a given desired value then fires the appropriate event.

**Example:** Opens a door after three keys are collected, etc.

**Properties:**

 Desired Count | The value to compare against.

**Input Methods:**

 Set Desired Count (int value) | Set the Desired Count with the given value.

**Output Events:**

 On Less () | Fires this event when the desired value is less than the counter value.

### Simple Input Get Axis Button

**Description:** Accepts input from a controller then fires Down and Up events. ()

List of valid axis names to come...

***Example:** 'A' button to jump, etc.*

 On Button Up () | Fires event when the specified button is up (after being down).

### Simple Input GetKey

**Description:** Accepts input from a keyboard or mouse then fires Down and Up events.

>
> Valid Key Names:
>
> Normal keys: 'a', 'b', 'c' …
>
> Number keys: '1', '2', '3', …
>
> Arrow keys: 'up', 'down', 'left', 'right'
>
> Keypad keys: '[1]', '[2]', '[3]', '[+]', '[equals]'
>
> Modifier keys: 'right shift', 'left shift', 'right ctrl', 'left ctrl', 'right alt', 'left alt', 'right cmd', 'left cmd'
>
> Mouse Buttons: 'mouse 0', 'mouse 1', 'mouse 2', …
>
> Joystick Buttons(from any joystick): 'joystick button 0', 'joystick button 1', 'joystick button 2', …
>
> Joystick Buttons(from a specific joystick): 'joystick 1 button 0', 'joystick 1 button 1', 'joystick 2 button 0', …
>
> Special keys: 'backspace', 'tab', 'return', 'escape', 'space', 'delete', 'enter', 'insert', 'home', 'end', 'page up', 'page down'
>
> Function keys: 'f1', 'f2', 'f3', …
>
>
>
>
>

***Example:** 'space' for jump key, etc.*
 On Button Up () | Fires event when the specified button is up (after being down).

### Simple Line Of Sight Trigger

**Description:** Accepts input from a controller then fires Down and Up events.

***Example:** Jump button from game controller, etc.*

**Properties:**

 Group Filter | What type of targets to look for ("Avatar", "Player", "Enemy" , etx).

 Lost Object Event () | Fires this even after a target can no longer be found.

### Simple Mouse World Position

**Description:** Finds the position in the game world of the point under mouse cursor.

**Example:** Navigate NPC to location of the mouse cursor, etc.

### Simple Navigate

**Description:** Allows an NPC (Actor) to navigate to a specified location on a navmesh.

***Example:** Make an NPC walk to the location of the mouse cursor, etc.*

**Properties:**

 Navigate On Start | Should navigation begin at the start of the game.

**Input Methods:**

 Cancel Navigation () | Cancel the current navigation task.

**Output Events:**

### Simple Object List

**Description:** A collection of objects.

***Example:** Use the position of each object as a waypoint for NPC to march toward, etc.*

**Properties:**

 Repeat | When the SelectNext() method reaches the last object in the list, do this:
**None** - Select nothing (On Select Object event will not fire)
**Loop** - Select the first object in the list again.
**PingPong** - Select the previous object the list (SelectNext() now goes backwards).

**Input Methods:**

 Select Random () | Select a random object from the list.

**Output Events:**

### Simple Open Close

**Description:** Smoothly moves an entity between two position (a close position and an open position).

***Example:** Open a door, lower a drawbridge, raise a portcullis, slide a door sideways, etc.*

**Properties:**

 From Current Position | Should the door begin its movement from it's current position or target location?
 Only Once | Should the door only be able to be opened to closed one?

**Input Methods:**

 Close Door () | Start the door moving toward the close position.

**Output Events:**

### Simple OnEnable

**Description:** This script runs every time the object this script is attached to becomes enabled.

***Example:** Play a particle effect when an object is enabled, etc.*

### Simple OnStart

**Description:** This script runs once when the object this script is attached to starts up.

***Example:** Close a door and start a timer when the game begins, etc.*

### Simple Projectile

**Description:** This script acts like a projectile when spawned into the game world.

***Example:** Use with the 'Simple ProjectileLauncher', etc.*

**Properties:**

 Collider Preview Color | Preview color of the the projectile *(only visible in the editor)*.

### Simple Projectile Launcher

**Description:** This script spawns simple projectile objects into the game.

***Example:** Launching a Simple Projectile.*

**Properties:**

 Projectile Spawn Location | The location to spawn the projectile.

**Input Methods:**

 Fire (Vector3 target) | Fire the projectile toward the target position.

**Output Events:**

### Simple Proximity Trigger

**Description:** Triggers when an entity is with in the specified distance.

***Example:** When player gets near an NPC then open a dialog, etc.*

**Properties:**

 Group Filter | Filters the trigger to only trip on entities with a given group name.

 Trigger Exit () | Fires when the detected entity is out of range again.

### Simple Reveal Camera

**Description:** Disables the avatar and moves the camera to specified location.

***Example:** Use to reveal something the player just unlocked, etc.*

**Properties:**

 Reveal Hold | Duration of time for camera to hold after transition.

### Simple State Machine

**Description:** A list of states that switch from one to the next as requested.

***Example:** An NPC patrols between waypoints until the player is detected then switches to attack, etc.*

**Properties:**

 Run On Start | Starts the state machine when the game starts.

**Input Methods:**

 Stop State Machine () | Stops the current state.

**Output Events:**

 On Stopped () | Fires when the state machine is stopped.

### Simple State

**Description:** This state entity is used to start and stop game logic. Use in conjunction with the Simple StateMachine which manages a list of related states.

***Example:** StartState() fires the OnStateEntered() event which starts an NPC navigating then calls ExitState() when arrived, etc.*

 Exit State () | Sends a request to the associated State Machine to stop this state.

**Output Events:**

 On State Exited () | Fires when this state stops.

### Simple Timer

**Description:** A generic timer.

***Example:** Rate of fire, blink a light, action cool down, increment time in a counter, etc.*

**Properties:**

 Begin On Start | Starts the timer when the game starts.

**Input Methods:**

 Resume Timer () | Resumes the timer after being stopped.

**Output Events:**

### Simple UI Number

**Description:** Displays a simple UI element consisting of a background, a label and a integer.

***Example:** Show the current score, display a timer, etc.*

**Properties:**

 Sort Order | Sorts this UI element over or under other elements.

### Simple Volume Trigger

**Description:** Triggers when an entity is within the specified volume (box area).

***Example:** Detect avatar entering a room, detect avatar leaving a room, etc.*

**Properties:**

 Group Filter | Filters the trigger to only trip on entities with a given group name.

 Trigger Exit () | Fires when the detected entity is outside the volume again.