platformer
Public Member Functions | Public Attributes | List of all members
UnityPlatformer.CharacterActionUseItem Class Reference

TODO We need some kind of debounce / Use delay More...

Inheritance diagram for UnityPlatformer.CharacterActionUseItem:
UnityPlatformer.CharacterAction

Public Member Functions

override int WantsToUpdate (float delta)
 On(Areas.Item) and item is usable by me and hit 'Use' action! More...
 
override void PerformAction (float delta)
 Use the item, all logic is in the Item.Use More...
 
override PostUpdateActions GetPostUpdateActions ()
 REVIEW do default actions. but maybe should do nothing... More...
 
- Public Member Functions inherited from UnityPlatformer.CharacterAction
void Reset ()
 Try to set character & input from parent nodes More...
 
virtual void OnEnable ()
 keep Character.actions in sync More...
 
virtual void OnDisable ()
 keep Character.actions in sync More...
 
virtual void GainControl (float delta)
 Called (once) when this action is going to be 'PerformAction' for first time More...
 
virtual void LoseControl (float delta)
 Called (once) when other action 'WantsToUpdate' or this action don't anymore More...
 

Public Attributes

Vector3 characterOffset = new Vector3(0, 0, 0)
 Offset position More...
 
string actionUse = "Use"
 Trigger input Action 'Use' More...
 
int priority = 30
 Action priority More...
 
- Public Attributes inherited from UnityPlatformer.CharacterAction
Character character
 Target character that will be affected by this movement More...
 
PlatformerInput input
 Input to listen More...
 
Action onGrainControl
 Callback when this movement WantsToUpdate and has highest priority. More...
 
Action onLoseControl
 Callback when this movement don't WantsToUpdate or another movement has higher priority More...
 

Detailed Description

TODO We need some kind of debounce / Use delay

Member Function Documentation

◆ GetPostUpdateActions()

override PostUpdateActions UnityPlatformer.CharacterActionUseItem.GetPostUpdateActions ( )
inlinevirtual

REVIEW do default actions. but maybe should do nothing...

Implements UnityPlatformer.CharacterAction.

◆ PerformAction()

override void UnityPlatformer.CharacterActionUseItem.PerformAction ( float  delta)
inlinevirtual

Use the item, all logic is in the Item.Use

Implements UnityPlatformer.CharacterAction.

◆ WantsToUpdate()

override int UnityPlatformer.CharacterActionUseItem.WantsToUpdate ( float  delta)
inlinevirtual

On(Areas.Item) and item is usable by me and hit 'Use' action!

Implements UnityPlatformer.CharacterAction.

Member Data Documentation

◆ actionUse

string UnityPlatformer.CharacterActionUseItem.actionUse = "Use"

Trigger input Action 'Use'

◆ characterOffset

Vector3 UnityPlatformer.CharacterActionUseItem.characterOffset = new Vector3(0, 0, 0)

Offset position

◆ priority

int UnityPlatformer.CharacterActionUseItem.priority = 30

Action priority


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