Loading...
Searching...
No Matches
AdventureHero.HeroCarryAction Class Reference

Detailed Description

action for carrying and subsequently throwing objects
the configured rigidbody is changed to isKinematic and parented to the ItemParentOverhead set on the player character
when it is thrown the rigidbody is unparented and pushed

https://adventure.softleitner.com/manual/acting

Inheritance diagram for AdventureHero.HeroCarryAction:
AdventureCore.CharacterActionBase AdventureCore.ICharacterAssociator

Public Member Functions

override string GetName ()
 
override void OnStart (CharacterActorBase actor, bool jumpStart=false)
 
override bool CanEnd (CharacterActionBase next)
 
override void OnEnd (CharacterActionBase next)
 
override void OnInput (bool parameter)
 
override void OnMessage (string parameter)
 
- Public Member Functions inherited from AdventureCore.CharacterActionBase
void BindInput (InputAction inputAction)
 
void UnbindInput (InputAction inputAction)
 
virtual void Input (InputAction.CallbackContext callbackContext)
 
virtual void Input (InputAction.CallbackContext callbackContext, CharacterActorBase actor)
 
virtual void InputClick (CharacterActorBase actor)
 
virtual void InputDown (CharacterActorBase actor)
 
virtual void InputUp (CharacterActorBase actor)
 
virtual bool CanStart (CharacterActorBase actor)
 
bool StartAction (bool jumpStart=false, bool force=false)
 
virtual bool StartAction (CharacterActorBase actor, bool jumpStart=false, bool force=false)
 
virtual void EndAction ()
 
virtual void AddAction (CharacterActorBase actor)
 
virtual void RemoveAction (CharacterActorBase actor)
 
virtual void SendCharacterMessages (string e)
 
virtual void SendCharacterMessage (string e)
 
virtual void MoveCharacter (Transform transform)
 
virtual void OnInput (int parameter)
 
virtual void OnInput (Vector2 parameter)
 

Public Attributes

Rigidbody Rigidbody
 
float PowerForward = 10
 
float PowerUp = 10
 
bool PutAllowed
 
float PutDistance = 0.65f
 
PlayableAnimationParameters Hold
 
PlayableAnimationParameters Pick
 
PlayableAnimationParameters Put
 
PlayableAnimationParameters Throw
 
- Public Attributes inherited from AdventureCore.CharacterActionBase
CharacterInstructionBase[] Instructions
 
CharacterActorBase Owner
 
CharacterActionInputType InputType
 
CharacterActionBase Next
 
UnityEvent< string > MessageReceived
 
MessageEvent[] MessageEvents
 
UnityEvent Starting
 
UnityEvent Ending
 

Protected Member Functions

override void OnDestroy ()
 
- Protected Member Functions inherited from AdventureCore.CharacterActionBase
virtual void OnEnable ()
 
virtual void OnDisable ()
 
virtual void setTrigger (int id)
 
virtual void setBool (int id, bool value)
 
virtual void setInt (int id, int value)
 
virtual void setFloat (int id, float value)
 
virtual void setState (int id)
 
void onCanStartChanged ()
 
void onCanEndChanged ()
 
void addInstructions (IEnumerable< CharacterInstructionBase > instructions)
 
void removeInstructions (IEnumerable< CharacterInstructionBase > instructions)
 
void addInstruction (CharacterInstructionBase instruction)
 
void removeInstruction (CharacterInstructionBase instruction)
 

Properties

bool IsPutting [get]
 
- Properties inherited from AdventureCore.CharacterActionBase
CharacterActorBase Actor [get]
 
CharacterBase AssociatedCharacter [get]
 character that owns or is otherwise associted with the object
 
virtual bool IsAvailable [get, set]
 IsAvailable asserts whether an action is availabel at all, even if it can't be started.
 
virtual bool IsHappening [get]
 whether the action is currently being executed
 
virtual bool IsHappeningWithNext [get]
 
- Properties inherited from AdventureCore.ICharacterAssociator

Additional Inherited Members

- Public Types inherited from AdventureCore.CharacterActionBase
enum  CharacterActionInputType { Perform = 0 , PerformCancel = 1 , Start = 10 , StartCancel = 11 }
 
- Protected Attributes inherited from AdventureCore.CharacterActionBase
bool _isDestroyed = false
 
- Events inherited from AdventureCore.CharacterActionBase
Action< bool > IsAvailableChanged
 IsAvailable asserts whether an action is availabel at all, even if it can't be started.
 
Action< bool > IsHappeningChanged
 fired when the action starts and ends
 
Action< CharacterActionBaseCanStartChanged
 fired when whether the action can be started changes
 
Action< CharacterActionBaseCanEndChanged
 fired when whether the action can be ended changes
some actions can be ended before they end on their own(released motions for example)
 

Member Function Documentation

◆ CanEnd()

override bool AdventureHero.HeroCarryAction.CanEnd ( CharacterActionBase next)
virtual

Reimplemented from AdventureCore.CharacterActionBase.

◆ GetName()

override string AdventureHero.HeroCarryAction.GetName ( )
inlinevirtual

Reimplemented from AdventureCore.CharacterActionBase.

◆ OnDestroy()

override void AdventureHero.HeroCarryAction.OnDestroy ( )
inlineprotectedvirtual

Reimplemented from AdventureCore.CharacterActionBase.

◆ OnEnd()

override void AdventureHero.HeroCarryAction.OnEnd ( CharacterActionBase next)
inlinevirtual

Reimplemented from AdventureCore.CharacterActionBase.

◆ OnInput()

override void AdventureHero.HeroCarryAction.OnInput ( bool parameter)
inlinevirtual

Reimplemented from AdventureCore.CharacterActionBase.

◆ OnMessage()

override void AdventureHero.HeroCarryAction.OnMessage ( string parameter)
inlinevirtual

Reimplemented from AdventureCore.CharacterActionBase.

◆ OnStart()

override void AdventureHero.HeroCarryAction.OnStart ( CharacterActorBase actor,
bool jumpStart = false )
inlinevirtual

Reimplemented from AdventureCore.CharacterActionBase.