Loading...
Searching...
No Matches
AdventureSouls.SoulsAttackAction Class Reference

Detailed Description

action for basic melee attacks that may combo into additional hits
in addition to START/END there are messages to control whether the weapon damage shoud be active(DMG_ON/DMG_OFF)
the COMBO message should be sent when the animation is ready to transition into another attack

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

Inheritance diagram for AdventureSouls.SoulsAttackAction:
AdventureCore.ControllerActionBase AdventureCore.CharacterActionBase AdventureCore.IPlayAnimation AdventureCore.ICharacterAssociator

Public Types

enum  AttackType {
  PunchLight = 0 , PunchHeavy = 1 , SwordLight = 10 , SwordHeavy = 11 ,
  TwoHand = 110
}
 
- Public Types inherited from AdventureCore.CharacterActionBase
enum  CharacterActionInputType { Perform = 0 , PerformCancel = 1 , Start = 10 , StartCancel = 11 }
 

Public Member Functions

override void InputClick (CharacterActorBase actor)
 
override bool CanStart (CharacterActorBase actor)
 
override void OnStart (CharacterActorBase actor, bool jumpStart=false)
 
override bool CanEnd (CharacterActionBase next)
 
override void OnEnd (CharacterActionBase next)
 
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 InputDown (CharacterActorBase actor)
 
virtual void InputUp (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 (bool parameter)
 
virtual void OnInput (int parameter)
 
virtual void OnInput (Vector2 parameter)
 
virtual string GetName ()
 

Public Attributes

SoulsWeapon Weapon
 
AttackType Type
 
ResourceQuantity Cost
 
float[] Modifiers = new float[] { 1 }
 
bool IsLeft
 
bool CanCritical
 
- Public Attributes inherited from AdventureCore.ControllerActionBase
PlayableAnimationParameters Controller
 
- Public Attributes inherited from AdventureCore.CharacterActionBase
CharacterInstructionBase[] Instructions
 
CharacterActorBase Owner
 
CharacterActionInputType InputType
 
CharacterActionBase Next
 
UnityEvent< string > MessageReceived
 
MessageEvent[] MessageEvents
 
UnityEvent Starting
 
UnityEvent Ending
 

Static Public Attributes

static int ATTACK_HASH = Animator.StringToHash("Attack")
 
static int ATTACK_LEFT_HASH = Animator.StringToHash("AttackLeft")
 
static int ATTACK_TYPE_HASH = Animator.StringToHash("AttackType")
 
static int ATTACK_COMBO_HASH = Animator.StringToHash("AttackCombo")
 

Protected Member Functions

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

Properties

bool HasCost [get]
 
bool CanCombo [get]
 
- Properties inherited from AdventureCore.ControllerActionBase
PlayableAnimation Animation [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
- Properties inherited from AdventureCore.IPlayAnimation

Additional Inherited Members

- Protected Attributes inherited from AdventureCore.ControllerActionBase
PlayableAnimation _animation
 
- 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 AdventureSouls.SoulsAttackAction.CanEnd ( CharacterActionBase next)
inlinevirtual

Reimplemented from AdventureCore.CharacterActionBase.

◆ CanStart()

override bool AdventureSouls.SoulsAttackAction.CanStart ( CharacterActorBase actor)
inlinevirtual

Reimplemented from AdventureCore.CharacterActionBase.

◆ createAnimation()

override void AdventureSouls.SoulsAttackAction.createAnimation ( )
inlineprotectedvirtual

◆ endAnimation()

override void AdventureSouls.SoulsAttackAction.endAnimation ( CharacterActionBase next)
inlineprotectedvirtual

◆ InputClick()

override void AdventureSouls.SoulsAttackAction.InputClick ( CharacterActorBase actor)
inlinevirtual

Reimplemented from AdventureCore.CharacterActionBase.

◆ OnEnd()

override void AdventureSouls.SoulsAttackAction.OnEnd ( CharacterActionBase next)
inlinevirtual

◆ OnMessage()

override void AdventureSouls.SoulsAttackAction.OnMessage ( string parameter)
inlinevirtual

Reimplemented from AdventureCore.CharacterActionBase.

◆ OnStart()

override void AdventureSouls.SoulsAttackAction.OnStart ( CharacterActorBase actor,
bool jumpStart = false )
inlinevirtual