![]() |
Platformer Pro
2.3.2
A platform game kit for Unity.
|
Proximity trigger acts similar to a trigger in Unity but is more easily hooked in to the platformer system. More...
Public Attributes | |
float | radius |
The proximity radius. More... | |
![]() | |
TriggerTarget[] | receivers |
The Targets that receive the triggers actions. More... | |
bool | actAsSwitch |
If true this trigger will have an on/off state and the trigger actions will only be sent if they match the on/off state. More... | |
bool | startSwitchAsOn |
If true the switch starts in the on state. More... | |
bool | sendSwitchEventsOnLoad = true |
bool | oneShot |
Fire this trigger once only then disable? More... | |
float | autoLeaveTime |
Time after enter in which leave will be automatically triggered. Ignored if 0 or smaller. More... | |
MonoBehaviour | requiredComponent |
If this is not null (none) then the required MonoBehaviour must be active and enabled before trigger will activate. More... | |
bool | useDefaultPersistence |
Does this Item get persistence defaults form the Game manager? More... | |
![]() | |
bool | enablePersistence |
Should we enable persistence? More... | |
string | guid = System.Guid.NewGuid().ToString() |
Unique ID for this object. You shoulnd't need to edit this, use editor debug mode if you must. More... | |
GameObject | target |
GameObject to apply persitence settings to, defaults to self. More... | |
PersistableObjectType | persistenceImplementation |
How do we implement the persistence settings. More... | |
bool | defaultStateIsDisabled |
If true then the obejct starts disabled. More... | |
string | spawnedObjectName |
If this item was spawned then save the name of the prefab here. More... | |
Protected Member Functions | |
override void | PostInit () |
Initialise the sensor. More... | |
virtual void | CheckProximity () |
Checks for characters in range. More... | |
![]() | |
virtual void | OnTriggerEntered (Character character, bool onOffState) |
Raises the trigger entered event. More... | |
virtual void | OnTriggerExited (Character character) |
Raises the trigger exited event. More... | |
override void | PostInit () |
Initialise the sensor. More... | |
virtual bool | EnterTrigger (Character character) |
Character entered proximity. More... | |
virtual void | DoEnterTrigger (Character character) |
Do the trigger work More... | |
virtual void | SavePersistenceData () |
Gets the extra persistence data which is used to save platform state. NOTE: Generally you should override ExtraPersistenceData to save a different set of data. More... | |
override void | ApplyCustomPersistence (PersistableObjectData data) |
Custom persistable implementation. Override to customise. More... | |
virtual bool | ConditionsMet (Character character) |
Are the conditions for firing this trigger met? More... | |
virtual bool | ExitConditionsMet (Character character) |
Are the conditions for exiting trigger met. More... | |
virtual IEnumerator | DoLeaveAfterDelay (Character character, float delay) |
Does the autoleave action. Cancelled by the leave being triggerd. More... | |
virtual bool | LeaveTrigger (Character character) |
Character leaves the trigger. More... | |
virtual void | DoLeaveTrigger (Character character) |
Does the actual work for leavinga trigger. More... | |
![]() | |
virtual void | SetPersistenceDefaults () |
Sets the persistence defaults. More... | |
virtual void | ProcessState () |
Processes the persisted state. More... | |
virtual void | ApplyExtraPersistenceData (PersistableObjectData data) |
Apply any extra data. This differs from custom persistence, as custom persistence must control both data and ctivation state. More... | |
Protected Attributes | |
List< Character > | charactersInProximity |
Characters in proximity. More... | |
List< Character > | charactersInProximityWithoutTrigger |
Characters in proximity. More... | |
![]() | |
IEnumerator | autoLeaveRoutine |
Stores the autoleave routine. More... | |
AdditionalCondition[] | conditions |
Cached list of all additional conditions. More... | |
bool | onOffState |
Are we on or off? true = on. More... | |
Additional Inherited Members | |
![]() | |
void | SetPersistenceState (bool state) |
Sets the persistence state. More... | |
void | SetPersistenceState (bool state, string extraPersistenceData) |
Sets the persistence state, overriding extra persistence data More... | |
![]() | |
virtual void | Validate (PlatformerProMonoBehaviour myTarget) |
Override this method if you want to provide custom validation. The actual code should be surrounded by the if UNITY_EDITOR / endif directive. More... | |
![]() | |
static Color | GizmoColor = new Color (1, 0.64f, 0, 0.5f) |
Default color to use when draing Trigger gizmos. More... | |
![]() | |
static bool | isLoaded |
Have we reloaded characters. More... | |
![]() | |
bool | SwitchState [get] |
![]() | |
virtual string | ExtraPersistenceData [get] |
Gets the extra persistence data. More... | |
![]() | |
virtual string | Header [get] |
Gets the header string used to describe the component. More... | |
virtual string | DocLink [get] |
Gets a link to documentation site. More... | |
virtual string | VideoLink [get] |
Gets a link to a youtube video. More... | |
virtual string | Deprecated [get] |
If non-null this component is deprecated. The string shows a message indicating how it should be replaced. More... | |
![]() | |
System.EventHandler< CharacterEventArgs > | TriggerEntered |
Event for trigger enter. More... | |
System.EventHandler< CharacterEventArgs > | TriggerExited |
Event for trigger leave. More... | |
Proximity trigger acts similar to a trigger in Unity but is more easily hooked in to the platformer system.
|
protectedvirtual |
Checks for characters in range.
|
protectedvirtual |
Initialise the sensor.
Reimplemented from PlatformerPro.PersistableObject.
|
protected |
Characters in proximity.
|
protected |
Characters in proximity.
float PlatformerPro.ProximityTrigger.radius |
The proximity radius.