Post Pull Fixes

dev-hazim
Hazim Bin Ijaz 3 weeks ago
parent 73b010367a
commit 0d96594bca

@ -8978,6 +8978,72 @@ Transform:
m_CorrespondingSourceObject: {fileID: 5655447013084909147, guid: 8b9c63e7d70c5ff48a03aad51e17103c, type: 3} m_CorrespondingSourceObject: {fileID: 5655447013084909147, guid: 8b9c63e7d70c5ff48a03aad51e17103c, type: 3}
m_PrefabInstance: {fileID: 828804356} m_PrefabInstance: {fileID: 828804356}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!1 &862711267
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 862711270}
- component: {fileID: 862711268}
- component: {fileID: 862711269}
m_Layer: 0
m_Name: ScoreManager
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &862711268
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 862711267}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
m_Name:
m_EditorClassIdentifier:
GlobalObjectIdHash: 631707658
InScenePlacedSourceGlobalObjectIdHash: 0
AlwaysReplicateAsRoot: 0
SynchronizeTransform: 1
ActiveSceneSynchronization: 0
SceneMigrationSynchronization: 1
SpawnWithObservers: 1
DontDestroyWithOwner: 0
AutoObjectParentSync: 1
--- !u!114 &862711269
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 862711267}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c42f66f946855da4b99f79c5bde1d545, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!4 &862711270
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 862711267}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &863331223 --- !u!1 &863331223
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -9287,11 +9353,11 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1676734516695783279, guid: 0193228de87741d40a42e561901c9083, type: 3} - target: {fileID: 1676734516695783279, guid: 0193228de87741d40a42e561901c9083, type: 3}
propertyPath: m_LocalRotation.y propertyPath: m_LocalRotation.y
value: 0.30972984 value: 0.3097298
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1676734516695783279, guid: 0193228de87741d40a42e561901c9083, type: 3} - target: {fileID: 1676734516695783279, guid: 0193228de87741d40a42e561901c9083, type: 3}
propertyPath: m_LocalRotation.z propertyPath: m_LocalRotation.z
value: -0.1450697 value: -0.14506969
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1676734516724634599, guid: 0193228de87741d40a42e561901c9083, type: 3} - target: {fileID: 1676734516724634599, guid: 0193228de87741d40a42e561901c9083, type: 3}
propertyPath: m_LocalPosition.z propertyPath: m_LocalPosition.z
@ -10179,7 +10245,7 @@ GameObject:
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 1 m_IsActive: 0
--- !u!224 &1599220877 --- !u!224 &1599220877
RectTransform: RectTransform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -278996,3 +279062,4 @@ SceneRoots:
- {fileID: 396364068} - {fileID: 396364068}
- {fileID: 7822537384937625691} - {fileID: 7822537384937625691}
- {fileID: 1521032484} - {fileID: 1521032484}
- {fileID: 862711270}

@ -1213,8 +1213,8 @@ Transform:
m_GameObject: {fileID: 1415641637} m_GameObject: {fileID: 1415641637}
serializedVersion: 2 serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.58, y: -0.14, z: 1.84} m_LocalPosition: {x: -0.4553, y: -0.14, z: -1.0268}
m_LocalScale: {x: 1.2077, y: 1.2077, z: 1.2077} m_LocalScale: {x: 2.1429026, y: 1.2077, z: 2.595087}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}

