Made ready button interactable only on player selection

dev-main
Hazim Bin Ijaz 1 month ago
parent 0f56894629
commit 126561db44

@ -26697,7 +26697,7 @@ MonoBehaviour:
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_Interactable: 0
m_TargetGraphic: {fileID: 817396989}
m_OnClick:
m_PersistentCalls:
@ -42145,6 +42145,10 @@ PrefabInstance:
propertyPath: AvatarConfiguration.Array.data[3]
value:
objectReference: {fileID: 11400000, guid: e32151d48a3abe543b4e57d6cd16e1ad, type: 2}
- target: {fileID: 3565665953789623674, guid: 1a58a2c4657fe6d4890d9ad39f43894e, type: 3}
propertyPath: m_ReadyButton
value:
objectReference: {fileID: 817396988}
- target: {fileID: 3565665953789623674, guid: 1a58a2c4657fe6d4890d9ad39f43894e, type: 3}
propertyPath: m_ClassInfoBox
value:

@ -9,6 +9,7 @@ using UnityEngine;
using VContainer;
using Avatar = Unity.BossRoom.Gameplay.Configuration.Avatar;
using System.Linq;
using UnityEngine.UI;
namespace Unity.BossRoom.Gameplay.GameState
{
@ -95,6 +96,7 @@ namespace Unity.BossRoom.Gameplay.GameState
Dictionary<Guid, GameObject> m_SpawnedCharacterGraphics = new Dictionary<Guid, GameObject>();
[SerializeField] private Button m_ReadyButton;
/// <summary>
/// Conceptual modes or stages that the lobby can be in. We don't actually
/// bother to keep track of what LobbyMode we're in at any given time; it's just
@ -427,6 +429,7 @@ namespace Unity.BossRoom.Gameplay.GameState
{
if (m_NetworkCharSelection.IsSpawned)
{
m_ReadyButton.interactable = true;
m_NetworkCharSelection.ServerChangeSeatRpc(NetworkManager.Singleton.LocalClientId, seatIdx, false);
}
}

Loading…
Cancel
Save