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/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..e35bb3d46
--- /dev/null
+++ b/Assets/BossRoom/GameData/Shared/SharedVisualizationConfiguration.asset
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a51d0e32207e798331f880e3a4344c614307a9a9ce46f3d32b502e57a1280de1
+size 1348
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/Models/Animation Controllers/CharacterSetController.controller b/Assets/BossRoom/Models/Animation Controllers/CharacterSetController.controller
index 4b31eb6af..a744f254c 100644
--- a/Assets/BossRoom/Models/Animation Controllers/CharacterSetController.controller
+++ b/Assets/BossRoom/Models/Animation Controllers/CharacterSetController.controller
@@ -82,10 +82,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/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 b2066a46c..aac4ccf57 100644
--- a/Assets/BossRoom/Prefabs/CharGFX/ImpGraphics.prefab
+++ b/Assets/BossRoom/Prefabs/CharGFX/ImpGraphics.prefab
@@ -1133,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}
@@ -1468,8 +1469,9 @@ MonoBehaviour:
m_WalkFootstepVolume: 0.8
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
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/AnimationCallbacks/AnimatorFootstepSounds.cs b/Assets/BossRoom/Scripts/Client/AnimationCallbacks/AnimatorFootstepSounds.cs
index dfa2fbdbf..f71066cbe 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 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
{
@@ -49,12 +51,16 @@ public class AnimatorFootstepSounds : MonoBehaviour
private float m_RunFootstepVolume = 1;
[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;
+ [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 walking sounds to no sounds? From 0 (stationary) to 1 (full sprint)")]
- private float m_SilentPoint = 0.3f;
+ [Tooltip("If the speed variable is between TooSlowThreshold and this, we're walking")]
+ private float m_WalkSpeedThreshold = 0.6f;
+
+ [SerializeField]
+ [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()
{
@@ -69,20 +75,25 @@ 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
+ else if (speed <= m_RunSpeedThreshold)
{
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/Action/ActionVisualization.cs b/Assets/BossRoom/Scripts/Client/Game/Action/ActionVisualization.cs
index 357680e5e..cc652dbaa 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(float finalChargeUpPercentage)
/// 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/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 23793453e..0e77eec71 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
{
@@ -12,47 +13,58 @@ namespace BossRoom.Visual
///
public class ClientCharacterVisualization : NetworkBehaviour
{
- private NetworkCharacterState m_NetState;
-
[SerializeField]
private Animator m_ClientVisualsAnimator;
[SerializeField]
private CharacterSwap m_CharacterSwapper;
- [Tooltip("Prefab for the Target Reticule used by this Character")]
- public GameObject TargetReticule;
+ [SerializeField]
+ private VisualizationConfiguration m_VisualizationConfiguration;
- [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_AliveStateTriggerID;
- int m_FaintedStateTriggerID;
- int m_DeadStateTriggerID;
int m_HitStateTriggerID;
- int m_AnticipateMoveTriggerID;
- int m_SpeedVariableID;
event Action Destroyed;
- public bool CanPerformActions { get { return m_NetState.CanPerformActions; } }
-
///
public override void NetworkStart()
{
@@ -62,11 +74,6 @@ 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_ActionViz = new ActionVisualization(this);
@@ -120,7 +127,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;
@@ -153,9 +160,9 @@ private void OnActionInput(ActionRequestData data)
private void OnMoveInput(Vector3 position)
{
- if( !IsAnimating )
+ if (!IsAnimating())
{
- OurAnimator.SetTrigger(m_AnticipateMoveTriggerID);
+ OurAnimator.SetTrigger(m_VisualizationConfiguration.AnticipateMoveTriggerID);
}
}
@@ -169,10 +176,10 @@ void SyncEntryAnimation(LifeState lifeState)
switch (lifeState)
{
case LifeState.Dead: // ie. NPCs already dead
- m_ClientVisualsAnimator.SetTrigger(Animator.StringToHash("EntryDeath"));
+ m_ClientVisualsAnimator.SetTrigger(m_VisualizationConfiguration.EntryDeathTriggerID);
break;
case LifeState.Fainted: // ie. PCs already fainted
- m_ClientVisualsAnimator.SetTrigger(Animator.StringToHash("EntryFainted"));
+ m_ClientVisualsAnimator.SetTrigger(m_VisualizationConfiguration.EntryFaintedTriggerID);
break;
}
}
@@ -228,13 +235,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);
@@ -287,6 +294,37 @@ private void SetAppearanceSwap()
}
}
+ ///
+ /// Returns the value we should set the Animator's "Speed" variable, given current
+ /// gameplay conditions.
+ ///
+ private float GetVisualMovementSpeed()
+ {
+ Assert.IsNotNull(m_VisualizationConfiguration);
+ if (m_NetState.NetworkLifeState.Value != LifeState.Alive)
+ {
+ return m_VisualizationConfiguration.SpeedDead;
+ }
+
+ switch (m_NetState.MovementStatus.Value)
+ {
+ case MovementStatus.Idle:
+ return m_VisualizationConfiguration.SpeedIdle;
+ case MovementStatus.Normal:
+ return m_VisualizationConfiguration.SpeedNormal;
+ case MovementStatus.Uncontrolled:
+ return m_VisualizationConfiguration.SpeedUncontrolled;
+ case MovementStatus.Slowed:
+ return m_VisualizationConfiguration.SpeedSlowed;
+ case MovementStatus.Hasted:
+ return m_VisualizationConfiguration.SpeedHasted;
+ case MovementStatus.Walking:
+ return m_VisualizationConfiguration.SpeedWalking;
+ default:
+ throw new Exception($"Unknown MovementStatus {m_NetState.MovementStatus.Value}");
+ }
+ }
+
void Update()
{
if (Parent == null)
@@ -301,12 +339,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(m_VisualizationConfiguration.SpeedVariableID, GetVisualMovementSpeed());
}
m_ActionViz.Update();
@@ -321,23 +354,20 @@ public void OnAnimEvent(string id)
m_ActionViz.OnAnimEvent(id);
}
- public bool IsAnimating
+ 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++ )
+ for (int i = 0; i < OurAnimator.layerCount; i++)
+ {
+ if (OurAnimator.GetCurrentAnimatorStateInfo(i).tagHash != m_VisualizationConfiguration.BaseNodeTagID)
{
- if (!OurAnimator.GetCurrentAnimatorStateInfo(i).IsTag("BaseNode"))
- {
- //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;
}
}
}
diff --git a/Assets/BossRoom/Scripts/Server/Game/Character/ServerCharacterMovement.cs b/Assets/BossRoom/Scripts/Server/Game/Character/ServerCharacterMovement.cs
index 86cf5a3f0..1564d2843 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,38 @@ 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()
+ ///
+ /// 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;
+ }
+
+ ///
+ /// 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)
+ {
+ 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 c747c708e..05658b1c0 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).
diff --git a/Assets/BossRoom/Scripts/Shared/ScriptableObjects/VisualizationConfiguration.cs b/Assets/BossRoom/Scripts/Shared/ScriptableObjects/VisualizationConfiguration.cs
new file mode 100644
index 000000000..7d478cba2
--- /dev/null
+++ b/Assets/BossRoom/Scripts/Shared/ScriptableObjects/VisualizationConfiguration.cs
@@ -0,0 +1,81 @@
+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] string m_AliveStateTrigger = "StandUp";
+ [Tooltip("Trigger for when a player-character using this visualization becomes incapacitated")]
+ [SerializeField] string m_FaintedStateTrigger = "FallDown";
+ [Tooltip("Trigger for when a monster using this visualization becomes 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] string m_AnticipateMoveTrigger = "AnticipateMove";
+ [Tooltip("Trigger for when a new character joins the game and we are already a dead monster")]
+ [SerializeField] string m_EntryDeathTrigger = "EntryDeath";
+ [Tooltip("Trigger for when a new character joins the game and we are already an incapacitated player")]
+ [SerializeField] string m_EntryFaintedTrigger = "EntryFainted";
+
+ [Header("Other Animation Variables")]
+ [Tooltip("Variable that drives the character's movement animations")]
+ [SerializeField] string m_SpeedVariable = "Speed";
+ [Tooltip("Tag that should be on the \"do nothing\" default nodes of each animator layer")]
+ [SerializeField] string m_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;
+
+ [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;
+ [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;
+
+ void OnValidate()
+ {
+ 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(m_SpeedVariable);
+ BaseNodeTagID = Animator.StringToHash(m_BaseNodeTag);
+ }
+ }
+}
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: