TopDown Engine
v4.1
|
A simple class, meant to be extended, that will handle all the mechanics of a pickable thing : feedbacks, collision, pick consequences, etc More...
Public Member Functions | |
virtual void | OnTriggerEnter (Collider collider) |
Triggered when something collides with the coin More... | |
virtual void | OnTriggerEnter2D (Collider2D collider) |
Triggered when something collides with the coin More... | |
virtual void | PickItem (GameObject picker) |
Check if the item is pickable and if yes, proceeds with triggering the effects and disabling the object More... | |
Public Attributes | |
MMFeedbacks | PickedMMFeedbacks |
A feedback to play when the object gets picked. More... | |
bool | DisableColliderOnPick = false |
if this is true, the picker's collider will be disabled on pick More... | |
bool | DisableObjectOnPick = true |
if this is set to true, the object will be disabled when picked More... | |
float | DisableDelay = 0f |
the duration (in seconds) after which to disable the object, instant if 0 More... | |
bool | DisableModelOnPick = false |
if this is set to true, the object will be disabled when picked More... | |
bool | DisableTargetObjectOnPick = false |
if this is set to true, the target object will be disabled when picked More... | |
GameObject | TargetObjectToDisable |
the object to disable on pick if DisableTargetObjectOnPick is true More... | |
float | TargetObjectDisableDelay = 1f |
the time in seconds before disabling the target if DisableTargetObjectOnPick is true More... | |
GameObject | Model |
the visual representation of this picker More... | |
bool | RequireCharacterComponent = true |
if this is true, this pickable item will only be pickable by objects with a Character component More... | |
bool | RequirePlayerType = true |
if this is true, this pickable item will only be pickable by objects with a Character component of type player More... | |
Protected Member Functions | |
virtual void | Start () |
virtual IEnumerator | DisableTargetObjectCoroutine () |
virtual IEnumerator | DisablePickerCoroutine () |
virtual bool | CheckIfPickable () |
Checks if the object is pickable. More... | |
virtual void | Effects () |
Triggers the various pick effects More... | |
virtual void | Pick (GameObject picker) |
Override this to describe what happens when the object gets picked More... | |
Protected Attributes | |
Collider | _collider |
Collider2D | _collider2D |
GameObject | _collidingObject |
Character | _character = null |
bool | _pickable = false |
ItemPicker | _itemPicker = null |
WaitForSeconds | _disableDelay |
A simple class, meant to be extended, that will handle all the mechanics of a pickable thing : feedbacks, collision, pick consequences, etc
|
protectedvirtual |
Checks if the object is pickable.
true
, if if pickable was checked, false
otherwise.Reimplemented in MoreMountains.TopDownEngine.PickableWeapon, MoreMountains.TopDownEngine.PickableAbility, and MoreMountains.TopDownEngine.PickableDash2D.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Triggers the various pick effects
|
virtual |
Triggered when something collides with the coin
collider | Other. |
|
virtual |
Triggered when something collides with the coin
collider | Other. |
|
protectedvirtual |
Override this to describe what happens when the object gets picked
Reimplemented in MoreMountains.TopDownEngine.PickableAbility, MoreMountains.TopDownEngine.PickableDamageResistance, MoreMountains.TopDownEngine.PickableDash2D, MoreMountains.TopDownEngine.DamageOverTimeInterrupter, MoreMountains.TopDownEngine.PickableWeapon, MoreMountains.TopDownEngine.Stimpack, MoreMountains.TopDownEngine.ExplodudesBombPicker, MoreMountains.TopDownEngine.Star, MoreMountains.TopDownEngine.PickableAction, and MoreMountains.TopDownEngine.Coin.
|
virtual |
Check if the item is pickable and if yes, proceeds with triggering the effects and disabling the object
|
protectedvirtual |
Reimplemented in MoreMountains.TopDownEngine.DeadlineStar.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
bool MoreMountains.TopDownEngine.PickableItem.DisableColliderOnPick = false |
if this is true, the picker's collider will be disabled on pick
float MoreMountains.TopDownEngine.PickableItem.DisableDelay = 0f |
the duration (in seconds) after which to disable the object, instant if 0
bool MoreMountains.TopDownEngine.PickableItem.DisableModelOnPick = false |
if this is set to true, the object will be disabled when picked
bool MoreMountains.TopDownEngine.PickableItem.DisableObjectOnPick = true |
if this is set to true, the object will be disabled when picked
bool MoreMountains.TopDownEngine.PickableItem.DisableTargetObjectOnPick = false |
if this is set to true, the target object will be disabled when picked
GameObject MoreMountains.TopDownEngine.PickableItem.Model |
the visual representation of this picker
MMFeedbacks MoreMountains.TopDownEngine.PickableItem.PickedMMFeedbacks |
A feedback to play when the object gets picked.
bool MoreMountains.TopDownEngine.PickableItem.RequireCharacterComponent = true |
if this is true, this pickable item will only be pickable by objects with a Character component
bool MoreMountains.TopDownEngine.PickableItem.RequirePlayerType = true |
if this is true, this pickable item will only be pickable by objects with a Character component of type player
float MoreMountains.TopDownEngine.PickableItem.TargetObjectDisableDelay = 1f |
the time in seconds before disabling the target if DisableTargetObjectOnPick is true
GameObject MoreMountains.TopDownEngine.PickableItem.TargetObjectToDisable |
the object to disable on pick if DisableTargetObjectOnPick is true