Corgi Engine  v8.8
MoreMountains.CorgiEngine.PickableAbility Class Reference

Add this class to an object with a trigger box collider 2D, and it'll become a pickable object, able to permit or forbid an ability on a Character More...

Inheritance diagram for MoreMountains.CorgiEngine.PickableAbility:
MoreMountains.CorgiEngine.PickableItem MoreMountains.CorgiEngine.CorgiMonoBehaviour

Public Types

enum  Methods { Methods.Permit, Methods.Forbid }
 

Public Attributes

Methods Method = Methods.Permit
 whether this object should permit or forbid an ability when picked More...
 
bool OnlyPickableByPlayerCharacters = true
 whether or not only characters of Player type should be able to pick this More...
 
string AbilityTypeAsString
 
- Public Attributes inherited from MoreMountains.CorgiEngine.PickableItem
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

override bool CheckIfPickable ()
 Checks if the object is pickable More...
 
override void Pick (GameObject picker)
 on pick, we permit or forbid our target ability More...
 
- Protected Member Functions inherited from MoreMountains.CorgiEngine.PickableItem
virtual void Start ()
 On Start we grab and store our components More...
 
virtual IEnumerator DisableTargetObjectCoroutine ()
 
virtual void Effects ()
 Triggers the various pick effects More...
 

Additional Inherited Members

- Public Member Functions inherited from MoreMountains.CorgiEngine.PickableItem
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...
 
- Protected Attributes inherited from MoreMountains.CorgiEngine.PickableItem
Collider2D _collider
 
Collider2D _pickingCollider
 
Renderer _renderer
 
Character _character = null
 
bool _pickable = false
 
ItemPicker _itemPicker = null
 
GameObject _collidingObject
 
AutoRespawn _autoRespawn
 

Detailed Description

Add this class to an object with a trigger box collider 2D, and it'll become a pickable object, able to permit or forbid an ability on a Character

Member Enumeration Documentation

◆ Methods

Enumerator
Permit 
Forbid 

Member Function Documentation

◆ CheckIfPickable()

override bool MoreMountains.CorgiEngine.PickableAbility.CheckIfPickable ( )
protectedvirtual

Checks if the object is pickable

Returns
true

false

Reimplemented from MoreMountains.CorgiEngine.PickableItem.

◆ Pick()

override void MoreMountains.CorgiEngine.PickableAbility.Pick ( GameObject  picker)
protectedvirtual

on pick, we permit or forbid our target ability

Reimplemented from MoreMountains.CorgiEngine.PickableItem.

Member Data Documentation

◆ AbilityTypeAsString

string MoreMountains.CorgiEngine.PickableAbility.AbilityTypeAsString

◆ Method

Methods MoreMountains.CorgiEngine.PickableAbility.Method = Methods.Permit

whether this object should permit or forbid an ability when picked

◆ OnlyPickableByPlayerCharacters

bool MoreMountains.CorgiEngine.PickableAbility.OnlyPickableByPlayerCharacters = true

whether or not only characters of Player type should be able to pick this


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