Skip to content

Commit 80b1d14

Browse files
authored
feat: structure refactor (3) gameplay and infrastructure cleanup [MTT-2623] (#674)
* Infrastructure and Gameplay folder and assembly refactor * added reference to utils asmdef from applicationcontroller.asmdef
1 parent 04bf923 commit 80b1d14

File tree

282 files changed

+110
-249
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

282 files changed

+110
-249
lines changed

Assets/Scripts/ApplicationLifecycle/Unity.BossRoom.ApplicationLifecycle.asmdef

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"GUID:e3abc1ceb6eae4836a8ff106702e66e5",
99
"GUID:1491147abca9d7d4bb7105af628b223e",
1010
"GUID:e0cd26848372d4e5c891c569017e11f1",
11-
"GUID:e9e5562f77c754b2ca364915385b3d43"
11+
"GUID:e9e5562f77c754b2ca364915385b3d43",
12+
"GUID:59b3bd604d0445f583783872c3e648fc"
1213
],
1314
"includePlatforms": [],
1415
"excludePlatforms": [],
@@ -19,4 +20,4 @@
1920
"defineConstraints": [],
2021
"versionDefines": [],
2122
"noEngineReferences": false
22-
}
23+
}
Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11
{
2-
"name": "Unity.BossRoom.Audio",
3-
"references":[ "GUID:ec2e12d3de28e40839f9a0b685184f49" ]
4-
}
2+
"name": "Unity.BossRoom.Audio",
3+
"rootNamespace": "",
4+
"references": [
5+
"GUID:59b3bd604d0445f583783872c3e648fc"
6+
],
7+
"includePlatforms": [],
8+
"excludePlatforms": [],
9+
"allowUnsafeCode": false,
10+
"overrideReferences": false,
11+
"precompiledReferences": [],
12+
"autoReferenced": true,
13+
"defineConstraints": [],
14+
"versionDefines": [],
15+
"noEngineReferences": false
16+
}

Assets/Scripts/Gameplay/Client/NetworkedEntities/Character.meta

Lines changed: 0 additions & 8 deletions
This file was deleted.

Assets/Scripts/Gameplay/Client/State.meta

Lines changed: 0 additions & 8 deletions
This file was deleted.

Assets/Scripts/Gameplay/Client.meta renamed to Assets/Scripts/Gameplay/GameplayObjects/Character/AI.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Scripts/Gameplay/Client/Action.meta renamed to Assets/Scripts/Gameplay/GameplayObjects/RuntimeDataContainers.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Scripts/Gameplay/Client/Data.meta renamed to Assets/Scripts/Gameplay/Input.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Scripts/Gameplay/Client/NetworkedEntities.meta renamed to Assets/Scripts/Gameplay/Messages.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Scripts/Gameplay/Server.meta

Lines changed: 0 additions & 8 deletions
This file was deleted.

Assets/Scripts/Gameplay/Server/AIState.meta

Lines changed: 0 additions & 8 deletions
This file was deleted.

Assets/Scripts/Gameplay/Server/NetworkedEntities/RaiseEventOnLifeChange.cs

Lines changed: 0 additions & 48 deletions
This file was deleted.

Assets/Scripts/Gameplay/Server/NetworkedEntities/RaiseEventOnLifeChange.cs.meta

Lines changed: 0 additions & 11 deletions
This file was deleted.

Assets/Scripts/Gameplay/Shared.meta

Lines changed: 0 additions & 8 deletions
This file was deleted.

Assets/Scripts/Gameplay/Shared/Action.meta

Lines changed: 0 additions & 8 deletions
This file was deleted.

Assets/Scripts/Gameplay/Shared/NetworkedEntities.meta

Lines changed: 0 additions & 8 deletions
This file was deleted.

Assets/Scripts/Gameplay/Shared/ScriptableObjects.meta

Lines changed: 0 additions & 8 deletions
This file was deleted.

