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

Add this to an item to make it modify time when it gets picked up by a Character More...

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

Public Attributes

float TimeSpeed = 0.5f
 the time speed to apply while the effect lasts More...
 
float Duration = 1.0f
 how long the duration will last, in seconds More...
 
- 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 void Pick (GameObject picker)
 Triggered when something collides with the TimeModifier More...
 
virtual IEnumerator ChangeTime ()
 Asks the Game Manager to change the time scale for a specified duration. 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 bool CheckIfPickable ()
 Checks if the object is pickable. More...
 
virtual void Effects ()
 Triggers the various pick effects More...
 

Protected Attributes

WaitForSeconds _changeTimeWFS
 
- 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
 

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...
 

Detailed Description

Add this to an item to make it modify time when it gets picked up by a Character

Member Function Documentation

◆ ChangeTime()

virtual IEnumerator MoreMountains.CorgiEngine.TimeModifier.ChangeTime ( )
protectedvirtual

Asks the Game Manager to change the time scale for a specified duration.

Returns
The time.

◆ Pick()

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

Triggered when something collides with the TimeModifier

Parameters
colliderThe object that collide with the TimeModifier

Reimplemented from MoreMountains.CorgiEngine.PickableItem.

Member Data Documentation

◆ _changeTimeWFS

WaitForSeconds MoreMountains.CorgiEngine.TimeModifier._changeTimeWFS
protected

◆ Duration

float MoreMountains.CorgiEngine.TimeModifier.Duration = 1.0f

how long the duration will last, in seconds

◆ TimeSpeed

float MoreMountains.CorgiEngine.TimeModifier.TimeSpeed = 0.5f

the time speed to apply while the effect lasts


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