A simple class controlling the hero character in the Barbarians demo scene It simulates a very simple character controller in an ARPG game.
More...
|
| virtual void | Awake () |
| | On Awake we store our initial position.
|
| virtual void | Update () |
| | On Update we look for input.
|
| virtual void | LookAtTarget () |
| | Makes the character look at the target it's attacking.
|
| virtual void | HandleInput () |
| | Detects input.
|
| virtual void | Attack () |
| | Performs an attack if possible, otherwise plays a denied feedback.
|
| virtual void | AcquireTargets () |
| | Finds targets around the Barbarian and stores them.
|
| virtual IEnumerator | AttackCoroutine () |
| | A coroutine used to move to each stored target to attack them.
|
| virtual void | OnTriggerEnter (Collider other) |
| | When we collide with an enemy, we apply damage to it.
|
A simple class controlling the hero character in the Barbarians demo scene It simulates a very simple character controller in an ARPG game.
◆ 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 |
◆ 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
-
◆ Update()
| virtual void MoreMountains.Feel.Barbarian.Update |
( |
| ) |
|
|
protectedvirtual |
On Update we look for input.
◆ _enemy
◆ _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:
- H:/Code/MoreMountains/feel/Assets/Feel/FeelDemos/Barbarians/Scripts/Barbarian.cs