Feel
5.1
The best way to improve your game's feel and make it extra juicy
|
A simple class controlling the hero character in the Barbarians demo scene It simulates a very simple character controller in an ARPG game More...
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 |
A simple class controlling the hero character in the Barbarians demo scene It simulates a very simple character controller in an ARPG game
|
protectedvirtual |
Finds targets around the Barbarian and stores them
|
protectedvirtual |
Performs an attack if possible, otherwise plays a denied feedback
|
protectedvirtual |
A coroutine used to move to each stored target to attack them
|
protectedvirtual |
On Awake we store our initial position
|
protectedvirtual |
Detects input
|
protectedvirtual |
Makes the character look at the target it's attacking
|
protectedvirtual |
When we collide with an enemy, we apply damage to it
other |
|
protectedvirtual |
On Update we look for input
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
MMTween.MMTweenCurve MoreMountains.Feel.Barbarian.AttackCurve = MMTween.MMTweenCurve.EaseInOutOverhead |
a curve on which to move the character when it attacks
float MoreMountains.Feel.Barbarian.AttackDuration = 2.5f |
the duration of the attack in seconds
MMFeedbacks MoreMountains.Feel.Barbarian.AttackFeedback |
a feedback to call when the attack starts
float MoreMountains.Feel.Barbarian.AttackPositionOffset = 0.3f |
an offset at which to attack enemies
float MoreMountains.Feel.Barbarian.CooldownDuration = 0.1f |
a duration, in seconds, between two attacks, during which attacks are prevented
MMFeedbacks MoreMountains.Feel.Barbarian.DeniedFeedback |
a feedback to call when trying to attack while in cooldown
MMFeedbacks MoreMountains.Feel.Barbarian.IndividualAttackFeedback |
a feedback to call when each individual attack phase starts
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)