![]() |
PowerQuest 0.20.12
|
Region: Contains functions and data for manipluating Regions in rooms - Eg.
if ( Regions.DiscoFloor.GetCharacterOnRegion( C.Dave ) )
Regions.DiscoFloor.Tint = Color.blue;
Regions.Chasm.Walkable = false;
Properties | |
| string | ScriptName [get] |
| The name used in scripts. | |
| MonoBehaviour | Instance [get] |
| Access to the actual game object component in the scene. | |
| bool | Enabled [get, set] |
| Gets or Sets whether walking on to the region triggers OnEnterRegion and OnExitRegion events, or tints things. | |
| bool | Walkable [get, set] |
| Gets or sets whether the player can walk on this hotspot. Use to create obstructions. | |
| Color | Tint [get, set] |
| Gets or Sets the tint color to apply to the character that's standing on the hotspot (NB: Not yet implmented) | |
| bool | ContainsPlayer [get] |
| True if the player character is standing on the region. | |
| Region | Data [get] |
| Access to the base class with extra functionality used by the PowerQuest. | |
Public Member Functions | |
| bool | ContainsCharacter (ICharacter character=null) |
| Returns true if the specified character is standing inside the region. | |
| bool | ContainsPoint (Vector2 position) |
| Returns true if the specified position is inside the region. | |
| bool | GetCharacterOnRegion (ICharacter character=null) |
| Returns true if the specified character is standing inside the region. | |
|
get |
The name used in scripts.
|
get |
Access to the actual game object component in the scene.
|
getset |
Gets or Sets whether walking on to the region triggers OnEnterRegion and OnExitRegion events, or tints things.
|
getset |
Gets or sets whether the player can walk on this hotspot. Use to create obstructions.
|
getset |
Gets or Sets the tint color to apply to the character that's standing on the hotspot (NB: Not yet implmented)
|
get |
True if the player character is standing on the region.
Note that if a character has changed room or been Enabled/Disabled this frame, this function can return the old result. Eg.
if ( Regions.Lava.ContainsPlayer )
Display: Ouch!
|
get |
Access to the base class with extra functionality used by the PowerQuest.
| bool ContainsCharacter | ( | ICharacter | character = null | ) |
Returns true if the specified character is standing inside the region.
If null is passed as the chracter, the function returns true for ANY character standing inside the region.
Note that if a character has changed room or been Enabled/Disabled this frame, this function can return the old result.
| bool ContainsPoint | ( | Vector2 | position | ) |
Returns true if the specified position is inside the region.
| bool GetCharacterOnRegion | ( | ICharacter | character = null | ) |
Returns true if the specified character is standing inside the region.
If null is passed as the chracter, the function returns true for ANY character standing inside the region.
Note that if a character has changed room or been Enabled/Disabled this frame, this function can return the old result.
This is the same as using ContainsCharacter(...)