Assets/Scripts/Gameplay/Shared/State.meta

Lines changed: 0 additions & 8 deletions
This file was deleted.

Assets/Scripts/Gameplay/Unity.BossRoom.Gameplay.asmdef

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
"GUID:f9a1f64e21cf44ebd850a08ad9afa8fe",
1818
"GUID:5ed68ed74b4874cce9e11f74a1f5e9ae",
1919
"GUID:b44ecd51ecea1474ebbb97f7d7c7cf81",
20-
"GUID:e9e5562f77c754b2ca364915385b3d43"
20+
"GUID:e9e5562f77c754b2ca364915385b3d43",
21+
"GUID:59b3bd604d0445f583783872c3e648fc"
2122
],
2223
"includePlatforms": [],
2324
"excludePlatforms": [],
@@ -28,4 +29,4 @@
2829
"defineConstraints": [],
2930
"versionDefines": [],
3031
"noEngineReferences": false
31-
}
32+
}

Assets/Scripts/Infrastructure/Development.meta

Lines changed: 0 additions & 8 deletions
This file was deleted.

Assets/Scripts/Infrastructure/Development/NetworkingManagerHUD.cs

Lines changed: 0 additions & 38 deletions
This file was deleted.

Assets/Scripts/Infrastructure/Development/NetworkingManagerHUD.cs.meta

Lines changed: 0 additions & 11 deletions
This file was deleted.

Assets/Scripts/Infrastructure/Editor/Unity.BossRoom.Infrastructure.Editor.asmdef renamed to Assets/Scripts/Infrastructure/ScriptableObjectArchitecture/Editor/Unity.BossRoom.Infrastructure.ScriptableObjectArchitecture.Editor.asmdef

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "Unity.BossRoom.Infrastructure.Editor",
2+
"name": "Unity.BossRoom.Infrastructure.ScriptableObjectArchitecture.Editor",
33
"rootNamespace": "",
44
"references": [
55
"GUID:1491147abca9d7d4bb7105af628b223e",
File renamed without changes.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
using UnityEngine;
2+
3+
namespace Unity.Multiplayer.Samples.BossRoom.Visual
4+
{
5+
/// <summary>
6+
/// Utility struct to linearly interpolate between two Vector3 values. Allows for flexible linear interpolations
7+
/// where current and target change over time.
8+
/// </summary>
9+
public struct PositionLerper
10+
{
11+
// Calculated start for the most recent interpolation
12+
Vector3 m_LerpStart;
13+
14+
// Calculated time elapsed for the most recent interpolation
15+
float m_CurrentLerpTime;
16+
17+
// The duration of the interpolation, in seconds
18+
float m_LerpTime;
19+
20+
public PositionLerper(Vector3 start, float lerpTime)
21+
{
22+
m_LerpStart = start;
23+
m_CurrentLerpTime = 0f;
24+
m_LerpTime = lerpTime;
25+
}
26+
27+
/// <summary>
28+
/// Linearly interpolate between two Vector3 values.
29+
/// </summary>
30+
/// <param name="current"> Start of the interpolation. </param>
31+
/// <param name="target"> End of the interpolation. </param>
32+
/// <returns> A Vector3 value between current and target. </returns>
33+
public Vector3 LerpPosition(Vector3 current, Vector3 target)
34+
{
35+
if (current != target)
36+
{
37+
m_LerpStart = current;
38+
m_CurrentLerpTime = 0f;
39+
}
40+
41+
m_CurrentLerpTime += Time.deltaTime;
42+
if (m_CurrentLerpTime > m_LerpTime)
43+
{
44+
m_CurrentLerpTime = m_LerpTime;
45+
}
46+
47+
var lerpPercentage = m_CurrentLerpTime / m_LerpTime;
48+
49+
return Vector3.Lerp(m_LerpStart, target, lerpPercentage);
50+
}
51+
}
52+
}

0 commit comments

Comments
 (0)