TopDown Engine v4.5
Loading...
Searching...
No Matches
MoreMountains.TopDownEngine.PickableDamageResistance Class Reference

Use this picker to create a new resistance on the character that picks it, or to enable/disable an existing one. More...

Inheritance diagram for MoreMountains.TopDownEngine.PickableDamageResistance:
MoreMountains.TopDownEngine.PickableItem MoreMountains.TopDownEngine.TopDownMonoBehaviour MoreMountains.Tools.MMMonoBehaviour

Public Types

enum  Modes { Create , ActivateByLabel , DisableByLabel }

Public Attributes

Modes Mode = Modes.ActivateByLabel
 The chosen mode to interact with resistance, either creating one, activating one or disabling one.
string TargetLabel = "SomeResistance"
 If activating or disabling by label, the exact label of the target resistance.
string NewResistanceNodeName = "NewResistance"
 in create mode, the name of the new game object to create to host the new resistance
DamageResistance DamageResistanceToGive
 in create mode, a DamageResistance to copy and give to the new node. Usually you'll want to create a new DamageResistance component on your picker, and drag it in this slot
bool OnlyForPlayerCharacter = true
 if this is true, only player characters can pick this up
Public Attributes inherited from MoreMountains.TopDownEngine.PickableItem
MMFeedbacks PickedMMFeedbacks
 A feedback to play when the object gets picked.
bool DisableColliderOnPick = false
 if this is true, the picker's collider will be disabled on pick
bool DisableObjectOnPick = true
 if this is set to true, the object will be disabled when picked
float DisableDelay = 0f
 the duration (in seconds) after which to disable the object, instant if 0
bool DisableModelOnPick = false
 if this is set to true, the object will be disabled when picked
bool DisableTargetObjectOnPick = false
 if this is set to true, the target object will be disabled when picked
GameObject TargetObjectToDisable
 the object to disable on pick if DisableTargetObjectOnPick is true
float TargetObjectDisableDelay = 1f
 the time in seconds before disabling the target if DisableTargetObjectOnPick is true
GameObject Model
 the visual representation of this picker
bool RequireCharacterComponent = true
 if this is true, this pickable item will only be pickable by objects with a Character component
bool RequirePlayerType = true
 if this is true, this pickable item will only be pickable by objects with a Character component of type player

Protected Member Functions

override void Pick (GameObject picker)
 Triggered when something collides with the stimpack.
Protected Member Functions inherited from MoreMountains.TopDownEngine.PickableItem
virtual void Start ()
virtual IEnumerator DisableTargetObjectCoroutine ()
virtual IEnumerator DisablePickerCoroutine ()
virtual bool CheckIfPickable ()
 Checks if the object is pickable.
virtual void Effects ()
 Triggers the various pick effects.

Additional Inherited Members

Public Member Functions inherited from MoreMountains.TopDownEngine.PickableItem
virtual void OnTriggerEnter (Collider collider)
 Triggered when something collides with the coin.
virtual void OnTriggerEnter2D (Collider2D collider)
 Triggered when something collides with the coin.
virtual void PickItem (GameObject picker)
 Check if the item is pickable and if yes, proceeds with triggering the effects and disabling the object.
Protected Attributes inherited from MoreMountains.TopDownEngine.PickableItem
Collider _collider
Collider2D _collider2D
GameObject _collidingObject
Character _character = null
bool _pickable = false
ItemPicker _itemPicker = null
WaitForSeconds _disableDelay

Detailed Description

Use this picker to create a new resistance on the character that picks it, or to enable/disable an existing one.

Member Enumeration Documentation

◆ Modes

Enumerator
Create 
ActivateByLabel 
DisableByLabel 

Member Function Documentation

◆ Pick()

override void MoreMountains.TopDownEngine.PickableDamageResistance.Pick ( GameObject picker)
protectedvirtual

Triggered when something collides with the stimpack.

Parameters
colliderOther.

Reimplemented from MoreMountains.TopDownEngine.PickableItem.

Member Data Documentation

◆ DamageResistanceToGive

DamageResistance MoreMountains.TopDownEngine.PickableDamageResistance.DamageResistanceToGive

in create mode, a DamageResistance to copy and give to the new node. Usually you'll want to create a new DamageResistance component on your picker, and drag it in this slot

◆ Mode

Modes MoreMountains.TopDownEngine.PickableDamageResistance.Mode = Modes.ActivateByLabel

The chosen mode to interact with resistance, either creating one, activating one or disabling one.

◆ NewResistanceNodeName

string MoreMountains.TopDownEngine.PickableDamageResistance.NewResistanceNodeName = "NewResistance"

in create mode, the name of the new game object to create to host the new resistance

◆ OnlyForPlayerCharacter

bool MoreMountains.TopDownEngine.PickableDamageResistance.OnlyForPlayerCharacter = true

if this is true, only player characters can pick this up

◆ TargetLabel

string MoreMountains.TopDownEngine.PickableDamageResistance.TargetLabel = "SomeResistance"

If activating or disabling by label, the exact label of the target resistance.


The documentation for this class was generated from the following file: