TopDown Engine  v3.6
MoreMountains.TopDownEngine.PickableWeapon Class Reference

Add this class to a collectible to have the player change weapon when collecting it More...

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

Public Attributes

Weapon WeaponToGive
 the new weapon the player gets when collecting this object More...
 
int HandleWeaponID = 1
 the ID of the CharacterHandleWeapon ability you want this weapon to go to (1 by default) More...
 
- Public Attributes inherited from MoreMountains.TopDownEngine.PickableItem
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

override void Pick (GameObject picker)
 What happens when the weapon gets picked More...
 
override bool CheckIfPickable ()
 Checks if the object is pickable. More...
 
- Protected Member Functions inherited from MoreMountains.TopDownEngine.PickableItem
virtual void Start ()
 
virtual IEnumerator DisableTargetObjectCoroutine ()
 
virtual IEnumerator DisablePickerCoroutine ()
 
virtual void Effects ()
 Triggers the various pick effects More...
 

Protected Attributes

CharacterHandleWeapon _characterHandleWeapon
 
- Protected Attributes inherited from MoreMountains.TopDownEngine.PickableItem
Collider _collider
 
Collider2D _collider2D
 
GameObject _collidingObject
 
Character _character = null
 
bool _pickable = false
 
ItemPicker _itemPicker = null
 
WaitForSeconds _disableDelay
 

Additional Inherited Members

- Public Member Functions inherited from MoreMountains.TopDownEngine.PickableItem
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...
 

Detailed Description

Add this class to a collectible to have the player change weapon when collecting it

Member Function Documentation

◆ CheckIfPickable()

override bool MoreMountains.TopDownEngine.PickableWeapon.CheckIfPickable ( )
protectedvirtual

Checks if the object is pickable.

Returns
true

false

Reimplemented from MoreMountains.TopDownEngine.PickableItem.

◆ Pick()

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

What happens when the weapon gets picked

Reimplemented from MoreMountains.TopDownEngine.PickableItem.

Member Data Documentation

◆ _characterHandleWeapon

CharacterHandleWeapon MoreMountains.TopDownEngine.PickableWeapon._characterHandleWeapon
protected

◆ HandleWeaponID

int MoreMountains.TopDownEngine.PickableWeapon.HandleWeaponID = 1

the ID of the CharacterHandleWeapon ability you want this weapon to go to (1 by default)

◆ WeaponToGive

Weapon MoreMountains.TopDownEngine.PickableWeapon.WeaponToGive

the new weapon the player gets when collecting this object


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