Corgi Engine  v9.1
MoreMountains.CorgiEngine.PickableItem Class Reference

Coin manager More...

Inheritance diagram for MoreMountains.CorgiEngine.PickableItem:
MoreMountains.CorgiEngine.CorgiMonoBehaviour MoreMountains.CorgiEngine.Coin MoreMountains.CorgiEngine.DamageOverTimeInterrupter MoreMountains.CorgiEngine.Mushroom MoreMountains.CorgiEngine.PickableAbility MoreMountains.CorgiEngine.PickableAction MoreMountains.CorgiEngine.PickableDamageResistance MoreMountains.CorgiEngine.PickableJetpack MoreMountains.CorgiEngine.PickableOneUp MoreMountains.CorgiEngine.PickableWeapon MoreMountains.CorgiEngine.Star MoreMountains.CorgiEngine.Stimpack MoreMountains.CorgiEngine.TimeModifier

Public Member Functions

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 PickFeedbacks
 the MMFeedback to play when the item gets picked More...
 
bool DisableObjectOnPick = true
 if this is set to true, the object will be disabled when picked More...
 
bool DisableRendererOnPick = false
 if this is true, disable the object's renderer on pick More...
 
bool DisableColliderOnPick = false
 if this is true, disable the object's collider on pick 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...
 

Protected Member Functions

virtual void Start ()
 On Start we grab and store our components More...
 
virtual IEnumerator DisableTargetObjectCoroutine ()
 
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

Collider2D _collider
 
Collider2D _pickingCollider
 
Renderer _renderer
 
Character _character = null
 
bool _pickable = false
 
ItemPicker _itemPicker = null
 
GameObject _collidingObject
 
AutoRespawn _autoRespawn
 

Detailed Description

Coin manager

Member Function Documentation

◆ CheckIfPickable()

virtual bool MoreMountains.CorgiEngine.PickableItem.CheckIfPickable ( )
protectedvirtual

Checks if the object is pickable.

Returns
true, if if pickable was checked, false otherwise.

Reimplemented in MoreMountains.CorgiEngine.PickableWeapon, MoreMountains.CorgiEngine.PickableAbility, MoreMountains.CorgiEngine.PickableJetpack, and MoreMountains.CorgiEngine.Mushroom.

◆ DisableTargetObjectCoroutine()

virtual IEnumerator MoreMountains.CorgiEngine.PickableItem.DisableTargetObjectCoroutine ( )
protectedvirtual

◆ Effects()

virtual void MoreMountains.CorgiEngine.PickableItem.Effects ( )
protectedvirtual

Triggers the various pick effects

◆ OnTriggerEnter2D()

virtual void MoreMountains.CorgiEngine.PickableItem.OnTriggerEnter2D ( Collider2D  collider)
virtual

Triggered when something collides with the coin

Parameters
colliderOther.

◆ Pick()

◆ PickItem()

virtual void MoreMountains.CorgiEngine.PickableItem.PickItem ( GameObject  picker)
virtual

Check if the item is pickable and if yes, proceeds with triggering the effects and disabling the object

◆ Start()

virtual void MoreMountains.CorgiEngine.PickableItem.Start ( )
protectedvirtual

On Start we grab and store our components

Reimplemented in MoreMountains.CorgiEngine.RetroStar.

Member Data Documentation

◆ _autoRespawn

AutoRespawn MoreMountains.CorgiEngine.PickableItem._autoRespawn
protected

◆ _character

Character MoreMountains.CorgiEngine.PickableItem._character = null
protected

◆ _collider

Collider2D MoreMountains.CorgiEngine.PickableItem._collider
protected

◆ _collidingObject

GameObject MoreMountains.CorgiEngine.PickableItem._collidingObject
protected

◆ _itemPicker

ItemPicker MoreMountains.CorgiEngine.PickableItem._itemPicker = null
protected

◆ _pickable

bool MoreMountains.CorgiEngine.PickableItem._pickable = false
protected

◆ _pickingCollider

Collider2D MoreMountains.CorgiEngine.PickableItem._pickingCollider
protected

◆ _renderer

Renderer MoreMountains.CorgiEngine.PickableItem._renderer
protected

◆ DisableColliderOnPick

bool MoreMountains.CorgiEngine.PickableItem.DisableColliderOnPick = false

if this is true, disable the object's collider on pick

◆ DisableObjectOnPick

bool MoreMountains.CorgiEngine.PickableItem.DisableObjectOnPick = true

if this is set to true, the object will be disabled when picked

◆ DisableRendererOnPick

bool MoreMountains.CorgiEngine.PickableItem.DisableRendererOnPick = false

if this is true, disable the object's renderer on pick

◆ DisableTargetObjectOnPick

bool MoreMountains.CorgiEngine.PickableItem.DisableTargetObjectOnPick = false

if this is set to true, the target object will be disabled when picked

◆ PickFeedbacks

MMFeedbacks MoreMountains.CorgiEngine.PickableItem.PickFeedbacks

the MMFeedback to play when the item gets picked

◆ TargetObjectDisableDelay

float MoreMountains.CorgiEngine.PickableItem.TargetObjectDisableDelay = 1f

the time in seconds before disabling the target if DisableTargetObjectOnPick is true

◆ TargetObjectToDisable

GameObject MoreMountains.CorgiEngine.PickableItem.TargetObjectToDisable

the object to disable on pick if DisableTargetObjectOnPick is true


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