From 8511275238a6381ec57c9ab8ef8043591017a965 Mon Sep 17 00:00:00 2001
From: eheimburg <74330250+eheimburg@users.noreply.github.com>
Date: Mon, 12 Apr 2021 03:01:00 -0400
Subject: [PATCH 1/9] Animation-speed cleanup
- Moves character speed into the character class (removing the corresponding FIXME from code)
- Adds a "MovementStatus" field that replaces the concept of VisualMovementSpeed.
- Tweaked animator controller to allow for extra-fast movement (from not-yet-implemented buffs)
- Tweaked footstep sound player to not play footsteps for extra-fast movement (because they'd be wrong, and I think it's less distracting to just stop having footsteps than to have wrong ones)
This new enum lets the client explicitly choose how to render various status conditions, rather than having to guess what they are by comparing speed variables.
---
.../BossRoom/GameData/Character/Archer.asset | 4 +-
Assets/BossRoom/GameData/Character/Imp.asset | 4 +-
.../BossRoom/GameData/Character/ImpBoss.asset | 4 +-
Assets/BossRoom/GameData/Character/Mage.asset | 4 +-
.../BossRoom/GameData/Character/Rogue.asset | 4 +-
Assets/BossRoom/GameData/Character/Tank.asset | 4 +-
.../CharacterSetController.controller | 18 +++++-
.../AnimatorFootstepSounds.cs | 13 ++++-
.../Character/ClientCharacterVisualization.cs | 57 +++++++++++++++++--
.../Game/Character/ServerCharacterMovement.cs | 41 +++++++------
.../Scripts/Shared/Data/CharacterClass.cs | 3 +
.../Game/Entity/NetworkCharacterState.cs | 25 +++++---
12 files changed, 138 insertions(+), 43 deletions(-)
diff --git a/Assets/BossRoom/GameData/Character/Archer.asset b/Assets/BossRoom/GameData/Character/Archer.asset
index b3e7a5206..0e7524441 100644
--- a/Assets/BossRoom/GameData/Character/Archer.asset
+++ b/Assets/BossRoom/GameData/Character/Archer.asset
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:9d4d7ec7ca264f03a40adf999f85c2ecbbdedb6d0ecd6d0a318a394a5d53c8f9
-size 771
+oid sha256:46af12e5b6fa15272734ec6f61b68490cf226ab91879b1a59d0c76fcdd6254a7
+size 782
diff --git a/Assets/BossRoom/GameData/Character/Imp.asset b/Assets/BossRoom/GameData/Character/Imp.asset
index 961dd0cae..b554e9d7f 100644
--- a/Assets/BossRoom/GameData/Character/Imp.asset
+++ b/Assets/BossRoom/GameData/Character/Imp.asset
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:4cf85d7948e0beb1e127ac6fb9e4c79f52006abd35b72ea966b0893b84df80d6
-size 568
+oid sha256:320a6fd1653e534b4c85d9c8b4a55037adfc6c11f356d92253c051f888e671d5
+size 659
diff --git a/Assets/BossRoom/GameData/Character/ImpBoss.asset b/Assets/BossRoom/GameData/Character/ImpBoss.asset
index c00c4b8ce..c7e1f7076 100644
--- a/Assets/BossRoom/GameData/Character/ImpBoss.asset
+++ b/Assets/BossRoom/GameData/Character/ImpBoss.asset
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:5115383910bc58939afb6c6511d54420c89a0d076c3e313cc223dda03028ef1b
-size 655
+oid sha256:4fc71ffcb26824597f21af7610672dc907d791aedf1bae232d155f96c857dede
+size 666
diff --git a/Assets/BossRoom/GameData/Character/Mage.asset b/Assets/BossRoom/GameData/Character/Mage.asset
index 32a19acd5..ca4b43a71 100644
--- a/Assets/BossRoom/GameData/Character/Mage.asset
+++ b/Assets/BossRoom/GameData/Character/Mage.asset
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:93fd277259741aae4648e626b5c9a7fe397262f16658f575f98a11c50f20c9f7
-size 766
+oid sha256:eef86ade765d6f6732976451e436630c1a0aeae573ed6e8ed6c1f4d91dc46c95
+size 777
diff --git a/Assets/BossRoom/GameData/Character/Rogue.asset b/Assets/BossRoom/GameData/Character/Rogue.asset
index 6035a2f48..3b60b87a0 100644
--- a/Assets/BossRoom/GameData/Character/Rogue.asset
+++ b/Assets/BossRoom/GameData/Character/Rogue.asset
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:cb16159327d127834e574ac9e23ae2007879a21df32b92198507a45eae5d38c1
-size 768
+oid sha256:b9eadbb15568d6b1ddc7c135ca554e8fe6c847c1785e33fdb38b4e95d45c2984
+size 779
diff --git a/Assets/BossRoom/GameData/Character/Tank.asset b/Assets/BossRoom/GameData/Character/Tank.asset
index a6deeae6e..3b7419fc0 100644
--- a/Assets/BossRoom/GameData/Character/Tank.asset
+++ b/Assets/BossRoom/GameData/Character/Tank.asset
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:d41a727daf0d06ec7d4099ac2874884beecb419656320998837ed1026bffa156
-size 766
+oid sha256:899af2464725b90fb7e7ff4d6e668016d57dc5006ba8fec32db7e1ea0496b1e1
+size 777
diff --git a/Assets/BossRoom/Models/Animation Controllers/CharacterSetController.controller b/Assets/BossRoom/Models/Animation Controllers/CharacterSetController.controller
index a0057dbea..95b625c80 100644
--- a/Assets/BossRoom/Models/Animation Controllers/CharacterSetController.controller
+++ b/Assets/BossRoom/Models/Animation Controllers/CharacterSetController.controller
@@ -81,10 +81,26 @@ BlendTree:
m_CycleOffset: 0
m_DirectBlendParameter: Blend
m_Mirror: 0
+ - serializedVersion: 2
+ m_Motion: {fileID: 6200578666267062213, guid: 2115c4661f55eff45a5a0f91fc0a12f0, type: 3}
+ m_Threshold: 1.5
+ m_Position: {x: 0, y: 0}
+ m_TimeScale: 1.5
+ m_CycleOffset: 0
+ m_DirectBlendParameter: Speed
+ m_Mirror: 0
+ - serializedVersion: 2
+ m_Motion: {fileID: 6200578666267062213, guid: 2115c4661f55eff45a5a0f91fc0a12f0, type: 3}
+ m_Threshold: 2
+ m_Position: {x: 0, y: 0}
+ m_TimeScale: 2
+ m_CycleOffset: 0
+ m_DirectBlendParameter: Speed
+ m_Mirror: 0
m_BlendParameter: Speed
m_BlendParameterY: Blend
m_MinThreshold: 0
- m_MaxThreshold: 1
+ m_MaxThreshold: 2
m_UseAutomaticThresholds: 1
m_NormalizedBlendValues: 0
m_BlendType: 0
diff --git a/Assets/BossRoom/Scripts/Client/AnimationCallbacks/AnimatorFootstepSounds.cs b/Assets/BossRoom/Scripts/Client/AnimationCallbacks/AnimatorFootstepSounds.cs
index dfa2fbdbf..c247698d9 100644
--- a/Assets/BossRoom/Scripts/Client/AnimationCallbacks/AnimatorFootstepSounds.cs
+++ b/Assets/BossRoom/Scripts/Client/AnimationCallbacks/AnimatorFootstepSounds.cs
@@ -13,6 +13,8 @@ namespace BossRoom.Visual
/// approach, but it does have a flaw: it becomes inaccurate when the character's speed is slowed.
/// e.g. if a slowness debuff makes you move at 75% speed, the footsteps will be slightly off because
/// we only have sound-loops for 50% and 100%. That's not a big deal in this particular game, though.
+ /// In the rare situations where animted speed is faster than 100% (due to speed buffs etc.), we currently
+ /// just don't play any footsteps at all.
///
public class AnimatorFootstepSounds : MonoBehaviour
{
@@ -48,6 +50,10 @@ public class AnimatorFootstepSounds : MonoBehaviour
[Tooltip("Relative volume to play the clip at")]
private float m_RunFootstepVolume = 1;
+ [SerializeField]
+ [Tooltip("At what point do we play \"running\" footsteps? Higher than this point, we don't play any footstep sounds")]
+ private float m_RunningPoint = 1.2f;
+
[SerializeField]
[Tooltip("At what point do we switch from running sounds to walking? From 0 (stationary) to 1 (full sprint)")]
private float m_WalkingPoint = 0.6f;
@@ -78,11 +84,16 @@ private void Update()
clipToUse = m_WalkFootstepAudioClip;
volume = m_WalkFootstepVolume;
}
- else
+ else if (speed <= m_RunningPoint)
{
clipToUse = m_RunFootstepAudioClip;
volume = m_RunFootstepVolume;
}
+ else
+ {
+ // we're animating the character's legs faster than either of our clips can support.
+ // We could play a faster clip here... but we don't have one, so just play nothing
+ }
// now actually configure and play the appropriate sound
if (clipToUse == null)
diff --git a/Assets/BossRoom/Scripts/Client/Game/Character/ClientCharacterVisualization.cs b/Assets/BossRoom/Scripts/Client/Game/Character/ClientCharacterVisualization.cs
index 8dfa2e49b..ba29c1277 100644
--- a/Assets/BossRoom/Scripts/Client/Game/Character/ClientCharacterVisualization.cs
+++ b/Assets/BossRoom/Scripts/Client/Game/Character/ClientCharacterVisualization.cs
@@ -287,6 +287,56 @@ private void SetAppearanceSwap()
}
}
+ ///
+ /// Returns the value we should set the Animator's "Speed" variable, which has the following range
+ /// (as configured in the AnimatorController's blend tree):
+ /// 0 = idle
+ /// 0.5 = walking
+ /// 1 = sprinting
+ /// 1.5 = fast-sprinting
+ /// 2 = comically fast-sprinting.
+ ///
+ ///
+ /// Values in between these positions will be blended by the animator controller (e.g. a value of .75 is animated
+ /// as something between a walk and a run), but because we have footstep clips at specific speeds, we prefer to use
+ /// the specific animation-speeds that line up with the footsteps: 0.5 = walking footsteps, 1.0 = running footsteps.
+ /// Higher than 1 = no footsteps at all (at present).
+ ///
+ /// This is why we don't try to determine the character's "normal" speed ourselves (by dividing their current speed in
+ /// m_NetState.NetworkMovementSpeed with the character class's base movement speed). Doing so could give us more precise
+ /// footsteps when the character's speed is buffed an arbitrary amount (e.g. a 10% speed buff would make the legs move
+ /// 10% faster)... but at the cost of the footstep sounds being misaligned.
+ ///
+ /// For a cartoony-styled game, it works out better to just rely on what the server says we're doing
+ /// (as represented by NetworkLifeState and MovementStatus values).
+ ///
+ /// speed value, between 0 and 2
+ private float GetVisualMovementSpeed()
+ {
+ if (m_NetState.NetworkLifeState.Value != LifeState.Alive)
+ {
+ return 0;
+ }
+
+ switch (m_NetState.MovementStatus.Value)
+ {
+ case MovementStatus.Idle:
+ return 0;
+ case MovementStatus.Normal:
+ return 1;
+ case MovementStatus.Uncontrolled:
+ return 0; // don't move legs at all -- the character seems to slide haplessly across the ground
+ case MovementStatus.Slowed:
+ return 2f; // comical over-exaggeration. The idea is the character is struggling to move at all, so their legs are going fast even though they are moving slowly. (Could also use 0.5 to have the slowed character just walk.)
+ case MovementStatus.Hasted:
+ return 1.5f;
+ case MovementStatus.Walking:
+ return 0.5f;
+ default:
+ throw new Exception($"Unknown MovementStatus {m_NetState.MovementStatus.Value}");
+ }
+ }
+
void Update()
{
if (Parent == null)
@@ -301,12 +351,7 @@ void Update()
if (m_ClientVisualsAnimator)
{
// set Animator variables here
- float visibleSpeed = 0;
- if (m_NetState.NetworkLifeState.Value == LifeState.Alive)
- {
- visibleSpeed = m_NetState.VisualMovementSpeed.Value;
- }
- m_ClientVisualsAnimator.SetFloat("Speed", visibleSpeed);
+ m_ClientVisualsAnimator.SetFloat("Speed", GetVisualMovementSpeed());
}
m_ActionViz.Update();
diff --git a/Assets/BossRoom/Scripts/Server/Game/Character/ServerCharacterMovement.cs b/Assets/BossRoom/Scripts/Server/Game/Character/ServerCharacterMovement.cs
index 86cf5a3f0..ab522db4a 100644
--- a/Assets/BossRoom/Scripts/Server/Game/Character/ServerCharacterMovement.cs
+++ b/Assets/BossRoom/Scripts/Server/Game/Character/ServerCharacterMovement.cs
@@ -29,9 +29,6 @@ public class ServerCharacterMovement : NetworkBehaviour
private MovementState m_MovementState;
private ServerCharacter m_CharLogic;
- [SerializeField]
- private float m_MovementSpeed; // TODO [GOMPS-86] this should be assigned based on character definition
-
// when we are in charging and knockback mode, we use these additional variables
private float m_ForcedSpeed;
private float m_SpecialModeDurationRemaining;
@@ -136,7 +133,7 @@ private void FixedUpdate()
m_NetworkCharacterState.NetworkPosition.Value = transform.position;
m_NetworkCharacterState.NetworkRotationY.Value = transform.rotation.eulerAngles.y;
m_NetworkCharacterState.NetworkMovementSpeed.Value = GetMaxMovementSpeed();
- m_NetworkCharacterState.VisualMovementSpeed.Value = GetVisualMovementSpeed();
+ m_NetworkCharacterState.MovementStatus.Value = GetMovementStatus();
}
private void OnValidate()
@@ -152,7 +149,7 @@ private void OnValidate()
private void OnDestroy()
{
- if(m_NavPath != null )
+ if (m_NavPath != null)
{
m_NavPath.Dispose();
}
@@ -192,7 +189,7 @@ private void PerformMovement()
}
else
{
- var desiredMovementAmount = m_MovementSpeed * Time.fixedDeltaTime;
+ var desiredMovementAmount = GetBaseMovementSpeed() * Time.fixedDeltaTime;
movementVector = m_NavPath.MoveAlongPath(desiredMovementAmount);
// If we didn't move stop moving.
@@ -218,21 +215,33 @@ private float GetMaxMovementSpeed()
case MovementState.Charging:
case MovementState.Knockback:
return m_ForcedSpeed;
- case MovementState.Idle:
- case MovementState.PathFollowing:
+ case MovementState.Idle:
+ case MovementState.PathFollowing:
default:
- return m_MovementSpeed;
+ return GetBaseMovementSpeed();
}
}
- private float GetVisualMovementSpeed()
+ // just retrieves the speed for this character's class
+ private float GetBaseMovementSpeed()
{
- if (m_MovementState == MovementState.Idle || m_MovementState == MovementState.Knockback)
- return 0;
- else
- return 1;
- // if we had a "movement-slow" special-effect, we could return 0.5 from this function, which would
- // make the character use the walk animation instead of the run animation
+ CharacterClass characterClass = GameDataSource.Instance.CharacterDataByType[m_CharLogic.NetState.CharacterType];
+ Assert.IsNotNull(characterClass, $"No CharacterClass data for character type {m_CharLogic.NetState.CharacterType}");
+ return characterClass.Speed;
+ }
+
+ // figure out how to describe the character's movement to the client
+ private MovementStatus GetMovementStatus()
+ {
+ switch (m_MovementState)
+ {
+ case MovementState.Idle:
+ return MovementStatus.Idle;
+ case MovementState.Knockback:
+ return MovementStatus.Uncontrolled;
+ default:
+ return MovementStatus.Normal;
+ }
}
}
}
diff --git a/Assets/BossRoom/Scripts/Shared/Data/CharacterClass.cs b/Assets/BossRoom/Scripts/Shared/Data/CharacterClass.cs
index 21ed1ba9f..6de7e3501 100644
--- a/Assets/BossRoom/Scripts/Shared/Data/CharacterClass.cs
+++ b/Assets/BossRoom/Scripts/Shared/Data/CharacterClass.cs
@@ -27,6 +27,9 @@ public class CharacterClass : ScriptableObject
[Tooltip("Starting Mana of this character class")]
public int BaseMana;
+ [Tooltip("Base movement speed of this character class (in meters/sec)")]
+ public float Speed;
+
[Tooltip("Set to true if this represents an NPC, as opposed to a player.")]
public bool IsNpc;
diff --git a/Assets/BossRoom/Scripts/Shared/Game/Entity/NetworkCharacterState.cs b/Assets/BossRoom/Scripts/Shared/Game/Entity/NetworkCharacterState.cs
index 2314999ee..768c42fde 100644
--- a/Assets/BossRoom/Scripts/Shared/Game/Entity/NetworkCharacterState.cs
+++ b/Assets/BossRoom/Scripts/Shared/Game/Entity/NetworkCharacterState.cs
@@ -13,6 +13,22 @@ public enum LifeState
Dead,
}
+ ///
+ /// Describes how the character's movement should be animated: as standing idle, running normally,
+ /// magically slowed, sped up, etc. (Not all statuses are currently used by game content,
+ /// but they are set up to be displayed correctly for future use.)
+ ///
+ [Serializable]
+ public enum MovementStatus
+ {
+ Idle, // not trying to move
+ Normal, // character is moving (normally)
+ Uncontrolled, // character is being moved by e.g. a knockback -- they are not in control!
+ Slowed, // character's movement is magically hindered
+ Hasted, // character's movement is magically enhanced
+ Walking, // character should appear to be "walking" rather than normal running (e.g. for cut-scenes)
+ }
+
///
/// Contains all NetworkVariables and RPCs of a character. This component is present on both client and server objects.
///
@@ -40,13 +56,8 @@ public void InitNetworkPositionAndRotationY(Vector3 initPosition, float initRota
///
public NetworkVariableFloat NetworkMovementSpeed { get; } = new NetworkVariableFloat();
- ///
- /// Used by animations. Indicates how fast the character should "look like" they're moving,
- /// according to the server. This is a value from 0 (not moving) to 1 (moving as fast as possible).
- /// This does not always correspond to the NetworkMovementSpeed; for instance when a player is being
- /// "knocked back", they are moving, but they visually look like they're standing still.
- ///
- public NetworkVariableFloat VisualMovementSpeed { get; } = new NetworkVariableFloat();
+ /// Indicates how the character's movement should be depicted.
+ public NetworkVariable MovementStatus { get; } = new NetworkVariable();
///
/// Indicates whether this character is in "stealth mode" (invisible to monsters and other players).
From c1e27e83a5c0c3264b96f004ef5fdc74956d2c6a Mon Sep 17 00:00:00 2001
From: eheimburg <74330250+eheimburg@users.noreply.github.com>
Date: Mon, 12 Apr 2021 03:01:00 -0400
Subject: [PATCH 2/9] Animation-speed cleanup
- Moves character speed into the character class (removing the corresponding FIXME from code)
- Adds a "MovementStatus" field that replaces the concept of VisualMovementSpeed.
- Tweaked animator controller to allow for extra-fast movement (from not-yet-implemented buffs)
- Tweaked footstep sound player to not play footsteps for extra-fast movement (because they'd be wrong, and I think it's less distracting to just stop having footsteps than to have wrong ones)
This new enum lets the client explicitly choose how to render various status conditions, rather than having to guess what they are by comparing speed variables.
From fa468a07fefbe4bb8f5f64c6cf2552cd8e60561d Mon Sep 17 00:00:00 2001
From: eheimburg <74330250+eheimburg@users.noreply.github.com>
Date: Tue, 13 Apr 2021 01:37:00 -0400
Subject: [PATCH 3/9] code cleanup to address PR concerns
---
.../AnimationCallbacks/AnimatorFootstepSounds.cs | 10 +++++-----
.../Game/Character/ClientCharacterVisualization.cs | 14 ++++++++++----
.../Game/Character/ServerCharacterMovement.cs | 9 +++++++--
3 files changed, 22 insertions(+), 11 deletions(-)
diff --git a/Assets/BossRoom/Scripts/Client/AnimationCallbacks/AnimatorFootstepSounds.cs b/Assets/BossRoom/Scripts/Client/AnimationCallbacks/AnimatorFootstepSounds.cs
index c247698d9..175eecef4 100644
--- a/Assets/BossRoom/Scripts/Client/AnimationCallbacks/AnimatorFootstepSounds.cs
+++ b/Assets/BossRoom/Scripts/Client/AnimationCallbacks/AnimatorFootstepSounds.cs
@@ -51,15 +51,15 @@ public class AnimatorFootstepSounds : MonoBehaviour
private float m_RunFootstepVolume = 1;
[SerializeField]
- [Tooltip("At what point do we play \"running\" footsteps? Higher than this point, we don't play any footstep sounds")]
- private float m_RunningPoint = 1.2f;
+ [Tooltip("At what point do we consider the speed \"too fast\", and not play any sound?")]
+ private float m_FootstepSpeedThreshold = 1.2f;
[SerializeField]
- [Tooltip("At what point do we switch from running sounds to walking? From 0 (stationary) to 1 (full sprint)")]
+ [Tooltip("At what point do we switch from running sounds to walking?")]
private float m_WalkingPoint = 0.6f;
[SerializeField]
- [Tooltip("At what point do we switch from walking sounds to no sounds? From 0 (stationary) to 1 (full sprint)")]
+ [Tooltip("At what point do we switch from walking sounds to no sounds?")]
private float m_SilentPoint = 0.3f;
private void Update()
@@ -84,7 +84,7 @@ private void Update()
clipToUse = m_WalkFootstepAudioClip;
volume = m_WalkFootstepVolume;
}
- else if (speed <= m_RunningPoint)
+ else if (speed <= m_FootstepSpeedThreshold)
{
clipToUse = m_RunFootstepAudioClip;
volume = m_RunFootstepVolume;
diff --git a/Assets/BossRoom/Scripts/Client/Game/Character/ClientCharacterVisualization.cs b/Assets/BossRoom/Scripts/Client/Game/Character/ClientCharacterVisualization.cs
index ba29c1277..c27a59937 100644
--- a/Assets/BossRoom/Scripts/Client/Game/Character/ClientCharacterVisualization.cs
+++ b/Assets/BossRoom/Scripts/Client/Game/Character/ClientCharacterVisualization.cs
@@ -48,6 +48,9 @@ public class ClientCharacterVisualization : NetworkBehaviour
int m_HitStateTriggerID;
int m_AnticipateMoveTriggerID;
int m_SpeedVariableID;
+ int m_BaseNodeTagID;
+ int m_EntryDeathTriggerID;
+ int m_EntryFaintedTriggerID;
event Action Destroyed;
@@ -68,6 +71,9 @@ public override void NetworkStart()
m_AnticipateMoveTriggerID = Animator.StringToHash("AnticipateMove");
m_SpeedVariableID = Animator.StringToHash("Speed");
m_HitStateTriggerID = Animator.StringToHash(ActionFX.k_DefaultHitReact);
+ m_BaseNodeTagID = Animator.StringToHash("BaseNode");
+ m_EntryDeathTriggerID = Animator.StringToHash("EntryDeath");
+ m_EntryFaintedTriggerID = Animator.StringToHash("EntryFainted");
m_ActionViz = new ActionVisualization(this);
@@ -169,10 +175,10 @@ void SyncEntryAnimation(LifeState lifeState)
switch (lifeState)
{
case LifeState.Dead: // ie. NPCs already dead
- m_ClientVisualsAnimator.SetTrigger(Animator.StringToHash("EntryDeath"));
+ m_ClientVisualsAnimator.SetTrigger(m_EntryDeathTriggerID);
break;
case LifeState.Fainted: // ie. PCs already fainted
- m_ClientVisualsAnimator.SetTrigger(Animator.StringToHash("EntryFainted"));
+ m_ClientVisualsAnimator.SetTrigger(m_EntryFaintedTriggerID);
break;
}
}
@@ -351,7 +357,7 @@ void Update()
if (m_ClientVisualsAnimator)
{
// set Animator variables here
- m_ClientVisualsAnimator.SetFloat("Speed", GetVisualMovementSpeed());
+ m_ClientVisualsAnimator.SetFloat(m_SpeedVariableID, GetVisualMovementSpeed());
}
m_ActionViz.Update();
@@ -374,7 +380,7 @@ public bool IsAnimating
for( int i = 0; i < OurAnimator.layerCount; i++ )
{
- if (!OurAnimator.GetCurrentAnimatorStateInfo(i).IsTag("BaseNode"))
+ if (OurAnimator.GetCurrentAnimatorStateInfo(i).tagHash != m_BaseNodeTagID)
{
//we are in an active node, not the default "nothing" node.
return true;
diff --git a/Assets/BossRoom/Scripts/Server/Game/Character/ServerCharacterMovement.cs b/Assets/BossRoom/Scripts/Server/Game/Character/ServerCharacterMovement.cs
index ab522db4a..1564d2843 100644
--- a/Assets/BossRoom/Scripts/Server/Game/Character/ServerCharacterMovement.cs
+++ b/Assets/BossRoom/Scripts/Server/Game/Character/ServerCharacterMovement.cs
@@ -222,7 +222,9 @@ private float GetMaxMovementSpeed()
}
}
- // just retrieves the speed for this character's class
+ ///
+ /// Retrieves the speed for this character's class.
+ ///
private float GetBaseMovementSpeed()
{
CharacterClass characterClass = GameDataSource.Instance.CharacterDataByType[m_CharLogic.NetState.CharacterType];
@@ -230,7 +232,10 @@ private float GetBaseMovementSpeed()
return characterClass.Speed;
}
- // figure out how to describe the character's movement to the client
+ ///
+ /// Determines the appropriate MovementStatus for the character. The
+ /// MovementStatus is used by the client code when animating the character.
+ ///
private MovementStatus GetMovementStatus()
{
switch (m_MovementState)
From c55fbd4520e55025dfb2d10c7304aad15cfe0b92 Mon Sep 17 00:00:00 2001
From: eheimburg <74330250+eheimburg@users.noreply.github.com>
Date: Tue, 13 Apr 2021 01:37:58 -0400
Subject: [PATCH 4/9] comment fix
---
.../Client/AnimationCallbacks/AnimatorFootstepSounds.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Assets/BossRoom/Scripts/Client/AnimationCallbacks/AnimatorFootstepSounds.cs b/Assets/BossRoom/Scripts/Client/AnimationCallbacks/AnimatorFootstepSounds.cs
index 175eecef4..faf545093 100644
--- a/Assets/BossRoom/Scripts/Client/AnimationCallbacks/AnimatorFootstepSounds.cs
+++ b/Assets/BossRoom/Scripts/Client/AnimationCallbacks/AnimatorFootstepSounds.cs
@@ -13,8 +13,8 @@ namespace BossRoom.Visual
/// approach, but it does have a flaw: it becomes inaccurate when the character's speed is slowed.
/// e.g. if a slowness debuff makes you move at 75% speed, the footsteps will be slightly off because
/// we only have sound-loops for 50% and 100%. That's not a big deal in this particular game, though.
- /// In the rare situations where animted speed is faster than 100% (due to speed buffs etc.), we currently
- /// just don't play any footsteps at all.
+ /// In the rare situations where animated speed is faster than 100% (due to speed buffs etc.), we
+ /// currently just don't play any footsteps at all.
///
public class AnimatorFootstepSounds : MonoBehaviour
{
From 40d9b773292cd2471af70d98a4863d71a66545d2 Mon Sep 17 00:00:00 2001
From: eheimburg <74330250+eheimburg@users.noreply.github.com>
Date: Wed, 14 Apr 2021 02:19:38 -0400
Subject: [PATCH 5/9] variable renaming
---
.../AnimatorFootstepSounds.cs | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/Assets/BossRoom/Scripts/Client/AnimationCallbacks/AnimatorFootstepSounds.cs b/Assets/BossRoom/Scripts/Client/AnimationCallbacks/AnimatorFootstepSounds.cs
index faf545093..f71066cbe 100644
--- a/Assets/BossRoom/Scripts/Client/AnimationCallbacks/AnimatorFootstepSounds.cs
+++ b/Assets/BossRoom/Scripts/Client/AnimationCallbacks/AnimatorFootstepSounds.cs
@@ -51,16 +51,16 @@ public class AnimatorFootstepSounds : MonoBehaviour
private float m_RunFootstepVolume = 1;
[SerializeField]
- [Tooltip("At what point do we consider the speed \"too fast\", and not play any sound?")]
- private float m_FootstepSpeedThreshold = 1.2f;
+ [Tooltip("If the speed variable is this or below, we're moving too slowly for footsteps (no sounds played)")]
+ private float m_TooSlowThreshold = 0.3f;
[SerializeField]
- [Tooltip("At what point do we switch from running sounds to walking?")]
- private float m_WalkingPoint = 0.6f;
+ [Tooltip("If the speed variable is between TooSlowThreshold and this, we're walking")]
+ private float m_WalkSpeedThreshold = 0.6f;
[SerializeField]
- [Tooltip("At what point do we switch from walking sounds to no sounds?")]
- private float m_SilentPoint = 0.3f;
+ [Tooltip("If the speed variable is between WalkSpeedThreshold and this, we're running. (Higher than this means no sound)")]
+ private float m_RunSpeedThreshold = 1.2f;
private void Update()
{
@@ -75,16 +75,16 @@ private void Update()
AudioClip clipToUse = null;
float volume = 0;
float speed = m_Animator.GetFloat(m_AnimatorVariableHash);
- if (speed <= m_SilentPoint)
+ if (speed <= m_TooSlowThreshold)
{
// we could have a "VERY slow walk" sound... but we don't, so just play nothing
}
- else if (speed <= m_WalkingPoint)
+ else if (speed <= m_WalkSpeedThreshold)
{
clipToUse = m_WalkFootstepAudioClip;
volume = m_WalkFootstepVolume;
}
- else if (speed <= m_FootstepSpeedThreshold)
+ else if (speed <= m_RunSpeedThreshold)
{
clipToUse = m_RunFootstepAudioClip;
volume = m_RunFootstepVolume;
From 481eb83b9e3bbb0a9bdba9421faa75118acac826 Mon Sep 17 00:00:00 2001
From: eheimburg <74330250+eheimburg@users.noreply.github.com>
Date: Mon, 19 Apr 2021 07:33:22 -0400
Subject: [PATCH 6/9] Move speed values and animator variables out of
ClientCharacterVisualization and into a separate VisualizationConfiguration
SO
---
Assets/BossRoom/GameData/Shared.meta | 8 ++
.../SharedVisualizationConfiguration.asset | 3 +
...haredVisualizationConfiguration.asset.meta | 8 ++
.../Prefabs/CharGFX/BossGraphics.prefab | 48 ++++++-----
.../Prefabs/CharGFX/ImpGraphics.prefab | 44 +++++-----
.../Prefabs/CharGFX/PlayerGraphics.prefab | 68 +++++++++++++++-
.../Character/ClientCharacterVisualization.cs | 81 ++++++-------------
.../VisualizationConfiguration.cs | 72 +++++++++++++++++
.../VisualizationConfiguration.cs.meta | 11 +++
9 files changed, 241 insertions(+), 102 deletions(-)
create mode 100644 Assets/BossRoom/GameData/Shared.meta
create mode 100644 Assets/BossRoom/GameData/Shared/SharedVisualizationConfiguration.asset
create mode 100644 Assets/BossRoom/GameData/Shared/SharedVisualizationConfiguration.asset.meta
create mode 100644 Assets/BossRoom/Scripts/Shared/ScriptableObjects/VisualizationConfiguration.cs
create mode 100644 Assets/BossRoom/Scripts/Shared/ScriptableObjects/VisualizationConfiguration.cs.meta
diff --git a/Assets/BossRoom/GameData/Shared.meta b/Assets/BossRoom/GameData/Shared.meta
new file mode 100644
index 000000000..b9d530aab
--- /dev/null
+++ b/Assets/BossRoom/GameData/Shared.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 0fcffe151f354c14ea460b8c67994ba7
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/BossRoom/GameData/Shared/SharedVisualizationConfiguration.asset b/Assets/BossRoom/GameData/Shared/SharedVisualizationConfiguration.asset
new file mode 100644
index 000000000..7a0621624
--- /dev/null
+++ b/Assets/BossRoom/GameData/Shared/SharedVisualizationConfiguration.asset
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1adeee0dc4a84fb2e2fb884963191a8795f615b588a33ee9c890ae33ee78ce74
+size 1056
diff --git a/Assets/BossRoom/GameData/Shared/SharedVisualizationConfiguration.asset.meta b/Assets/BossRoom/GameData/Shared/SharedVisualizationConfiguration.asset.meta
new file mode 100644
index 000000000..a976a3237
--- /dev/null
+++ b/Assets/BossRoom/GameData/Shared/SharedVisualizationConfiguration.asset.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 9504973cdecd65749889771972fa0117
+NativeFormatImporter:
+ externalObjects: {}
+ mainObjectFileID: 11400000
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/BossRoom/Prefabs/CharGFX/BossGraphics.prefab b/Assets/BossRoom/Prefabs/CharGFX/BossGraphics.prefab
index 91d0f938d..d87622aa7 100644
--- a/Assets/BossRoom/Prefabs/CharGFX/BossGraphics.prefab
+++ b/Assets/BossRoom/Prefabs/CharGFX/BossGraphics.prefab
@@ -634,8 +634,7 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2305735426247598617}
- m_LocalRotation: {x: -0.000000066579034, y: -0.000000043711385, z: -0.00000011029043,
- w: 1}
+ m_LocalRotation: {x: -0.000000066579034, y: -0.000000043711385, z: -0.00000011029043, w: 1}
m_LocalPosition: {x: -15.063482, y: -0.56256866, z: -0.0000076293945}
m_LocalScale: {x: 100, y: 99.999985, z: 100}
m_Children: []
@@ -2000,6 +1999,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_ClientVisualsAnimator: {fileID: 234724737205816310}
m_CharacterSwapper: {fileID: 0}
+ m_VisualizationConfiguration: {fileID: 11400000, guid: 9504973cdecd65749889771972fa0117, type: 2}
TargetReticule: {fileID: 0}
ReticuleFriendlyMat: {fileID: 0}
ReticuleHostileMat: {fileID: 0}
@@ -2019,10 +2019,11 @@ MonoBehaviour:
m_EventsOnNodeEntry:
- m_AnimatorNodeName: Action - Boss Trample
m_AnimatorNodeNameHash: -1491039896
- m_Prefab: {fileID: -1433333703484781611, guid: 1333b84cd80da3e4a820009415068d44,
- type: 3}
+ m_Prefab: {fileID: -1433333703484781611, guid: 1333b84cd80da3e4a820009415068d44, type: 3}
m_PrefabSpawnDelaySeconds: 0
m_PrefabCanBeAbortedUntilSecs: 0
+ m_PrefabParent: {fileID: 0}
+ m_PrefabParentOffset: {x: 0, y: 0, z: 0}
m_SoundEffect: {fileID: 8300000, guid: a3d48c8599f0d584abc8ea603587d496, type: 3}
m_SoundStartDelaySeconds: 0
m_VolumeMultiplier: 1
@@ -2032,6 +2033,8 @@ MonoBehaviour:
m_Prefab: {fileID: 0}
m_PrefabSpawnDelaySeconds: 0
m_PrefabCanBeAbortedUntilSecs: 0
+ m_PrefabParent: {fileID: 0}
+ m_PrefabParentOffset: {x: 0, y: 0, z: 0}
m_SoundEffect: {fileID: 8300000, guid: 263888c6e986c944d80c59c3ac332ba1, type: 3}
m_SoundStartDelaySeconds: 0
m_VolumeMultiplier: 1
@@ -2041,36 +2044,41 @@ MonoBehaviour:
m_Prefab: {fileID: 0}
m_PrefabSpawnDelaySeconds: 0
m_PrefabCanBeAbortedUntilSecs: 0
+ m_PrefabParent: {fileID: 0}
+ m_PrefabParentOffset: {x: 0, y: 0, z: 0}
m_SoundEffect: {fileID: 8300000, guid: 87cdf94f9ac5ef541b45ebaa3d8bf7aa, type: 3}
m_SoundStartDelaySeconds: 0
m_VolumeMultiplier: 1
m_LoopSound: 1
- m_AnimatorNodeName: Stunned
m_AnimatorNodeNameHash: -449490811
- m_Prefab: {fileID: -7841978760598146115, guid: 1fab07feb34d8c94c96944f0124d92e3,
- type: 3}
+ m_Prefab: {fileID: -7841978760598146115, guid: 1fab07feb34d8c94c96944f0124d92e3, type: 3}
m_PrefabSpawnDelaySeconds: 0
m_PrefabCanBeAbortedUntilSecs: 0
+ m_PrefabParent: {fileID: 0}
+ m_PrefabParentOffset: {x: 0, y: 0, z: 0}
m_SoundEffect: {fileID: 8300000, guid: 3d6f2e33acb1e8f4b9d829e245c62e16, type: 3}
m_SoundStartDelaySeconds: 0
m_VolumeMultiplier: 1
m_LoopSound: 0
- m_AnimatorNodeName: HitReact1
m_AnimatorNodeNameHash: -1747783153
- m_Prefab: {fileID: -2843690008440830094, guid: de5b665e7f32274419072e7bf4c3eff8,
- type: 3}
+ m_Prefab: {fileID: -2843690008440830094, guid: de5b665e7f32274419072e7bf4c3eff8, type: 3}
m_PrefabSpawnDelaySeconds: 0
m_PrefabCanBeAbortedUntilSecs: 0
+ m_PrefabParent: {fileID: 0}
+ m_PrefabParentOffset: {x: 0, y: 0, z: 0}
m_SoundEffect: {fileID: 8300000, guid: 5ef809d665d13b245b559cd6170f5794, type: 3}
m_SoundStartDelaySeconds: 0
m_VolumeMultiplier: 1
m_LoopSound: 0
- m_AnimatorNodeName: WalkRun
m_AnimatorNodeNameHash: -1624701500
- m_Prefab: {fileID: -8608552164340512473, guid: 9336eb30e2a836544bfd5b5985fd0573,
- type: 3}
+ m_Prefab: {fileID: -8608552164340512473, guid: 9336eb30e2a836544bfd5b5985fd0573, type: 3}
m_PrefabSpawnDelaySeconds: 0
m_PrefabCanBeAbortedUntilSecs: 0
+ m_PrefabParent: {fileID: 0}
+ m_PrefabParentOffset: {x: 0, y: 0, z: 0}
m_SoundEffect: {fileID: 0}
m_SoundStartDelaySeconds: 0
m_VolumeMultiplier: 1
@@ -2088,8 +2096,7 @@ AudioSource:
m_GameObject: {fileID: 6839301660383890230}
m_Enabled: 1
serializedVersion: 4
- OutputAudioMixerGroup: {fileID: -6199682581367681880, guid: e39f39bfdfb22b541bbc115192fc2809,
- type: 2}
+ OutputAudioMixerGroup: {fileID: -6199682581367681880, guid: e39f39bfdfb22b541bbc115192fc2809, type: 2}
m_audioClip: {fileID: 0}
m_PlayOnAwake: 0
m_Volume: 1
@@ -2212,8 +2219,7 @@ AudioSource:
m_GameObject: {fileID: 6839301660383890230}
m_Enabled: 1
serializedVersion: 4
- OutputAudioMixerGroup: {fileID: -6199682581367681880, guid: e39f39bfdfb22b541bbc115192fc2809,
- type: 2}
+ OutputAudioMixerGroup: {fileID: -6199682581367681880, guid: e39f39bfdfb22b541bbc115192fc2809, type: 2}
m_audioClip: {fileID: 0}
m_PlayOnAwake: 0
m_Volume: 1
@@ -2343,14 +2349,13 @@ MonoBehaviour:
m_AnimatorVariable: Speed
m_AnimatorVariableHash: -823668238
m_AudioSource: {fileID: -2129752889114835779}
- m_WalkFootstepAudioClip: {fileID: 8300000, guid: 58dfe905701797d4aa32f946d9c41be5,
- type: 3}
+ m_WalkFootstepAudioClip: {fileID: 8300000, guid: 58dfe905701797d4aa32f946d9c41be5, type: 3}
m_WalkFootstepVolume: 1
- m_RunFootstepAudioClip: {fileID: 8300000, guid: 81079ef149d08774ab3eadab80944fa0,
- type: 3}
+ m_RunFootstepAudioClip: {fileID: 8300000, guid: 81079ef149d08774ab3eadab80944fa0, type: 3}
m_RunFootstepVolume: 1
- m_WalkingPoint: 0.6
- m_SilentPoint: 0.3
+ m_TooSlowThreshold: 0.3
+ m_WalkSpeedThreshold: 0.6
+ m_RunSpeedThreshold: 1.2
--- !u!82 &-2129752889114835779
AudioSource:
m_ObjectHideFlags: 0
@@ -2360,8 +2365,7 @@ AudioSource:
m_GameObject: {fileID: 6839301660383890230}
m_Enabled: 1
serializedVersion: 4
- OutputAudioMixerGroup: {fileID: -4341177700643628062, guid: e39f39bfdfb22b541bbc115192fc2809,
- type: 2}
+ OutputAudioMixerGroup: {fileID: -4341177700643628062, guid: e39f39bfdfb22b541bbc115192fc2809, type: 2}
m_audioClip: {fileID: 0}
m_PlayOnAwake: 0
m_Volume: 1
diff --git a/Assets/BossRoom/Prefabs/CharGFX/ImpGraphics.prefab b/Assets/BossRoom/Prefabs/CharGFX/ImpGraphics.prefab
index bf96cd0e3..4f2ed820a 100644
--- a/Assets/BossRoom/Prefabs/CharGFX/ImpGraphics.prefab
+++ b/Assets/BossRoom/Prefabs/CharGFX/ImpGraphics.prefab
@@ -389,8 +389,7 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2305735426247598617}
- m_LocalRotation: {x: -0.000000066579034, y: -0.000000043711385, z: -0.00000011029043,
- w: 1}
+ m_LocalRotation: {x: -0.000000066579034, y: -0.000000043711385, z: -0.00000011029043, w: 1}
m_LocalPosition: {x: -15.063482, y: -0.56256866, z: -0.0000076293945}
m_LocalScale: {x: 100, y: 99.999985, z: 100}
m_Children: []
@@ -1134,6 +1133,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_ClientVisualsAnimator: {fileID: 234724737205816310}
m_CharacterSwapper: {fileID: 0}
+ m_VisualizationConfiguration: {fileID: 11400000, guid: 9504973cdecd65749889771972fa0117, type: 2}
TargetReticule: {fileID: 0}
ReticuleFriendlyMat: {fileID: 0}
ReticuleHostileMat: {fileID: 0}
@@ -1153,40 +1153,44 @@ MonoBehaviour:
m_EventsOnNodeEntry:
- m_AnimatorNodeName: Attack1
m_AnimatorNodeNameHash: -47317214
- m_Prefab: {fileID: 1652666497380707034, guid: abf9f7de0d4eb4941a1b17568597deb2,
- type: 3}
+ m_Prefab: {fileID: 1652666497380707034, guid: abf9f7de0d4eb4941a1b17568597deb2, type: 3}
m_PrefabSpawnDelaySeconds: 0.8
m_PrefabCanBeAbortedUntilSecs: 0
+ m_PrefabParent: {fileID: 0}
+ m_PrefabParentOffset: {x: 0, y: 0, z: 0}
m_SoundEffect: {fileID: 8300000, guid: 714700a9be690ab4ab62c7cad766e9ee, type: 3}
m_SoundStartDelaySeconds: 0
m_VolumeMultiplier: 1
m_LoopSound: 0
- m_AnimatorNodeName: Dead Loop
m_AnimatorNodeNameHash: -1573871441
- m_Prefab: {fileID: -1487195197790481162, guid: 9537f4739c7bc2f4e8d6b2d49bfcc97e,
- type: 3}
+ m_Prefab: {fileID: -1487195197790481162, guid: 9537f4739c7bc2f4e8d6b2d49bfcc97e, type: 3}
m_PrefabSpawnDelaySeconds: 0
m_PrefabCanBeAbortedUntilSecs: 0
+ m_PrefabParent: {fileID: 0}
+ m_PrefabParentOffset: {x: 0, y: 0, z: 0}
m_SoundEffect: {fileID: 8300000, guid: 7fbc6b32425f98840b339a705b4a28cb, type: 3}
m_SoundStartDelaySeconds: 0
m_VolumeMultiplier: 1
m_LoopSound: 0
- m_AnimatorNodeName: HitReact1
m_AnimatorNodeNameHash: -1747783153
- m_Prefab: {fileID: -2843690008440830094, guid: de5b665e7f32274419072e7bf4c3eff8,
- type: 3}
+ m_Prefab: {fileID: -2843690008440830094, guid: de5b665e7f32274419072e7bf4c3eff8, type: 3}
m_PrefabSpawnDelaySeconds: 0
m_PrefabCanBeAbortedUntilSecs: 0
+ m_PrefabParent: {fileID: 0}
+ m_PrefabParentOffset: {x: 0, y: 0, z: 0}
m_SoundEffect: {fileID: 8300000, guid: 5ef809d665d13b245b559cd6170f5794, type: 3}
m_SoundStartDelaySeconds: 0
m_VolumeMultiplier: 1
m_LoopSound: 0
- m_AnimatorNodeName: WalkRun
m_AnimatorNodeNameHash: -1624701500
- m_Prefab: {fileID: -8608552164340512473, guid: 9336eb30e2a836544bfd5b5985fd0573,
- type: 3}
+ m_Prefab: {fileID: -8608552164340512473, guid: 9336eb30e2a836544bfd5b5985fd0573, type: 3}
m_PrefabSpawnDelaySeconds: 0
m_PrefabCanBeAbortedUntilSecs: 0
+ m_PrefabParent: {fileID: 0}
+ m_PrefabParentOffset: {x: 0, y: 0, z: 0}
m_SoundEffect: {fileID: 0}
m_SoundStartDelaySeconds: 0
m_VolumeMultiplier: 1
@@ -1204,8 +1208,7 @@ AudioSource:
m_GameObject: {fileID: 6839301660383890230}
m_Enabled: 1
serializedVersion: 4
- OutputAudioMixerGroup: {fileID: -6199682581367681880, guid: e39f39bfdfb22b541bbc115192fc2809,
- type: 2}
+ OutputAudioMixerGroup: {fileID: -6199682581367681880, guid: e39f39bfdfb22b541bbc115192fc2809, type: 2}
m_audioClip: {fileID: 0}
m_PlayOnAwake: 0
m_Volume: 1
@@ -1328,8 +1331,7 @@ AudioSource:
m_GameObject: {fileID: 6839301660383890230}
m_Enabled: 1
serializedVersion: 4
- OutputAudioMixerGroup: {fileID: -6199682581367681880, guid: e39f39bfdfb22b541bbc115192fc2809,
- type: 2}
+ OutputAudioMixerGroup: {fileID: -6199682581367681880, guid: e39f39bfdfb22b541bbc115192fc2809, type: 2}
m_audioClip: {fileID: 0}
m_PlayOnAwake: 0
m_Volume: 1
@@ -1459,14 +1461,13 @@ MonoBehaviour:
m_AnimatorVariable: Speed
m_AnimatorVariableHash: -823668238
m_AudioSource: {fileID: -8995571906845300287}
- m_WalkFootstepAudioClip: {fileID: 8300000, guid: 6fd6fb49b9fc5324a8baf1de798388fa,
- type: 3}
+ m_WalkFootstepAudioClip: {fileID: 8300000, guid: 6fd6fb49b9fc5324a8baf1de798388fa, type: 3}
m_WalkFootstepVolume: 0.8
- m_RunFootstepAudioClip: {fileID: 8300000, guid: 6ad4d1d63bc70494bbc9172ae70bcdd0,
- type: 3}
+ m_RunFootstepAudioClip: {fileID: 8300000, guid: 6ad4d1d63bc70494bbc9172ae70bcdd0, type: 3}
m_RunFootstepVolume: 0.8
- m_WalkingPoint: 0.6
- m_SilentPoint: 0.3
+ m_TooSlowThreshold: 0.3
+ m_WalkSpeedThreshold: 0.6
+ m_RunSpeedThreshold: 1.2
--- !u!82 &-8995571906845300287
AudioSource:
m_ObjectHideFlags: 0
@@ -1476,8 +1477,7 @@ AudioSource:
m_GameObject: {fileID: 6839301660383890230}
m_Enabled: 1
serializedVersion: 4
- OutputAudioMixerGroup: {fileID: -4341177700643628062, guid: e39f39bfdfb22b541bbc115192fc2809,
- type: 2}
+ OutputAudioMixerGroup: {fileID: -4341177700643628062, guid: e39f39bfdfb22b541bbc115192fc2809, type: 2}
m_audioClip: {fileID: 0}
m_PlayOnAwake: 0
m_Volume: 1
diff --git a/Assets/BossRoom/Prefabs/CharGFX/PlayerGraphics.prefab b/Assets/BossRoom/Prefabs/CharGFX/PlayerGraphics.prefab
index f939e324a..8fa9e0ed7 100644
--- a/Assets/BossRoom/Prefabs/CharGFX/PlayerGraphics.prefab
+++ b/Assets/BossRoom/Prefabs/CharGFX/PlayerGraphics.prefab
@@ -1188,6 +1188,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_ClientVisualsAnimator: {fileID: 4199396739699390757}
m_CharacterSwapper: {fileID: 579958722332811098}
+ m_VisualizationConfiguration: {fileID: 11400000, guid: 9504973cdecd65749889771972fa0117, type: 2}
TargetReticule: {fileID: 3697322597467218969, guid: 546d1949af792c245b0861507d25a349, type: 3}
ReticuleFriendlyMat: {fileID: 2100000, guid: 0bc9c70c830bca44dbddfbc5c49830f8, type: 2}
ReticuleHostileMat: {fileID: 2100000, guid: 06ea36c997b09a943b6f5ea691093c21, type: 2}
@@ -1339,6 +1340,8 @@ MonoBehaviour:
m_Prefab: {fileID: 0}
m_PrefabSpawnDelaySeconds: 0
m_PrefabCanBeAbortedUntilSecs: 0
+ m_PrefabParent: {fileID: 0}
+ m_PrefabParentOffset: {x: 0, y: 0, z: 0}
m_SoundEffect: {fileID: 8300000, guid: cba8cb3c39a998149a882dbe30d5fa4b, type: 3}
m_SoundStartDelaySeconds: 0
m_VolumeMultiplier: 1
@@ -1348,6 +1351,8 @@ MonoBehaviour:
m_Prefab: {fileID: 0}
m_PrefabSpawnDelaySeconds: 0
m_PrefabCanBeAbortedUntilSecs: 0
+ m_PrefabParent: {fileID: 0}
+ m_PrefabParentOffset: {x: 0, y: 0, z: 0}
m_SoundEffect: {fileID: 8300000, guid: fe3390994a24bd8409ace9b1711ee692, type: 3}
m_SoundStartDelaySeconds: 0
m_VolumeMultiplier: 1
@@ -1357,6 +1362,8 @@ MonoBehaviour:
m_Prefab: {fileID: 0}
m_PrefabSpawnDelaySeconds: 0
m_PrefabCanBeAbortedUntilSecs: 0
+ m_PrefabParent: {fileID: 0}
+ m_PrefabParentOffset: {x: 0, y: 0, z: 0}
m_SoundEffect: {fileID: 8300000, guid: 146b93ddde84a144986e8886e0217677, type: 3}
m_SoundStartDelaySeconds: 0
m_VolumeMultiplier: 1
@@ -1366,6 +1373,8 @@ MonoBehaviour:
m_Prefab: {fileID: 0}
m_PrefabSpawnDelaySeconds: 0
m_PrefabCanBeAbortedUntilSecs: 0
+ m_PrefabParent: {fileID: 0}
+ m_PrefabParentOffset: {x: 0, y: 0, z: 0}
m_SoundEffect: {fileID: 8300000, guid: d646d51b3d779ea4db41dabf61d750e0, type: 3}
m_SoundStartDelaySeconds: 0
m_VolumeMultiplier: 1
@@ -1375,6 +1384,8 @@ MonoBehaviour:
m_Prefab: {fileID: 5031766593922921982, guid: 916fc51d2167e1f42a14e1fb9cd224a8, type: 3}
m_PrefabSpawnDelaySeconds: 0
m_PrefabCanBeAbortedUntilSecs: 0
+ m_PrefabParent: {fileID: 0}
+ m_PrefabParentOffset: {x: 0, y: 0, z: 0}
m_SoundEffect: {fileID: 8300000, guid: 142f526f026d1c241b01ebb524d19903, type: 3}
m_SoundStartDelaySeconds: 0
m_VolumeMultiplier: 1
@@ -1384,6 +1395,8 @@ MonoBehaviour:
m_Prefab: {fileID: -288210933268752174, guid: 98f11693945a93b4abd1cebb803338cc, type: 3}
m_PrefabSpawnDelaySeconds: 1.4
m_PrefabCanBeAbortedUntilSecs: 0
+ m_PrefabParent: {fileID: 0}
+ m_PrefabParentOffset: {x: 0, y: 0, z: 0}
m_SoundEffect: {fileID: 8300000, guid: 7fbc6b32425f98840b339a705b4a28cb, type: 3}
m_SoundStartDelaySeconds: 0
m_VolumeMultiplier: 1
@@ -1393,6 +1406,8 @@ MonoBehaviour:
m_Prefab: {fileID: -8608552164340512473, guid: 9336eb30e2a836544bfd5b5985fd0573, type: 3}
m_PrefabSpawnDelaySeconds: 0
m_PrefabCanBeAbortedUntilSecs: 0
+ m_PrefabParent: {fileID: 0}
+ m_PrefabParentOffset: {x: 0, y: 0, z: 0}
m_SoundEffect: {fileID: 0}
m_SoundStartDelaySeconds: 0
m_VolumeMultiplier: 1
@@ -1402,6 +1417,8 @@ MonoBehaviour:
m_Prefab: {fileID: 5012378715484584769, guid: 8b58298c2bb9f0d4f8cb8243450adeda, type: 3}
m_PrefabSpawnDelaySeconds: 0
m_PrefabCanBeAbortedUntilSecs: 0
+ m_PrefabParent: {fileID: 0}
+ m_PrefabParentOffset: {x: 0, y: 0, z: 0}
m_SoundEffect: {fileID: 8300000, guid: c6c3998cfe5b6b94ab3b60a57f1c1598, type: 3}
m_SoundStartDelaySeconds: 0
m_VolumeMultiplier: 1
@@ -1411,6 +1428,8 @@ MonoBehaviour:
m_Prefab: {fileID: -7841978760598146115, guid: 1fab07feb34d8c94c96944f0124d92e3, type: 3}
m_PrefabSpawnDelaySeconds: 0
m_PrefabCanBeAbortedUntilSecs: 0
+ m_PrefabParent: {fileID: 0}
+ m_PrefabParentOffset: {x: 0, y: 0, z: 0}
m_SoundEffect: {fileID: 8300000, guid: 3d6f2e33acb1e8f4b9d829e245c62e16, type: 3}
m_SoundStartDelaySeconds: 0
m_VolumeMultiplier: 1
@@ -1420,6 +1439,8 @@ MonoBehaviour:
m_Prefab: {fileID: -2843690008440830094, guid: de5b665e7f32274419072e7bf4c3eff8, type: 3}
m_PrefabSpawnDelaySeconds: 0
m_PrefabCanBeAbortedUntilSecs: 0
+ m_PrefabParent: {fileID: 0}
+ m_PrefabParentOffset: {x: 0, y: 0, z: 0}
m_SoundEffect: {fileID: 8300000, guid: 5ef809d665d13b245b559cd6170f5794, type: 3}
m_SoundStartDelaySeconds: 0
m_VolumeMultiplier: 1
@@ -1447,6 +1468,8 @@ MonoBehaviour:
m_Prefab: {fileID: 4268371053021891542, guid: e1a27cb18e3a1d649aa3fc6420f3731b, type: 3}
m_PrefabSpawnDelaySeconds: 0
m_PrefabCanBeAbortedUntilSecs: 0
+ m_PrefabParent: {fileID: 0}
+ m_PrefabParentOffset: {x: 0, y: 0, z: 0}
m_SoundEffect: {fileID: 8300000, guid: 62f4581e195a41c4eb9b5429dc33e34e, type: 3}
m_SoundStartDelaySeconds: 0
m_VolumeMultiplier: 1
@@ -1456,6 +1479,8 @@ MonoBehaviour:
m_Prefab: {fileID: 0}
m_PrefabSpawnDelaySeconds: 0
m_PrefabCanBeAbortedUntilSecs: 0
+ m_PrefabParent: {fileID: 0}
+ m_PrefabParentOffset: {x: 0, y: 0, z: 0}
m_SoundEffect: {fileID: 8300000, guid: c6f935b3555f5454992dbcad445131c9, type: 3}
m_SoundStartDelaySeconds: 0
m_VolumeMultiplier: 1
@@ -1465,6 +1490,8 @@ MonoBehaviour:
m_Prefab: {fileID: 0}
m_PrefabSpawnDelaySeconds: 0
m_PrefabCanBeAbortedUntilSecs: 0
+ m_PrefabParent: {fileID: 0}
+ m_PrefabParentOffset: {x: 0, y: 0, z: 0}
m_SoundEffect: {fileID: 8300000, guid: f954c95038a18f34e98b0ad4dd7307e1, type: 3}
m_SoundStartDelaySeconds: 0
m_VolumeMultiplier: 1
@@ -1474,6 +1501,8 @@ MonoBehaviour:
m_Prefab: {fileID: -288210933268752174, guid: 98f11693945a93b4abd1cebb803338cc, type: 3}
m_PrefabSpawnDelaySeconds: 1.4
m_PrefabCanBeAbortedUntilSecs: 0
+ m_PrefabParent: {fileID: 0}
+ m_PrefabParentOffset: {x: 0, y: 0, z: 0}
m_SoundEffect: {fileID: 0}
m_SoundStartDelaySeconds: 0
m_VolumeMultiplier: 1
@@ -1483,6 +1512,8 @@ MonoBehaviour:
m_Prefab: {fileID: -8608552164340512473, guid: 9336eb30e2a836544bfd5b5985fd0573, type: 3}
m_PrefabSpawnDelaySeconds: 0
m_PrefabCanBeAbortedUntilSecs: 0
+ m_PrefabParent: {fileID: 0}
+ m_PrefabParentOffset: {x: 0, y: 0, z: 0}
m_SoundEffect: {fileID: 0}
m_SoundStartDelaySeconds: 0
m_VolumeMultiplier: 1
@@ -1492,6 +1523,8 @@ MonoBehaviour:
m_Prefab: {fileID: 5012378715484584769, guid: 8b58298c2bb9f0d4f8cb8243450adeda, type: 3}
m_PrefabSpawnDelaySeconds: 0
m_PrefabCanBeAbortedUntilSecs: 0
+ m_PrefabParent: {fileID: 0}
+ m_PrefabParentOffset: {x: 0, y: 0, z: 0}
m_SoundEffect: {fileID: 8300000, guid: c6c3998cfe5b6b94ab3b60a57f1c1598, type: 3}
m_SoundStartDelaySeconds: 0
m_VolumeMultiplier: 1
@@ -1501,6 +1534,8 @@ MonoBehaviour:
m_Prefab: {fileID: -7841978760598146115, guid: 1fab07feb34d8c94c96944f0124d92e3, type: 3}
m_PrefabSpawnDelaySeconds: 0
m_PrefabCanBeAbortedUntilSecs: 0
+ m_PrefabParent: {fileID: 0}
+ m_PrefabParentOffset: {x: 0, y: 0, z: 0}
m_SoundEffect: {fileID: 8300000, guid: 3d6f2e33acb1e8f4b9d829e245c62e16, type: 3}
m_SoundStartDelaySeconds: 0
m_VolumeMultiplier: 1
@@ -1510,6 +1545,8 @@ MonoBehaviour:
m_Prefab: {fileID: -2843690008440830094, guid: de5b665e7f32274419072e7bf4c3eff8, type: 3}
m_PrefabSpawnDelaySeconds: 0
m_PrefabCanBeAbortedUntilSecs: 0
+ m_PrefabParent: {fileID: 0}
+ m_PrefabParentOffset: {x: 0, y: 0, z: 0}
m_SoundEffect: {fileID: 8300000, guid: 5ef809d665d13b245b559cd6170f5794, type: 3}
m_SoundStartDelaySeconds: 0
m_VolumeMultiplier: 1
@@ -1537,6 +1574,8 @@ MonoBehaviour:
m_Prefab: {fileID: 2787649059963953560, guid: 5121957b2fabba043a36ec5641e54be7, type: 3}
m_PrefabSpawnDelaySeconds: 0.8
m_PrefabCanBeAbortedUntilSecs: 0
+ m_PrefabParent: {fileID: 0}
+ m_PrefabParentOffset: {x: 0, y: 0, z: 0}
m_SoundEffect: {fileID: 8300000, guid: aafc6fae94f920546bf019c2d9cec45c, type: 3}
m_SoundStartDelaySeconds: 0
m_VolumeMultiplier: 1
@@ -1546,6 +1585,8 @@ MonoBehaviour:
m_Prefab: {fileID: -288210933268752174, guid: 98f11693945a93b4abd1cebb803338cc, type: 3}
m_PrefabSpawnDelaySeconds: 1.4
m_PrefabCanBeAbortedUntilSecs: 0
+ m_PrefabParent: {fileID: 0}
+ m_PrefabParentOffset: {x: 0, y: 0, z: 0}
m_SoundEffect: {fileID: 8300000, guid: 7fbc6b32425f98840b339a705b4a28cb, type: 3}
m_SoundStartDelaySeconds: 0
m_VolumeMultiplier: 1
@@ -1555,6 +1596,8 @@ MonoBehaviour:
m_Prefab: {fileID: -8608552164340512473, guid: 9336eb30e2a836544bfd5b5985fd0573, type: 3}
m_PrefabSpawnDelaySeconds: 0
m_PrefabCanBeAbortedUntilSecs: 0
+ m_PrefabParent: {fileID: 0}
+ m_PrefabParentOffset: {x: 0, y: 0, z: 0}
m_SoundEffect: {fileID: 0}
m_SoundStartDelaySeconds: 0
m_VolumeMultiplier: 1
@@ -1564,6 +1607,8 @@ MonoBehaviour:
m_Prefab: {fileID: 5012378715484584769, guid: 8b58298c2bb9f0d4f8cb8243450adeda, type: 3}
m_PrefabSpawnDelaySeconds: 0
m_PrefabCanBeAbortedUntilSecs: 0
+ m_PrefabParent: {fileID: 0}
+ m_PrefabParentOffset: {x: 0, y: 0, z: 0}
m_SoundEffect: {fileID: 8300000, guid: c6c3998cfe5b6b94ab3b60a57f1c1598, type: 3}
m_SoundStartDelaySeconds: 0
m_VolumeMultiplier: 1
@@ -1573,6 +1618,8 @@ MonoBehaviour:
m_Prefab: {fileID: -7841978760598146115, guid: 1fab07feb34d8c94c96944f0124d92e3, type: 3}
m_PrefabSpawnDelaySeconds: 0
m_PrefabCanBeAbortedUntilSecs: 0
+ m_PrefabParent: {fileID: 0}
+ m_PrefabParentOffset: {x: 0, y: 0, z: 0}
m_SoundEffect: {fileID: 8300000, guid: 3d6f2e33acb1e8f4b9d829e245c62e16, type: 3}
m_SoundStartDelaySeconds: 0
m_VolumeMultiplier: 1
@@ -1582,6 +1629,8 @@ MonoBehaviour:
m_Prefab: {fileID: -2843690008440830094, guid: de5b665e7f32274419072e7bf4c3eff8, type: 3}
m_PrefabSpawnDelaySeconds: 0
m_PrefabCanBeAbortedUntilSecs: 0
+ m_PrefabParent: {fileID: 0}
+ m_PrefabParentOffset: {x: 0, y: 0, z: 0}
m_SoundEffect: {fileID: 8300000, guid: 5ef809d665d13b245b559cd6170f5794, type: 3}
m_SoundStartDelaySeconds: 0
m_VolumeMultiplier: 1
@@ -1609,6 +1658,8 @@ MonoBehaviour:
m_Prefab: {fileID: 0}
m_PrefabSpawnDelaySeconds: 0
m_PrefabCanBeAbortedUntilSecs: 0
+ m_PrefabParent: {fileID: 0}
+ m_PrefabParentOffset: {x: 0, y: 0, z: 0}
m_SoundEffect: {fileID: 8300000, guid: 8d2a35c9550c27e4eb96ffa1d2c7e37b, type: 3}
m_SoundStartDelaySeconds: 0
m_VolumeMultiplier: 1
@@ -1618,6 +1669,8 @@ MonoBehaviour:
m_Prefab: {fileID: 0}
m_PrefabSpawnDelaySeconds: 0
m_PrefabCanBeAbortedUntilSecs: 0
+ m_PrefabParent: {fileID: 0}
+ m_PrefabParentOffset: {x: 0, y: 0, z: 0}
m_SoundEffect: {fileID: 8300000, guid: 97c406be535d27e4fb6e1e8b64113e34, type: 3}
m_SoundStartDelaySeconds: 0
m_VolumeMultiplier: 1
@@ -1627,6 +1680,8 @@ MonoBehaviour:
m_Prefab: {fileID: -288210933268752174, guid: 98f11693945a93b4abd1cebb803338cc, type: 3}
m_PrefabSpawnDelaySeconds: 1.4
m_PrefabCanBeAbortedUntilSecs: 0
+ m_PrefabParent: {fileID: 0}
+ m_PrefabParentOffset: {x: 0, y: 0, z: 0}
m_SoundEffect: {fileID: 8300000, guid: 7fbc6b32425f98840b339a705b4a28cb, type: 3}
m_SoundStartDelaySeconds: 0
m_VolumeMultiplier: 1
@@ -1636,6 +1691,8 @@ MonoBehaviour:
m_Prefab: {fileID: -8608552164340512473, guid: 9336eb30e2a836544bfd5b5985fd0573, type: 3}
m_PrefabSpawnDelaySeconds: 0
m_PrefabCanBeAbortedUntilSecs: 0
+ m_PrefabParent: {fileID: 0}
+ m_PrefabParentOffset: {x: 0, y: 0, z: 0}
m_SoundEffect: {fileID: 0}
m_SoundStartDelaySeconds: 0
m_VolumeMultiplier: 1
@@ -1645,6 +1702,8 @@ MonoBehaviour:
m_Prefab: {fileID: 5012378715484584769, guid: 8b58298c2bb9f0d4f8cb8243450adeda, type: 3}
m_PrefabSpawnDelaySeconds: 0
m_PrefabCanBeAbortedUntilSecs: 0
+ m_PrefabParent: {fileID: 0}
+ m_PrefabParentOffset: {x: 0, y: 0, z: 0}
m_SoundEffect: {fileID: 8300000, guid: c6c3998cfe5b6b94ab3b60a57f1c1598, type: 3}
m_SoundStartDelaySeconds: 0
m_VolumeMultiplier: 1
@@ -1654,6 +1713,8 @@ MonoBehaviour:
m_Prefab: {fileID: -7841978760598146115, guid: 1fab07feb34d8c94c96944f0124d92e3, type: 3}
m_PrefabSpawnDelaySeconds: 0
m_PrefabCanBeAbortedUntilSecs: 0
+ m_PrefabParent: {fileID: 0}
+ m_PrefabParentOffset: {x: 0, y: 0, z: 0}
m_SoundEffect: {fileID: 8300000, guid: 3d6f2e33acb1e8f4b9d829e245c62e16, type: 3}
m_SoundStartDelaySeconds: 0
m_VolumeMultiplier: 1
@@ -1663,6 +1724,8 @@ MonoBehaviour:
m_Prefab: {fileID: -2843690008440830094, guid: de5b665e7f32274419072e7bf4c3eff8, type: 3}
m_PrefabSpawnDelaySeconds: 0
m_PrefabCanBeAbortedUntilSecs: 0
+ m_PrefabParent: {fileID: 0}
+ m_PrefabParentOffset: {x: 0, y: 0, z: 0}
m_SoundEffect: {fileID: 8300000, guid: 5ef809d665d13b245b559cd6170f5794, type: 3}
m_SoundStartDelaySeconds: 0
m_VolumeMultiplier: 1
@@ -1937,8 +2000,9 @@ MonoBehaviour:
m_WalkFootstepVolume: 1
m_RunFootstepAudioClip: {fileID: 8300000, guid: 6ad4d1d63bc70494bbc9172ae70bcdd0, type: 3}
m_RunFootstepVolume: 1
- m_WalkingPoint: 0.6
- m_SilentPoint: 0.3
+ m_TooSlowThreshold: 0.3
+ m_WalkSpeedThreshold: 0.6
+ m_RunSpeedThreshold: 1.2
--- !u!82 &3410014739571049847
AudioSource:
m_ObjectHideFlags: 0
diff --git a/Assets/BossRoom/Scripts/Client/Game/Character/ClientCharacterVisualization.cs b/Assets/BossRoom/Scripts/Client/Game/Character/ClientCharacterVisualization.cs
index c27a59937..4bf0394ca 100644
--- a/Assets/BossRoom/Scripts/Client/Game/Character/ClientCharacterVisualization.cs
+++ b/Assets/BossRoom/Scripts/Client/Game/Character/ClientCharacterVisualization.cs
@@ -4,6 +4,7 @@
using MLAPI;
using System;
using UnityEngine;
+using UnityEngine.Assertions;
namespace BossRoom.Visual
{
@@ -20,6 +21,9 @@ public class ClientCharacterVisualization : NetworkBehaviour
[SerializeField]
private CharacterSwap m_CharacterSwapper;
+ [SerializeField]
+ private VisualizationConfiguration m_VisualizationConfiguration;
+
[Tooltip("Prefab for the Target Reticule used by this Character")]
public GameObject TargetReticule;
@@ -42,15 +46,7 @@ public class ClientCharacterVisualization : NetworkBehaviour
private float m_SmoothedSpeed;
- int m_AliveStateTriggerID;
- int m_FaintedStateTriggerID;
- int m_DeadStateTriggerID;
int m_HitStateTriggerID;
- int m_AnticipateMoveTriggerID;
- int m_SpeedVariableID;
- int m_BaseNodeTagID;
- int m_EntryDeathTriggerID;
- int m_EntryFaintedTriggerID;
event Action Destroyed;
@@ -65,15 +61,7 @@ public override void NetworkStart()
return;
}
- m_AliveStateTriggerID = Animator.StringToHash("StandUp");
- m_FaintedStateTriggerID = Animator.StringToHash("FallDown");
- m_DeadStateTriggerID = Animator.StringToHash("Dead");
- m_AnticipateMoveTriggerID = Animator.StringToHash("AnticipateMove");
- m_SpeedVariableID = Animator.StringToHash("Speed");
m_HitStateTriggerID = Animator.StringToHash(ActionFX.k_DefaultHitReact);
- m_BaseNodeTagID = Animator.StringToHash("BaseNode");
- m_EntryDeathTriggerID = Animator.StringToHash("EntryDeath");
- m_EntryFaintedTriggerID = Animator.StringToHash("EntryFainted");
m_ActionViz = new ActionVisualization(this);
@@ -126,7 +114,7 @@ public override void NetworkStart()
gameObject.AddComponent();
m_PartyHUD.SetHeroData(m_NetState);
- if( Parent.TryGetComponent(out ClientInputSender inputSender))
+ if (Parent.TryGetComponent(out ClientInputSender inputSender))
{
inputSender.ActionInputEvent += OnActionInput;
inputSender.ClientMoveEvent += OnMoveInput;
@@ -159,9 +147,9 @@ private void OnActionInput(ActionRequestData data)
private void OnMoveInput(Vector3 position)
{
- if( !IsAnimating )
+ if (!IsAnimating)
{
- OurAnimator.SetTrigger(m_AnticipateMoveTriggerID);
+ OurAnimator.SetTrigger(m_VisualizationConfiguration.AnticipateMoveTriggerID);
}
}
@@ -175,10 +163,10 @@ void SyncEntryAnimation(LifeState lifeState)
switch (lifeState)
{
case LifeState.Dead: // ie. NPCs already dead
- m_ClientVisualsAnimator.SetTrigger(m_EntryDeathTriggerID);
+ m_ClientVisualsAnimator.SetTrigger(m_VisualizationConfiguration.EntryDeathTriggerID);
break;
case LifeState.Fainted: // ie. PCs already fainted
- m_ClientVisualsAnimator.SetTrigger(m_EntryFaintedTriggerID);
+ m_ClientVisualsAnimator.SetTrigger(m_VisualizationConfiguration.EntryFaintedTriggerID);
break;
}
}
@@ -234,13 +222,13 @@ private void OnLifeStateChanged(LifeState previousValue, LifeState newValue)
switch (newValue)
{
case LifeState.Alive:
- m_ClientVisualsAnimator.SetTrigger(m_AliveStateTriggerID);
+ m_ClientVisualsAnimator.SetTrigger(m_VisualizationConfiguration.AliveStateTriggerID);
break;
case LifeState.Fainted:
- m_ClientVisualsAnimator.SetTrigger(m_FaintedStateTriggerID);
+ m_ClientVisualsAnimator.SetTrigger(m_VisualizationConfiguration.FaintedStateTriggerID);
break;
case LifeState.Dead:
- m_ClientVisualsAnimator.SetTrigger(m_DeadStateTriggerID);
+ m_ClientVisualsAnimator.SetTrigger(m_VisualizationConfiguration.DeadStateTriggerID);
break;
default:
throw new ArgumentOutOfRangeException(nameof(newValue), newValue, null);
@@ -294,50 +282,31 @@ private void SetAppearanceSwap()
}
///
- /// Returns the value we should set the Animator's "Speed" variable, which has the following range
- /// (as configured in the AnimatorController's blend tree):
- /// 0 = idle
- /// 0.5 = walking
- /// 1 = sprinting
- /// 1.5 = fast-sprinting
- /// 2 = comically fast-sprinting.
- ///
- ///
- /// Values in between these positions will be blended by the animator controller (e.g. a value of .75 is animated
- /// as something between a walk and a run), but because we have footstep clips at specific speeds, we prefer to use
- /// the specific animation-speeds that line up with the footsteps: 0.5 = walking footsteps, 1.0 = running footsteps.
- /// Higher than 1 = no footsteps at all (at present).
- ///
- /// This is why we don't try to determine the character's "normal" speed ourselves (by dividing their current speed in
- /// m_NetState.NetworkMovementSpeed with the character class's base movement speed). Doing so could give us more precise
- /// footsteps when the character's speed is buffed an arbitrary amount (e.g. a 10% speed buff would make the legs move
- /// 10% faster)... but at the cost of the footstep sounds being misaligned.
- ///
- /// For a cartoony-styled game, it works out better to just rely on what the server says we're doing
- /// (as represented by NetworkLifeState and MovementStatus values).
+ /// Returns the value we should set the Animator's "Speed" variable, given current
+ /// gameplay conditions.
///
- /// speed value, between 0 and 2
private float GetVisualMovementSpeed()
{
+ Assert.IsNotNull(m_VisualizationConfiguration);
if (m_NetState.NetworkLifeState.Value != LifeState.Alive)
{
- return 0;
+ return m_VisualizationConfiguration.SpeedDead;
}
switch (m_NetState.MovementStatus.Value)
{
case MovementStatus.Idle:
- return 0;
+ return m_VisualizationConfiguration.SpeedIdle;
case MovementStatus.Normal:
- return 1;
+ return m_VisualizationConfiguration.SpeedNormal;
case MovementStatus.Uncontrolled:
- return 0; // don't move legs at all -- the character seems to slide haplessly across the ground
+ return m_VisualizationConfiguration.SpeedUncontrolled;
case MovementStatus.Slowed:
- return 2f; // comical over-exaggeration. The idea is the character is struggling to move at all, so their legs are going fast even though they are moving slowly. (Could also use 0.5 to have the slowed character just walk.)
+ return m_VisualizationConfiguration.SpeedSlowed;
case MovementStatus.Hasted:
- return 1.5f;
+ return m_VisualizationConfiguration.SpeedHasted;
case MovementStatus.Walking:
- return 0.5f;
+ return m_VisualizationConfiguration.SpeedWalking;
default:
throw new Exception($"Unknown MovementStatus {m_NetState.MovementStatus.Value}");
}
@@ -357,7 +326,7 @@ void Update()
if (m_ClientVisualsAnimator)
{
// set Animator variables here
- m_ClientVisualsAnimator.SetFloat(m_SpeedVariableID, GetVisualMovementSpeed());
+ m_ClientVisualsAnimator.SetFloat(m_VisualizationConfiguration.SpeedVariableID, GetVisualMovementSpeed());
}
m_ActionViz.Update();
@@ -376,11 +345,11 @@ public bool IsAnimating
{
get
{
- if( OurAnimator.GetFloat(m_SpeedVariableID) > 0.0 ) { return true; }
+ if (OurAnimator.GetFloat(m_VisualizationConfiguration.SpeedVariableID) > 0.0) { return true; }
for( int i = 0; i < OurAnimator.layerCount; i++ )
{
- if (OurAnimator.GetCurrentAnimatorStateInfo(i).tagHash != m_BaseNodeTagID)
+ if (OurAnimator.GetCurrentAnimatorStateInfo(i).tagHash != m_VisualizationConfiguration.BaseNodeTagID)
{
//we are in an active node, not the default "nothing" node.
return true;
diff --git a/Assets/BossRoom/Scripts/Shared/ScriptableObjects/VisualizationConfiguration.cs b/Assets/BossRoom/Scripts/Shared/ScriptableObjects/VisualizationConfiguration.cs
new file mode 100644
index 000000000..4fde63b93
--- /dev/null
+++ b/Assets/BossRoom/Scripts/Shared/ScriptableObjects/VisualizationConfiguration.cs
@@ -0,0 +1,72 @@
+using UnityEngine;
+
+namespace BossRoom
+{
+ ///
+ /// Describes how a specific character visualization should be animated.
+ ///
+ [CreateAssetMenu]
+ public class VisualizationConfiguration : ScriptableObject
+ {
+ [Header("Animation Triggers")]
+ [Tooltip("Trigger for when a player character is resurrected")]
+ [SerializeField] private string AliveStateTrigger = "StandUp";
+ [Tooltip("Trigger for when a player-character using this visualization becomes incapacitated")]
+ [SerializeField] private string FaintedStateTrigger = "FallDown";
+ [Tooltip("Trigger for when a monster using this visualization becomes dead")]
+ [SerializeField] private string DeadStateTrigger = "Dead";
+ [Tooltip("Trigger for when we expect to start moving very soon (to play a short animation in anticipation of moving soon)")]
+ [SerializeField] private string AnticipateMoveTrigger = "AnticipateMove";
+ [Tooltip("Trigger for when a new character joins the game and we are already a dead monster")]
+ [SerializeField] private string EntryDeathTrigger = "EntryDeath";
+ [Tooltip("Trigger for when a new character joins the game and we are already an incapacitated player")]
+ [SerializeField] private string EntryFaintedTrigger = "EntryFainted";
+
+ [Header("Other Animation Variables")]
+ [Tooltip("Variable that drives the character's movement animations")]
+ [SerializeField] private string SpeedVariable = "Speed";
+ [Tooltip("Tag that should be on the \"do nothing\" default nodes of each animator layer")]
+ [SerializeField] private string BaseNodeTag = "BaseNode";
+
+ [Header("Animation Speeds")]
+ [Tooltip("The animator Speed value when character is dead")]
+ public float SpeedDead = 0;
+ [Tooltip("The animator Speed value when character is standing idle")]
+ public float SpeedIdle = 0;
+ [Tooltip("The animator Speed value when character is moving normally")]
+ public float SpeedNormal = 1;
+ [Tooltip("The animator Speed value when character is being pushed or knocked back")]
+ public float SpeedUncontrolled = 0; // no leg movement; character appears to be sliding helplessly
+ [Tooltip("The animator Speed value when character is magically slowed")]
+ public float SpeedSlowed = 2; // hyper leg movement (character appears to be working very hard to move very little)
+ [Tooltip("The animator Speed value when character is magically hasted")]
+ public float SpeedHasted = 1.5f;
+ [Tooltip("The animator Speed value when character is moving at a slower walking pace")]
+ public float SpeedWalking = 0.5f;
+
+ // These are maintained by our OnValidate(). Code refers to these hashed values, not the string versions!
+ [SerializeField] [HideInInspector] public int AliveStateTriggerID;
+ [SerializeField] [HideInInspector] public int FaintedStateTriggerID;
+ [SerializeField] [HideInInspector] public int DeadStateTriggerID;
+ [SerializeField] [HideInInspector] public int AnticipateMoveTriggerID;
+ [SerializeField] [HideInInspector] public int EntryDeathTriggerID;
+ [SerializeField] [HideInInspector] public int EntryFaintedTriggerID;
+ [SerializeField] [HideInInspector] public int SpeedVariableID;
+ [SerializeField] [HideInInspector] public int BaseNodeTagID;
+
+#if UNITY_EDITOR
+ void OnValidate()
+ {
+ AliveStateTriggerID = Animator.StringToHash(AliveStateTrigger);
+ FaintedStateTriggerID = Animator.StringToHash(FaintedStateTrigger);
+ DeadStateTriggerID = Animator.StringToHash(DeadStateTrigger);
+ AnticipateMoveTriggerID = Animator.StringToHash(AnticipateMoveTrigger);
+ EntryDeathTriggerID = Animator.StringToHash(EntryDeathTrigger);
+ EntryFaintedTriggerID = Animator.StringToHash(EntryFaintedTrigger);
+
+ SpeedVariableID = Animator.StringToHash(SpeedVariable);
+ BaseNodeTagID = Animator.StringToHash(BaseNodeTag);
+ }
+#endif
+ }
+}
diff --git a/Assets/BossRoom/Scripts/Shared/ScriptableObjects/VisualizationConfiguration.cs.meta b/Assets/BossRoom/Scripts/Shared/ScriptableObjects/VisualizationConfiguration.cs.meta
new file mode 100644
index 000000000..7bbac087f
--- /dev/null
+++ b/Assets/BossRoom/Scripts/Shared/ScriptableObjects/VisualizationConfiguration.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 47d9899c7898a3b48a011f9f8c2a123e
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
From e7597e353917aa296dc3b992fcaf5cd5fdbc1d5d Mon Sep 17 00:00:00 2001
From: eheimburg <74330250+eheimburg@users.noreply.github.com>
Date: Mon, 19 Apr 2021 07:53:29 -0400
Subject: [PATCH 7/9] move some more variables out of
ClientCharacterVisualization and into VisualizationConfiguration
Clustered public pseudo-vars (getters) in the same place at top of class, after serialized vars and before private vars
---
.../SharedVisualizationConfiguration.asset | 4 +-
.../Client/Game/Action/TargetActionFX.cs | 2 +-
.../Character/ClientCharacterVisualization.cs | 43 ++++++++++++-------
.../VisualizationConfiguration.cs | 11 +++++
4 files changed, 42 insertions(+), 18 deletions(-)
diff --git a/Assets/BossRoom/GameData/Shared/SharedVisualizationConfiguration.asset b/Assets/BossRoom/GameData/Shared/SharedVisualizationConfiguration.asset
index 7a0621624..9b5be7786 100644
--- a/Assets/BossRoom/GameData/Shared/SharedVisualizationConfiguration.asset
+++ b/Assets/BossRoom/GameData/Shared/SharedVisualizationConfiguration.asset
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:1adeee0dc4a84fb2e2fb884963191a8795f615b588a33ee9c890ae33ee78ce74
-size 1056
+oid sha256:c279578320b0f0a04c4df3e8a53a82d0bc75b9634f4d2fbfc21c85e9d1758c5e
+size 1332
diff --git a/Assets/BossRoom/Scripts/Client/Game/Action/TargetActionFX.cs b/Assets/BossRoom/Scripts/Client/Game/Action/TargetActionFX.cs
index bb6a94f28..7429dc83b 100644
--- a/Assets/BossRoom/Scripts/Client/Game/Action/TargetActionFX.cs
+++ b/Assets/BossRoom/Scripts/Client/Game/Action/TargetActionFX.cs
@@ -95,7 +95,7 @@ private void ValidateReticule(NetworkObject targetObject)
{
if( m_TargetReticule == null )
{
- m_TargetReticule = Object.Instantiate(m_Parent.TargetReticule);
+ m_TargetReticule = Object.Instantiate(m_Parent.TargetReticulePrefab);
}
bool target_isnpc = targetObject.GetComponent().IsNpc;
diff --git a/Assets/BossRoom/Scripts/Client/Game/Character/ClientCharacterVisualization.cs b/Assets/BossRoom/Scripts/Client/Game/Character/ClientCharacterVisualization.cs
index 4bf0394ca..9e2763bd8 100644
--- a/Assets/BossRoom/Scripts/Client/Game/Character/ClientCharacterVisualization.cs
+++ b/Assets/BossRoom/Scripts/Client/Game/Character/ClientCharacterVisualization.cs
@@ -13,8 +13,6 @@ namespace BossRoom.Visual
///
public class ClientCharacterVisualization : NetworkBehaviour
{
- private NetworkCharacterState m_NetState;
-
[SerializeField]
private Animator m_ClientVisualsAnimator;
@@ -24,34 +22,49 @@ public class ClientCharacterVisualization : NetworkBehaviour
[SerializeField]
private VisualizationConfiguration m_VisualizationConfiguration;
- [Tooltip("Prefab for the Target Reticule used by this Character")]
- public GameObject TargetReticule;
-
- [Tooltip("Material to use when displaying a friendly target reticule (e.g. green color)")]
- public Material ReticuleFriendlyMat;
+ ///
+ /// Returns a reference to the active Animator for this visualization
+ ///
+ public Animator OurAnimator { get { return m_ClientVisualsAnimator; } }
- [Tooltip("Material to use when displaying a hostile target reticule (e.g. red color)")]
- public Material ReticuleHostileMat;
+ ///
+ /// Returns the targeting-reticule prefab for this character visualization
+ ///
+ public GameObject TargetReticulePrefab { get { return m_VisualizationConfiguration.TargetReticule; } }
- public Animator OurAnimator { get { return m_ClientVisualsAnimator; } }
+ ///
+ /// Returns the Material to plug into the reticule when the selected entity is hostile
+ ///
+ public Material ReticuleHostileMat { get { return m_VisualizationConfiguration.ReticuleHostileMat; } }
- private ActionVisualization m_ActionViz;
+ ///
+ /// Returns the Material to plug into the reticule when the selected entity is friendly
+ ///
+ public Material ReticuleFriendlyMat { get { return m_VisualizationConfiguration.ReticuleFriendlyMat; } }
+ ///
+ /// Returns our pseudo-Parent, the object that owns the visualization.
+ /// (We don't have an actual transform parent because we're on a top-level GameObject.)
+ ///
public Transform Parent { get; private set; }
+ public bool CanPerformActions { get { return m_NetState.CanPerformActions; } }
+
+ private NetworkCharacterState m_NetState;
+
+ private ActionVisualization m_ActionViz;
+
private const float k_MaxRotSpeed = 280; //max angular speed at which we will rotate, in degrees/second.
/// Player characters need to report health changes and chracter info to the PartyHUD
- private PartyHUD m_PartyHUD;
+ PartyHUD m_PartyHUD;
- private float m_SmoothedSpeed;
+ float m_SmoothedSpeed;
int m_HitStateTriggerID;
event Action Destroyed;
- public bool CanPerformActions { get { return m_NetState.CanPerformActions; } }
-
///
public override void NetworkStart()
{
diff --git a/Assets/BossRoom/Scripts/Shared/ScriptableObjects/VisualizationConfiguration.cs b/Assets/BossRoom/Scripts/Shared/ScriptableObjects/VisualizationConfiguration.cs
index 4fde63b93..e4ce21c0c 100644
--- a/Assets/BossRoom/Scripts/Shared/ScriptableObjects/VisualizationConfiguration.cs
+++ b/Assets/BossRoom/Scripts/Shared/ScriptableObjects/VisualizationConfiguration.cs
@@ -44,6 +44,17 @@ public class VisualizationConfiguration : ScriptableObject
[Tooltip("The animator Speed value when character is moving at a slower walking pace")]
public float SpeedWalking = 0.5f;
+ [Header("Associated Resources")]
+ [Tooltip("Prefab for the Target Reticule used by this Character")]
+ public GameObject TargetReticule;
+
+ [Tooltip("Material to use when displaying a friendly target reticule (e.g. green color)")]
+ public Material ReticuleFriendlyMat;
+
+ [Tooltip("Material to use when displaying a hostile target reticule (e.g. red color)")]
+ public Material ReticuleHostileMat;
+
+
// These are maintained by our OnValidate(). Code refers to these hashed values, not the string versions!
[SerializeField] [HideInInspector] public int AliveStateTriggerID;
[SerializeField] [HideInInspector] public int FaintedStateTriggerID;
From 184f982d83274ab0c3942f4989d2ebb85c2f67f8 Mon Sep 17 00:00:00 2001
From: eheimburg <74330250+eheimburg@users.noreply.github.com>
Date: Mon, 19 Apr 2021 08:02:17 -0400
Subject: [PATCH 8/9] more cleanup of ClientCharacterVisualization
---
.../Client/Game/Action/ActionVisualization.cs | 2 +-
.../Character/ClientCharacterVisualization.cs | 23 ++++++++-----------
2 files changed, 11 insertions(+), 14 deletions(-)
diff --git a/Assets/BossRoom/Scripts/Client/Game/Action/ActionVisualization.cs b/Assets/BossRoom/Scripts/Client/Game/Action/ActionVisualization.cs
index dabf0fcbc..c095d6e5f 100644
--- a/Assets/BossRoom/Scripts/Client/Game/Action/ActionVisualization.cs
+++ b/Assets/BossRoom/Scripts/Client/Game/Action/ActionVisualization.cs
@@ -102,7 +102,7 @@ public void OnStoppedChargingUp()
/// The Action that is being requested.
public void AnticipateAction(ref ActionRequestData data)
{
- if (!Parent.IsAnimating && ActionFX.ShouldAnticipate(this, ref data))
+ if (!Parent.IsAnimating() && ActionFX.ShouldAnticipate(this, ref data))
{
var actionFX = ActionFX.MakeActionFX(ref data, Parent);
actionFX.AnticipateAction();
diff --git a/Assets/BossRoom/Scripts/Client/Game/Character/ClientCharacterVisualization.cs b/Assets/BossRoom/Scripts/Client/Game/Character/ClientCharacterVisualization.cs
index 9e2763bd8..375823640 100644
--- a/Assets/BossRoom/Scripts/Client/Game/Character/ClientCharacterVisualization.cs
+++ b/Assets/BossRoom/Scripts/Client/Game/Character/ClientCharacterVisualization.cs
@@ -160,7 +160,7 @@ private void OnActionInput(ActionRequestData data)
private void OnMoveInput(Vector3 position)
{
- if (!IsAnimating)
+ if (!IsAnimating())
{
OurAnimator.SetTrigger(m_VisualizationConfiguration.AnticipateMoveTriggerID);
}
@@ -354,23 +354,20 @@ public void OnAnimEvent(string id)
m_ActionViz.OnAnimEvent(id);
}
- public bool IsAnimating
+ public bool IsAnimating()
{
- get
- {
- if (OurAnimator.GetFloat(m_VisualizationConfiguration.SpeedVariableID) > 0.0) { return true; }
+ if (OurAnimator.GetFloat(m_VisualizationConfiguration.SpeedVariableID) > 0.0) { return true; }
- for( int i = 0; i < OurAnimator.layerCount; i++ )
+ for (int i = 0; i < OurAnimator.layerCount; i++)
+ {
+ if (OurAnimator.GetCurrentAnimatorStateInfo(i).tagHash != m_VisualizationConfiguration.BaseNodeTagID)
{
- if (OurAnimator.GetCurrentAnimatorStateInfo(i).tagHash != m_VisualizationConfiguration.BaseNodeTagID)
- {
- //we are in an active node, not the default "nothing" node.
- return true;
- }
+ //we are in an active node, not the default "nothing" node.
+ return true;
}
-
- return false;
}
+
+ return false;
}
}
}
From 76e5093fb75335a8751293612af7058c82c4ac9b Mon Sep 17 00:00:00 2001
From: eheimburg <74330250+eheimburg@users.noreply.github.com>
Date: Tue, 20 Apr 2021 03:08:21 -0400
Subject: [PATCH 9/9] fix variable naming convention, remove #if
---
.../SharedVisualizationConfiguration.asset | 4 +--
.../VisualizationConfiguration.cs | 34 +++++++++----------
2 files changed, 18 insertions(+), 20 deletions(-)
diff --git a/Assets/BossRoom/GameData/Shared/SharedVisualizationConfiguration.asset b/Assets/BossRoom/GameData/Shared/SharedVisualizationConfiguration.asset
index 9b5be7786..e35bb3d46 100644
--- a/Assets/BossRoom/GameData/Shared/SharedVisualizationConfiguration.asset
+++ b/Assets/BossRoom/GameData/Shared/SharedVisualizationConfiguration.asset
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:c279578320b0f0a04c4df3e8a53a82d0bc75b9634f4d2fbfc21c85e9d1758c5e
-size 1332
+oid sha256:a51d0e32207e798331f880e3a4344c614307a9a9ce46f3d32b502e57a1280de1
+size 1348
diff --git a/Assets/BossRoom/Scripts/Shared/ScriptableObjects/VisualizationConfiguration.cs b/Assets/BossRoom/Scripts/Shared/ScriptableObjects/VisualizationConfiguration.cs
index e4ce21c0c..7d478cba2 100644
--- a/Assets/BossRoom/Scripts/Shared/ScriptableObjects/VisualizationConfiguration.cs
+++ b/Assets/BossRoom/Scripts/Shared/ScriptableObjects/VisualizationConfiguration.cs
@@ -10,23 +10,23 @@ public class VisualizationConfiguration : ScriptableObject
{
[Header("Animation Triggers")]
[Tooltip("Trigger for when a player character is resurrected")]
- [SerializeField] private string AliveStateTrigger = "StandUp";
+ [SerializeField] string m_AliveStateTrigger = "StandUp";
[Tooltip("Trigger for when a player-character using this visualization becomes incapacitated")]
- [SerializeField] private string FaintedStateTrigger = "FallDown";
+ [SerializeField] string m_FaintedStateTrigger = "FallDown";
[Tooltip("Trigger for when a monster using this visualization becomes dead")]
- [SerializeField] private string DeadStateTrigger = "Dead";
+ [SerializeField] string m_DeadStateTrigger = "Dead";
[Tooltip("Trigger for when we expect to start moving very soon (to play a short animation in anticipation of moving soon)")]
- [SerializeField] private string AnticipateMoveTrigger = "AnticipateMove";
+ [SerializeField] string m_AnticipateMoveTrigger = "AnticipateMove";
[Tooltip("Trigger for when a new character joins the game and we are already a dead monster")]
- [SerializeField] private string EntryDeathTrigger = "EntryDeath";
+ [SerializeField] string m_EntryDeathTrigger = "EntryDeath";
[Tooltip("Trigger for when a new character joins the game and we are already an incapacitated player")]
- [SerializeField] private string EntryFaintedTrigger = "EntryFainted";
+ [SerializeField] string m_EntryFaintedTrigger = "EntryFainted";
[Header("Other Animation Variables")]
[Tooltip("Variable that drives the character's movement animations")]
- [SerializeField] private string SpeedVariable = "Speed";
+ [SerializeField] string m_SpeedVariable = "Speed";
[Tooltip("Tag that should be on the \"do nothing\" default nodes of each animator layer")]
- [SerializeField] private string BaseNodeTag = "BaseNode";
+ [SerializeField] string m_BaseNodeTag = "BaseNode";
[Header("Animation Speeds")]
[Tooltip("The animator Speed value when character is dead")]
@@ -65,19 +65,17 @@ public class VisualizationConfiguration : ScriptableObject
[SerializeField] [HideInInspector] public int SpeedVariableID;
[SerializeField] [HideInInspector] public int BaseNodeTagID;
-#if UNITY_EDITOR
void OnValidate()
{
- AliveStateTriggerID = Animator.StringToHash(AliveStateTrigger);
- FaintedStateTriggerID = Animator.StringToHash(FaintedStateTrigger);
- DeadStateTriggerID = Animator.StringToHash(DeadStateTrigger);
- AnticipateMoveTriggerID = Animator.StringToHash(AnticipateMoveTrigger);
- EntryDeathTriggerID = Animator.StringToHash(EntryDeathTrigger);
- EntryFaintedTriggerID = Animator.StringToHash(EntryFaintedTrigger);
+ AliveStateTriggerID = Animator.StringToHash(m_AliveStateTrigger);
+ FaintedStateTriggerID = Animator.StringToHash(m_FaintedStateTrigger);
+ DeadStateTriggerID = Animator.StringToHash(m_DeadStateTrigger);
+ AnticipateMoveTriggerID = Animator.StringToHash(m_AnticipateMoveTrigger);
+ EntryDeathTriggerID = Animator.StringToHash(m_EntryDeathTrigger);
+ EntryFaintedTriggerID = Animator.StringToHash(m_EntryFaintedTrigger);
- SpeedVariableID = Animator.StringToHash(SpeedVariable);
- BaseNodeTagID = Animator.StringToHash(BaseNodeTag);
+ SpeedVariableID = Animator.StringToHash(m_SpeedVariable);
+ BaseNodeTagID = Animator.StringToHash(m_BaseNodeTag);
}
-#endif
}
}