@ -121,8 +121,6 @@ namespace Unity.Multiplayer.Samples.BossRoom
} }
public void Occupy(ServerCharacter player) public void Occupy(ServerCharacter player)
{ {
//AnimationPauser();
if (!IsServer) if (!IsServer)
{ {
Debug.LogError("Occupy can only be called on the server."); Debug.LogError("Occupy can only be called on the server.");
@ -159,13 +157,9 @@ namespace Unity.Multiplayer.Samples.BossRoom
public void Vacate(ServerCharacter player) public void Vacate(ServerCharacter player)
{ {
//AnimationResumer();
if (!IsServer) if (!IsServer)
{ {
Debug.LogError("Vacate can only be called on the server."); Debug.LogError("Vacate can only be called on the server.");
//AnimationResumer();
return; return;
} }
ResumeAnimation(); ResumeAnimation();
@ -184,7 +178,7 @@ namespace Unity.Multiplayer.Samples.BossRoom
private void OnTriggerEnter(Collider other) private void OnTriggerEnter(Collider other)
{ {
//if (!IsServer) return; if (!IsServer) return;
if (other.TryGetComponent<ServerCharacter>(out var player)) if (other.TryGetComponent<ServerCharacter>(out var player))
{ {
@ -207,7 +201,6 @@ namespace Unity.Multiplayer.Samples.BossRoom
private void OnTriggerExit(Collider other) private void OnTriggerExit(Collider other)
{ {
if (!IsServer) return; if (!IsServer) return;
if (other.TryGetComponent<ServerCharacter>(out var player)) if (other.TryGetComponent<ServerCharacter>(out var player))
{ {
Vacate(player); Vacate(player);

@ -36,7 +36,7 @@ namespace Unity.BossRoom.Gameplay.UserInput
LayerMask m_GroundLayerMask; LayerMask m_GroundLayerMask;
LayerMask m_ActionLayerMask; LayerMask m_ActionLayerMask;
LayerMask m_PlatformLayerMask; LayerMask m_SwapInputLayerMask;
const float k_MaxNavMeshDistance = 1f; const float k_MaxNavMeshDistance = 1f;
@ -159,7 +159,8 @@ namespace Unity.BossRoom.Gameplay.UserInput
m_GroundLayerMask = LayerMask.GetMask(new[] { "Ground" }); m_GroundLayerMask = LayerMask.GetMask(new[] { "Ground" });
m_ActionLayerMask = LayerMask.GetMask(new[] { "PCs", "NPCs", "Ground" }); m_ActionLayerMask = LayerMask.GetMask(new[] { "PCs", "NPCs", "Ground" });
m_PlatformLayerMask = LayerMask.GetMask(new[]{"Platform"}); m_SwapInputLayerMask = LayerMask.GetMask(new[]{"PCs"});
m_RaycastHitComparer = new RaycastHitComparer(); m_RaycastHitComparer = new RaycastHitComparer();
m_UIMessageFeed = FindObjectOfType<UIMessageFeed>(); m_UIMessageFeed = FindObjectOfType<UIMessageFeed>();
} }
@ -543,15 +544,16 @@ namespace Unity.BossRoom.Gameplay.UserInput
IsSwapModeActive = !IsSwapModeActive; IsSwapModeActive = !IsSwapModeActive;
if (IsSwapModeActive) if (IsSwapModeActive)
{ {
FindObjectOfType<UIMessageFeed>().DisplayMessage("Swap mode activated"); m_UIMessageFeed.DisplayMessage("Swap mode activated");
Debug.Log("Swap mode activated. Click on a player to request a swap."); Debug.Log("Swap mode activated. Click on a player to request a swap.");
} }
else else
{ {
FindObjectOfType<UIMessageFeed>().DisplayMessage("Swap mode deactivated"); m_UIMessageFeed.DisplayMessage("Swap mode deactivated");
Debug.Log("Swap mode deactivated."); Debug.Log("Swap mode deactivated.");
} }
} }
/// <summary> /// <summary>
/// Handles the swap request when in swap mode. /// Handles the swap request when in swap mode.
@ -559,7 +561,7 @@ namespace Unity.BossRoom.Gameplay.UserInput
private void HandleSwapRequest() private void HandleSwapRequest()
{ {
var ray = m_MainCamera.ScreenPointToRay(Input.mousePosition); var ray = m_MainCamera.ScreenPointToRay(Input.mousePosition);
int hits = Physics.RaycastNonAlloc(ray, k_CachedHit, k_MouseInputRaycastDistance); int hits = Physics.RaycastNonAlloc(ray, k_CachedHit, k_MouseInputRaycastDistance, m_SwapInputLayerMask);
if (hits > 0) if (hits > 0)
{ {
for (int i = 0; i < hits; i++) for (int i = 0; i < hits; i++)

Loading…
Cancel
Save