Feel  5.1
The best way to improve your game's feel and make it extra juicy
MoreMountains.Feel.Barbarian Class Reference

A simple class controlling the hero character in the Barbarians demo scene It simulates a very simple character controller in an ARPG game More...

Inheritance diagram for MoreMountains.Feel.Barbarian:

Public Attributes

float CooldownDuration = 0.1f
 a duration, in seconds, between two attacks, during which attacks are prevented More...
 
MMFeedbacks AttackFeedback
 a feedback to call when the attack starts More...
 
MMFeedbacks IndividualAttackFeedback
 a feedback to call when each individual attack phase starts More...
 
MMFeedbacks DeniedFeedback
 a feedback to call when trying to attack while in cooldown More...
 
MMTween.MMTweenCurve AttackCurve = MMTween.MMTweenCurve.EaseInOutOverhead
 a curve on which to move the character when it attacks More...
 
float AttackDuration = 2.5f
 the duration of the attack in seconds More...
 
float AttackPositionOffset = 0.3f
 an offset at which to attack enemies More...
 
float IntervalDecrement = 0.1f
 a duration by which to reduce movement duration after every attack (making each attack faster than the previous one) More...
 

Protected Member Functions

virtual void Awake ()
 On Awake we store our initial position More...
 
virtual void Update ()
 On Update we look for input More...
 
virtual void LookAtTarget ()
 Makes the character look at the target it's attacking More...
 
virtual void HandleInput ()
 Detects input More...
 
virtual void Attack ()
 Performs an attack if possible, otherwise plays a denied feedback More...
 
virtual void AcquireTargets ()
 Finds targets around the Barbarian and stores them More...
 
virtual IEnumerator AttackCoroutine ()
 A coroutine used to move to each stored target to attack them More...
 
virtual void OnTriggerEnter (Collider other)
 When we collide with an enemy, we apply damage to it More...
 

Protected Attributes

List< Vector3 > _targets
 
float _lastAttackStartedAt = -100f
 
Vector3 _initialPosition
 
Vector3 _initialLookAtTarget
 
Vector3 _lookAtTarget
 
BarbarianEnemy _enemy
 

Detailed Description

A simple class controlling the hero character in the Barbarians demo scene It simulates a very simple character controller in an ARPG game

Member Function Documentation

◆ AcquireTargets()

virtual void MoreMountains.Feel.Barbarian.AcquireTargets ( )
protectedvirtual

Finds targets around the Barbarian and stores them

◆ Attack()

virtual void MoreMountains.Feel.Barbarian.Attack ( )
protectedvirtual

Performs an attack if possible, otherwise plays a denied feedback

◆ AttackCoroutine()

virtual IEnumerator MoreMountains.Feel.Barbarian.AttackCoroutine ( )
protectedvirtual

A coroutine used to move to each stored target to attack them

Returns

◆ Awake()

virtual void MoreMountains.Feel.Barbarian.Awake ( )
protectedvirtual

On Awake we store our initial position

◆ HandleInput()

virtual void MoreMountains.Feel.Barbarian.HandleInput ( )
protectedvirtual

Detects input

◆ LookAtTarget()

virtual void MoreMountains.Feel.Barbarian.LookAtTarget ( )
protectedvirtual

Makes the character look at the target it's attacking

◆ OnTriggerEnter()

virtual void MoreMountains.Feel.Barbarian.OnTriggerEnter ( Collider  other)
protectedvirtual

When we collide with an enemy, we apply damage to it

Parameters
other

◆ Update()

virtual void MoreMountains.Feel.Barbarian.Update ( )
protectedvirtual

On Update we look for input

Member Data Documentation

◆ _enemy

BarbarianEnemy MoreMountains.Feel.Barbarian._enemy
protected

◆ _initialLookAtTarget

Vector3 MoreMountains.Feel.Barbarian._initialLookAtTarget
protected

◆ _initialPosition

Vector3 MoreMountains.Feel.Barbarian._initialPosition
protected

◆ _lastAttackStartedAt

float MoreMountains.Feel.Barbarian._lastAttackStartedAt = -100f
protected

◆ _lookAtTarget

Vector3 MoreMountains.Feel.Barbarian._lookAtTarget
protected

◆ _targets

List<Vector3> MoreMountains.Feel.Barbarian._targets
protected

◆ AttackCurve

MMTween.MMTweenCurve MoreMountains.Feel.Barbarian.AttackCurve = MMTween.MMTweenCurve.EaseInOutOverhead

a curve on which to move the character when it attacks

◆ AttackDuration

float MoreMountains.Feel.Barbarian.AttackDuration = 2.5f

the duration of the attack in seconds

◆ AttackFeedback

MMFeedbacks MoreMountains.Feel.Barbarian.AttackFeedback

a feedback to call when the attack starts

◆ AttackPositionOffset

float MoreMountains.Feel.Barbarian.AttackPositionOffset = 0.3f

an offset at which to attack enemies

◆ CooldownDuration

float MoreMountains.Feel.Barbarian.CooldownDuration = 0.1f

a duration, in seconds, between two attacks, during which attacks are prevented

◆ DeniedFeedback

MMFeedbacks MoreMountains.Feel.Barbarian.DeniedFeedback

a feedback to call when trying to attack while in cooldown

◆ IndividualAttackFeedback

MMFeedbacks MoreMountains.Feel.Barbarian.IndividualAttackFeedback

a feedback to call when each individual attack phase starts

◆ IntervalDecrement

float MoreMountains.Feel.Barbarian.IntervalDecrement = 0.1f

a duration by which to reduce movement duration after every attack (making each attack faster than the previous one)


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