UnityJacob
3 年前
当前提交
4dc33191
共有 98 个文件被更改,包括 6017 次插入 和 2663 次删除
-
6Assets/Prefabs/GameStateManager.prefab
-
151Assets/Prefabs/UI/BackButtonBG.prefab
-
7Assets/Prefabs/UI/CreateContent.prefab
-
331Assets/Prefabs/UI/GameCanvas.prefab
-
241Assets/Prefabs/UI/JoinContent.prefab
-
67Assets/Prefabs/UI/JoinCreateRoomCanvas.prefab
-
196Assets/Prefabs/UI/LobbyGameCanvas.prefab
-
331Assets/Prefabs/UI/MainMenuCanvas.prefab
-
839Assets/Prefabs/UI/PlayerInteractionPanel.prefab
-
47Assets/Prefabs/UI/RelayCodeCanvas.prefab
-
7Assets/Prefabs/UI/UserCardPanel.prefab
-
435Assets/Scenes/mainMenu.unity
-
12Assets/Scripts/Auth/Identity.cs
-
17Assets/Scripts/Auth/SubIdentity_Authentication.cs
-
318Assets/Scripts/Entities/GameStateManager.cs
-
111Assets/Scripts/Entities/LobbyData.cs
-
78Assets/Scripts/Entities/LobbyReadyCheck.cs
-
21Assets/Scripts/Entities/LobbyServiceData.cs
-
28Assets/Scripts/Entities/LobbyUser.cs
-
3Assets/Scripts/Entities/LocalGameState.cs
-
6Assets/Scripts/Infrastructure/ObserverBehaviour.cs
-
3Assets/Scripts/Relay/RelayInterface.cs
-
95Assets/Scripts/Rooms/RoomsContentHeartbeat.cs
-
15Assets/Scripts/Rooms/RoomsInterface.cs
-
135Assets/Scripts/Rooms/RoomsQuery.cs
-
10Assets/Scripts/Rooms/ToLobbyData.cs
-
149Assets/Scripts/Tests/PlayMode/ReadyCheckTests.cs
-
44Assets/Scripts/Tests/PlayMode/RoomsRoundtripTests.cs
-
51Assets/Scripts/Tests/PlayMode/UpdateSlowTests.cs
-
5Assets/Scripts/UI/BackButtonUI.cs
-
3Assets/Scripts/UI/GameStateVisibilityUI.cs
-
20Assets/Scripts/UI/JoinCreateRoomUI.cs
-
29Assets/Scripts/UI/JoinMenuUI.cs
-
5Assets/Scripts/UI/LobbyButtonUI.cs
-
4Assets/Scripts/UI/UIPanelBase.cs
-
2Assets/Scripts/UI/CountdownUI.cs.meta
-
2Assets/Scripts/UI/EndGameButtonUI.cs.meta
-
4Assets/Scripts/Utilities/Messenger.cs
-
84Assets/Scripts/Utilities/UpdateSlow.cs
-
24Packages/manifest.json
-
79Packages/packages-lock.json
-
11ProjectSettings/ProjectSettings.asset
-
4ProjectSettings/ProjectVersion.txt
-
4ProjectSettings/UnityConnectSettings.asset
-
67.gitignore
-
8Assets/Art.meta
-
273Assets/Prefabs/UI/CountDownUI.prefab
-
7Assets/Prefabs/UI/CountDownUI.prefab.meta
-
1001Assets/Prefabs/UI/LobbyUserList.prefab
-
568Assets/Prefabs/UI/SpinnerUI.prefab
-
7Assets/Prefabs/UI/SpinnerUI.prefab.meta
-
19Assets/Scripts/UI/CountdownUI.cs
-
15Assets/Scripts/UI/EndGameButtonUI.cs
-
14Assets/Scripts/UI/ExitButtonUI.cs
-
11Assets/Scripts/UI/ExitButtonUI.cs.meta
-
19Assets/Scripts/UI/LobbyStateVisibilityUI.cs
-
11Assets/Scripts/UI/LobbyStateVisibilityUI.cs.meta
-
70Assets/Scripts/UI/LobbyUserCardUI.cs
-
65Assets/Scripts/UI/LobbyUsersUI.cs
-
23Assets/Scripts/UI/ReadyCheckUI.cs
-
52Assets/Scripts/UI/SpinnerUI.cs
-
11Assets/Scripts/UI/SpinnerUI.cs.meta
-
15Assets/Scripts/UI/StartLobbyButton.cs
-
11Assets/Scripts/UI/StartLobbyButton.cs.meta
-
73Assets/Scripts/Utilities/NameGenerator.cs
-
11Assets/Scripts/Utilities/NameGenerator.cs.meta
-
8Assets/StreamingAssets.meta
-
16ProjectSettings/BurstAotSettings_StandaloneWindows.json
-
6ProjectSettings/CommonBurstAotSettings.json
-
35ProjectSettings/MemorySettings.asset
-
0ProjectSettings/boot.config
-
8Assets/Art/Spinner.meta
-
40Assets/Art/Spinner/Spinner.png
-
97Assets/Art/Spinner/Spinner.png.meta
-
306Assets/Art/Spinner/SpinnerController.controller
-
8Assets/Art/Spinner/SpinnerController.controller.meta
-
215Assets/Art/Spinner/SpinnerError.anim
-
8Assets/Art/Spinner/SpinnerError.anim.meta
-
143Assets/Art/Spinner/SpinnerStatic.anim
-
8Assets/Art/Spinner/SpinnerStatic.anim.meta
-
199Assets/Art/Spinner/SpinnerUISpin.anim
-
8Assets/Art/Spinner/SpinnerUISpin.anim.meta
-
1001Assets/Prefabs/UI/PlayerList.prefab
-
15Assets/Scripts/UI/HostReadyCheckUI.cs
-
18Assets/Scripts/UI/LobbyUserInteractionUI.cs
-
72Assets/Scripts/UI/PlayerCardUI.cs
-
69Assets/Scripts/UI/RoomPlayersUI.cs
-
15Assets/Scripts/UI/UserReadyCheckUI.cs
-
0/Assets/Prefabs/UI/UserCardPanel.prefab.meta
-
0/Assets/Prefabs/UI/LobbyUserList.prefab.meta
-
0/Assets/Prefabs/UI/UserCardPanel.prefab
-
0/Assets/Scripts/UI/ReadyCheckUI.cs.meta
-
0/Assets/Scripts/UI/LobbyUserCardUI.cs.meta
-
0/Assets/Scripts/UI/LobbyUsersUI.cs.meta
-
0/Assets/Scripts/UI/CountdownUI.cs.meta
-
0/Assets/Scripts/UI/EndGameButtonUI.cs.meta
839
Assets/Prefabs/UI/PlayerInteractionPanel.prefab
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
using System; |
|||
using UnityEngine; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
/// <summary>
|
|||
/// On the host, this will watch for all players to ready, and once they have, it will prepare for a synchronized countdown.
|
|||
/// </summary>
|
|||
public bool ReadyCheckFinished { get; private set; } |
|||
public bool ReadyCheckSuccess { get; private set; } |
|||
const float k_Checkinterval = 0.5f; |
|||
LobbyData m_LobbyData; |
|||
float m_ReadyTime = 10; |
|||
float m_ReadyTime = 5; |
|||
public LobbyReadyCheck(LobbyData lobbyData, Action<bool> onReadyCheckComplete, float readyTime = 10) |
|||
public LobbyReadyCheck(Action<bool> onReadyCheckComplete = null, float readyTime = 5) |
|||
m_ReadyTime = readyTime; |
|||
} |
|||
m_LobbyData = lobbyData; |
|||
m_LobbyData.SetAllPlayersToState(UserStatus.ReadyCheck); |
|||
m_ReadyTime = readyTime; |
|||
Locator.Get.UpdateSlow.Subscribe(CheckIfReady); |
|||
public void BeginCheckingForReady() |
|||
{ |
|||
Locator.Get.UpdateSlow.Subscribe(OnUpdate); |
|||
float m_CheckCount; |
|||
float m_TimeElapsed = 0; |
|||
public void EndCheckingForReady() |
|||
{ |
|||
Locator.Get.UpdateSlow.Unsubscribe(OnUpdate); |
|||
} |
|||
/// Checks the lobby to see if we have all Readied up, or any one has cancelled.
|
|||
/// NOTE: The countdown will be happening at different times with this setup, possibility of a desynched game start.
|
|||
/// Or a player cancellign the last milliseconds resulting in players starting without him
|
|||
/// Checks the lobby to see if we have all Readied up. If so, send out a message with the target time at which to end a countdown.
|
|||
void CheckIfReady(float dt) |
|||
void OnUpdate(float dt) |
|||
m_TimeElapsed += dt; |
|||
|
|||
if (m_CheckCount < k_Checkinterval) |
|||
{ |
|||
m_CheckCount += dt; |
|||
var room = RoomsQuery.Instance.CurrentRoom; |
|||
if (room == null || room.Players.Count == 0) |
|||
} |
|||
|
|||
m_CheckCount = 0; |
|||
if (m_TimeElapsed + 1 < m_ReadyTime && m_LobbyData.PlayersOfState(UserStatus.Cancelled, 1)) //Dont allow cancels near the end of the ready check
|
|||
int readyCount = room.Players.Count((p) => |
|||
FinishedReadyCheck(false); |
|||
} |
|||
else if (m_LobbyData.PlayersOfState(UserStatus.Ready)) |
|||
if (p.Data?.ContainsKey("UserStatus") != true) // Needs to be "!= true" to handle null properly.
|
|||
return false; |
|||
UserStatus status; |
|||
if (Enum.TryParse(p.Data["UserStatus"].Value, out status)) |
|||
return status == UserStatus.Ready; |
|||
return false; |
|||
}); |
|||
|
|||
if (readyCount == room.Players.Count) |
|||
FinishedReadyCheck(true); |
|||
} |
|||
else if (m_TimeElapsed > m_ReadyTime) |
|||
{ |
|||
FinishedReadyCheck(false); |
|||
Dictionary<string, string> data = new Dictionary<string, string>(); |
|||
DateTime targetTime = DateTime.Now.AddSeconds(m_ReadyTime); |
|||
data.Add("AllPlayersReady", targetTime.Ticks.ToString()); |
|||
RoomsQuery.Instance.UpdateRoomDataAsync(data, null); |
|||
EndCheckingForReady(); // TODO: We'll need to restart checking once we end the relay sequence and return to the room.
|
|||
void FinishedReadyCheck(bool success) |
|||
{ |
|||
ReadyCheckSuccess = success; |
|||
ReadyCheckFinished = true; |
|||
m_OnReadyCheckComplete?.Invoke(success); |
|||
} |
|||
|
|||
Locator.Get.UpdateSlow.Unsubscribe(CheckIfReady); |
|||
EndCheckingForReady(); |
|||
} |
|||
} |
|||
} |
|
|||
using System.Collections; |
|||
using System.Collections; |
|||
using Unity.Services.Rooms; |
|||
using Unity.Services.Rooms.Models; |
|||
using RoomsInterface = LobbyRooms.Rooms.RoomsInterface; |
|||
LobbyData m_LobbyData; |
|||
LobbyReadyCheck m_ReadyCheck; |
|||
const int k_TestUserCount = 3; |
|||
private string m_workingRoomId; |
|||
private LobbyRooms.Auth.Identity m_auth; |
|||
private bool m_didSigninComplete = false; |
|||
private GameObject m_updateSlowObj; |
|||
[SetUp] |
|||
public void FirstTimeSetup() |
|||
[OneTimeSetUp] |
|||
public void Setup() |
|||
m_LobbyData = new LobbyData(); |
|||
new GameObject("SlowUpdater").AddComponent<UpdateSlow>(); |
|||
m_auth = new LobbyRooms.Auth.Identity(() => { m_didSigninComplete = true; }); |
|||
Locator.Get.Provide(m_auth); |
|||
var stagingpath = "https://rooms-stg.cloud.unity3d.com/v1"; |
|||
RoomsInterface.SetPath(stagingpath); //Defaults to Test Path
|
|||
m_updateSlowObj = new GameObject("UpdateSlowTest"); |
|||
m_updateSlowObj.AddComponent<UpdateSlow>(); |
|||
} |
|||
for (int i = 0; i < k_TestUserCount; i++) |
|||
{ |
|||
m_LobbyData.AddPlayer(new LobbyUser |
|||
{ |
|||
ID = i.ToString() |
|||
}); |
|||
[UnityTearDown] |
|||
public IEnumerator PerTestTeardown() |
|||
{ |
|||
if (m_workingRoomId != null) |
|||
{ RoomsInterface.DeleteRoomAsync(m_workingRoomId, null); |
|||
m_workingRoomId = null; |
|||
yield return new WaitForSeconds(0.5f); // We need a yield anyway, so wait long enough to probably delete the room. There currently (6/22/2021) aren't other tests that would have issues if this took longer.
|
|||
[UnityTest] |
|||
public IEnumerator TimeOutWithSingleReadyUp() |
|||
[OneTimeTearDown] |
|||
public void Teardown() |
|||
m_ReadyCheck = new LobbyReadyCheck(m_LobbyData, AssertNotReady, 1); |
|||
yield return new WaitForSeconds(0.1f); |
|||
m_LobbyData.LobbyUsers["0"].UserStatus = UserStatus.Ready; |
|||
while (!m_ReadyCheck.ReadyCheckFinished) |
|||
yield return null; |
|||
Locator.Get.Provide(new LobbyRooms.Auth.IdentityNoop()); |
|||
m_auth.Dispose(); |
|||
LogAssert.ignoreFailingMessages = false; |
|||
RoomsQuery.Instance.EndTracking(); |
|||
GameObject.Destroy(m_updateSlowObj); |
|||
[UnityTest] |
|||
public IEnumerator SucceedAllReadyUp() |
|||
private IEnumerator WaitForSignin() |
|||
m_ReadyCheck = new LobbyReadyCheck(m_LobbyData, AssertReady, 1); |
|||
yield return new WaitForSeconds(0.1f); |
|||
m_LobbyData.LobbyUsers["0"].UserStatus = UserStatus.Ready; |
|||
yield return new WaitForSeconds(0.1f); |
|||
m_LobbyData.LobbyUsers["1"].UserStatus = UserStatus.Ready; |
|||
yield return new WaitForSeconds(0.1f); |
|||
m_LobbyData.LobbyUsers["2"].UserStatus = UserStatus.Ready; |
|||
while (!m_ReadyCheck.ReadyCheckFinished) |
|||
yield return null; |
|||
// Wait a reasonable amount of time for sign-in to complete.
|
|||
if (!m_didSigninComplete) |
|||
yield return new WaitForSeconds(3); |
|||
if (!m_didSigninComplete) |
|||
Assert.Fail("Did not sign in."); |
|||
[UnityTest] |
|||
public IEnumerator FailOnCancel() |
|||
private IEnumerator CreateRoom(string roomName, string userId) |
|||
m_ReadyCheck = new LobbyReadyCheck(m_LobbyData, AssertNotReady, 1); |
|||
yield return new WaitForSeconds(0.1f); |
|||
m_LobbyData.LobbyUsers["0"].UserStatus = UserStatus.Ready; |
|||
yield return new WaitForSeconds(0.1f); |
|||
m_LobbyData.LobbyUsers["1"].UserStatus = UserStatus.Ready; |
|||
yield return new WaitForSeconds(0.1f); |
|||
m_LobbyData.LobbyUsers["2"].UserStatus = UserStatus.Cancelled; |
|||
while (!m_ReadyCheck.ReadyCheckFinished) |
|||
yield return null; |
|||
Response<Room> createResponse = null; |
|||
float timeout = 5; |
|||
RoomsInterface.CreateRoomAsync(userId, roomName, 4, false, (r) => { createResponse = r; }); |
|||
while (createResponse == null && timeout > 0) |
|||
{ yield return new WaitForSeconds(0.25f); |
|||
timeout -= 0.25f; |
|||
} |
|||
Assert.Greater(timeout, 0, "Timeout check (room creation)."); |
|||
m_workingRoomId = createResponse.Result.Id; |
|||
void AssertReady(bool ready) |
|||
private IEnumerator PushPlayerData(LobbyUser player) |
|||
Assert.IsTrue(ready, $"ReadyCheck : {ready}"); |
|||
bool hasPushedPlayerData = false; |
|||
float timeout = 5; |
|||
RoomsQuery.Instance.UpdatePlayerDataAsync(LobbyRooms.Rooms.ToLobbyData.RetrieveUserData(player), () => { hasPushedPlayerData = true; }); // RoomsContentHeartbeat normally does this.
|
|||
while (!hasPushedPlayerData && timeout > 0) |
|||
{ yield return new WaitForSeconds(0.25f); |
|||
timeout -= 0.25f; |
|||
} |
|||
Assert.Greater(timeout, 0, "Timeout check (push player data)."); |
|||
void AssertNotReady(bool ready) |
|||
/// <summary>
|
|||
/// After creating a room and a player, signal that the player is Ready. This should lead to a countdown time being set for all players.
|
|||
/// </summary>
|
|||
[UnityTest] |
|||
public IEnumerator SetCountdownTimeSinglePlayer() |
|||
Assert.False(ready, $"NotReadyCheck : {ready}"); |
|||
LogAssert.ignoreFailingMessages = true; // TODO: Not sure why, but when auth logs in, it sometimes generates an error: "A Native Collection has not been disposed[...]." We don't want this to cause test failures, since in practice it *seems* to not negatively impact behavior.
|
|||
bool? readyResult = null; |
|||
LobbyReadyCheck readyCheck = new LobbyReadyCheck((b) => { readyResult = b; }, 5); // This ready time is used for the countdown target end, not for any of the timing of actually detecting readies.
|
|||
yield return WaitForSignin(); |
|||
|
|||
string userId = m_auth.GetSubIdentity(LobbyRooms.Auth.IIdentityType.Auth).GetContent("id"); |
|||
yield return CreateRoom("TestReadyRoom1", userId); |
|||
|
|||
RoomsQuery.Instance.BeginTracking(m_workingRoomId); |
|||
yield return new WaitForSeconds(2); // Allow the initial room retrieval.
|
|||
|
|||
LobbyUser user = new LobbyUser(); |
|||
user.ID = userId; |
|||
user.UserStatus = UserStatus.Ready; |
|||
yield return PushPlayerData(user); |
|||
|
|||
readyCheck.BeginCheckingForReady(); |
|||
float timeout = 5; // Long enough for two slow updates
|
|||
yield return new WaitForSeconds(timeout); |
|||
|
|||
readyCheck.Dispose(); |
|||
RoomsQuery.Instance.EndTracking(); |
|||
|
|||
yield return new WaitForSeconds(2); // Buffer to prevent a 429 on the upcoming Get, since there's a Get request on the slow upate loop when that's active.
|
|||
Response<Room> getResponse = null; |
|||
timeout = 5; |
|||
RoomsInterface.GetRoomAsync(m_workingRoomId, (r) => { getResponse = r; }); |
|||
while (getResponse == null && timeout > 0) |
|||
{ yield return new WaitForSeconds(0.25f); |
|||
timeout -= 0.25f; |
|||
} |
|||
Assert.Greater(timeout, 0, "Timeout check (get room)."); |
|||
Assert.NotNull(getResponse.Result, "Retrieved room successfully."); |
|||
Assert.NotNull(getResponse.Result.Data, "Room should have data."); |
|||
|
|||
Assert.True(getResponse.Result.Data.ContainsKey("AllPlayersReady"), "Check for AllPlayersReady key."); |
|||
string readyString = getResponse.Result.Data["AllPlayersReady"]?.Value; |
|||
Assert.NotNull(readyString, "Check for non-null AllPlayersReady."); |
|||
Assert.True(long.TryParse(readyString, out long ticks), "Check for ticks value in AllPlayersReady."); // This will be based on the current time, so we won't check for a specific value.
|
|||
|
|||
// Can't test with multiple players on one machine, since anonymous UAS credentials can't be manually supplied.
|
|||
} |
|||
} |
|
|||
m_EditorVersion: 2021.2.0a15 |
|||
m_EditorVersionWithRevision: 2021.2.0a15 (37767e16dc73) |
|||
m_EditorVersion: 2021.2.0b1 |
|||
m_EditorVersionWithRevision: 2021.2.0b1 (b0978dae4864) |
|
|||
# This .gitignore file should be placed at the root of your Unity project directory |
|||
# |
|||
# Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore |
|||
# |
|||
[Ll]ibrary/ |
|||
[Tt]emp/ |
|||
[Oo]bj/ |
|||
[Bb]uild/ |
|||
[Bb]uilds/ |
|||
[Ll]ogs/ |
|||
[Mm]emoryCaptures/ |
|||
|
|||
# Never ignore Asset meta data |
|||
!/[Aa]ssets/**/*.meta |
|||
|
|||
# Uncomment this line if you wish to ignore the asset store tools plugin |
|||
# /[Aa]ssets/AssetStoreTools* |
|||
|
|||
# Autogenerated Jetbrains Rider plugin |
|||
[Aa]ssets/Plugins/Editor/JetBrains* |
|||
|
|||
# Visual Studio cache directory |
|||
.vs/ |
|||
|
|||
# Gradle cache directory |
|||
.gradle/ |
|||
|
|||
# Autogenerated VS/MD/Consulo solution and project files |
|||
ExportedObj/ |
|||
.consulo/ |
|||
*.csproj |
|||
*.unityproj |
|||
*.sln |
|||
*.suo |
|||
*.tmp |
|||
*.user |
|||
*.userprefs |
|||
*.pidb |
|||
*.booproj |
|||
*.svd |
|||
*.pdb |
|||
*.mdb |
|||
*.opendb |
|||
*.VC.db |
|||
|
|||
# Unity3D generated meta files |
|||
*.pidb.meta |
|||
*.pdb.meta |
|||
*.mdb.meta |
|||
|
|||
# Unity3D generated file on crash reports |
|||
sysinfo.txt |
|||
|
|||
# Builds |
|||
*.apk |
|||
*.unitypackage |
|||
|
|||
#Maya crap |
|||
.mayaSwatches |
|||
|
|||
# Crashlytics generated file |
|||
crashlytics-build.properties |
|||
.plastic |
|||
.plastic/ |
|||
|
|||
.idea |
|||
.idea/ |
|
|||
fileFormatVersion: 2 |
|||
guid: 123bc9f9b2aefd849884af50d9922749 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!1 &5694388898566309151 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
serializedVersion: 6 |
|||
m_Component: |
|||
- component: {fileID: 2473738857440996537} |
|||
- component: {fileID: 9125082141416656856} |
|||
- component: {fileID: 288221731430065532} |
|||
- component: {fileID: 1604604243888226905} |
|||
- component: {fileID: 1102405501498744344} |
|||
- component: {fileID: 3702758058023689559} |
|||
m_Layer: 5 |
|||
m_Name: CountDownUI |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 0 |
|||
m_IsActive: 1 |
|||
--- !u!224 &2473738857440996537 |
|||
RectTransform: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 5694388898566309151} |
|||
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: |
|||
- {fileID: 2508362878409625140} |
|||
m_Father: {fileID: 0} |
|||
m_RootOrder: 0 |
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
|||
m_AnchorMin: {x: 0, y: 0} |
|||
m_AnchorMax: {x: 1, y: 1} |
|||
m_AnchoredPosition: {x: 0, y: -77.436} |
|||
m_SizeDelta: {x: -50, y: -404.7342} |
|||
m_Pivot: {x: 0.5, y: 0.5} |
|||
--- !u!222 &9125082141416656856 |
|||
CanvasRenderer: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 5694388898566309151} |
|||
m_CullTransparentMesh: 1 |
|||
--- !u!114 &288221731430065532 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 5694388898566309151} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: 5b3b588e7ae40ec4ca35fdb9404513ab, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
m_onVisibilityChange: |
|||
m_PersistentCalls: |
|||
m_Calls: [] |
|||
showing: 0 |
|||
m_CountDownText: {fileID: 6871324529924300226} |
|||
--- !u!114 &1604604243888226905 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 5694388898566309151} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: f38cf340acfcd4c64a6968b7386ad570, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
m_onVisibilityChange: |
|||
m_PersistentCalls: |
|||
m_Calls: [] |
|||
showing: 0 |
|||
m_ShowThisWhen: 2 |
|||
--- !u!114 &1102405501498744344 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 5694388898566309151} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: 70dfc2fde0a9ef04eaff29a138f0bf45, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
OnObservedUpdated: |
|||
m_PersistentCalls: |
|||
m_Calls: |
|||
- m_Target: {fileID: 288221731430065532} |
|||
m_TargetAssemblyTypeName: CountdownUI, LobbyRooms |
|||
m_MethodName: ObservedUpdated |
|||
m_Mode: 0 |
|||
m_Arguments: |
|||
m_ObjectArgument: {fileID: 0} |
|||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine |
|||
m_IntArgument: 0 |
|||
m_FloatArgument: 0 |
|||
m_StringArgument: |
|||
m_BoolArgument: 0 |
|||
m_CallState: 2 |
|||
- m_Target: {fileID: 1604604243888226905} |
|||
m_TargetAssemblyTypeName: LobbyRooms.UI.LobbyStateVisibilityUI, LobbyRooms |
|||
m_MethodName: ObservedUpdated |
|||
m_Mode: 0 |
|||
m_Arguments: |
|||
m_ObjectArgument: {fileID: 0} |
|||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine |
|||
m_IntArgument: 0 |
|||
m_FloatArgument: 0 |
|||
m_StringArgument: |
|||
m_BoolArgument: 0 |
|||
m_CallState: 2 |
|||
observeOnStart: 0 |
|||
--- !u!225 &3702758058023689559 |
|||
CanvasGroup: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 5694388898566309151} |
|||
m_Enabled: 1 |
|||
m_Alpha: 1 |
|||
m_Interactable: 1 |
|||
m_BlocksRaycasts: 1 |
|||
m_IgnoreParentGroups: 0 |
|||
--- !u!1 &6120000553027287259 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
serializedVersion: 6 |
|||
m_Component: |
|||
- component: {fileID: 2508362878409625140} |
|||
- component: {fileID: 3642688559417843241} |
|||
- component: {fileID: 6871324529924300226} |
|||
m_Layer: 5 |
|||
m_Name: CountdownText |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 0 |
|||
m_IsActive: 1 |
|||
--- !u!224 &2508362878409625140 |
|||
RectTransform: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 6120000553027287259} |
|||
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: 2473738857440996537} |
|||
m_RootOrder: 0 |
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
|||
m_AnchorMin: {x: 0, y: 0} |
|||
m_AnchorMax: {x: 1, y: 1} |
|||
m_AnchoredPosition: {x: 0, y: 0} |
|||
m_SizeDelta: {x: 0, y: 0} |
|||
m_Pivot: {x: 0.5, y: 0.5} |
|||
--- !u!222 &3642688559417843241 |
|||
CanvasRenderer: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 6120000553027287259} |
|||
m_CullTransparentMesh: 1 |
|||
--- !u!114 &6871324529924300226 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 6120000553027287259} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
m_Material: {fileID: 0} |
|||
m_Color: {r: 1, g: 1, b: 1, a: 1} |
|||
m_RaycastTarget: 1 |
|||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} |
|||
m_Maskable: 1 |
|||
m_OnCullStateChanged: |
|||
m_PersistentCalls: |
|||
m_Calls: [] |
|||
m_text: 'Starting in:' |
|||
m_isRightToLeft: 0 |
|||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} |
|||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} |
|||
m_fontSharedMaterials: [] |
|||
m_fontMaterial: {fileID: 0} |
|||
m_fontMaterials: [] |
|||
m_fontColor32: |
|||
serializedVersion: 2 |
|||
rgba: 4294967295 |
|||
m_fontColor: {r: 1, g: 1, b: 1, a: 1} |
|||
m_enableVertexGradient: 0 |
|||
m_colorMode: 3 |
|||
m_fontColorGradient: |
|||
topLeft: {r: 1, g: 1, b: 1, a: 1} |
|||
topRight: {r: 1, g: 1, b: 1, a: 1} |
|||
bottomLeft: {r: 1, g: 1, b: 1, a: 1} |
|||
bottomRight: {r: 1, g: 1, b: 1, a: 1} |
|||
m_fontColorGradientPreset: {fileID: 0} |
|||
m_spriteAsset: {fileID: 0} |
|||
m_tintAllSprites: 0 |
|||
m_StyleSheet: {fileID: 0} |
|||
m_TextStyleHashCode: -1183493901 |
|||
m_overrideHtmlColors: 0 |
|||
m_faceColor: |
|||
serializedVersion: 2 |
|||
rgba: 4294967295 |
|||
m_fontSize: 21 |
|||
m_fontSizeBase: 36 |
|||
m_fontWeight: 400 |
|||
m_enableAutoSizing: 1 |
|||
m_fontSizeMin: 18 |
|||
m_fontSizeMax: 21 |
|||
m_fontStyle: 0 |
|||
m_HorizontalAlignment: 1 |
|||
m_VerticalAlignment: 512 |
|||
m_textAlignment: 65535 |
|||
m_characterSpacing: 0 |
|||
m_wordSpacing: 0 |
|||
m_lineSpacing: 0 |
|||
m_lineSpacingMax: 0 |
|||
m_paragraphSpacing: 0 |
|||
m_charWidthMaxAdj: 0 |
|||
m_enableWordWrapping: 1 |
|||
m_wordWrappingRatios: 0.4 |
|||
m_overflowMode: 0 |
|||
m_linkedTextComponent: {fileID: 0} |
|||
parentLinkedComponent: {fileID: 0} |
|||
m_enableKerning: 1 |
|||
m_enableExtraPadding: 0 |
|||
checkPaddingRequired: 0 |
|||
m_isRichText: 1 |
|||
m_parseCtrlCharacters: 1 |
|||
m_isOrthographic: 1 |
|||
m_isCullingEnabled: 0 |
|||
m_horizontalMapping: 0 |
|||
m_verticalMapping: 0 |
|||
m_uvLineOffset: 0 |
|||
m_geometrySortingOrder: 0 |
|||
m_IsTextObjectScaleStatic: 0 |
|||
m_VertexBufferAutoSizeReduction: 0 |
|||
m_useMaxVisibleDescender: 1 |
|||
m_pageToDisplay: 1 |
|||
m_margin: {x: 5, y: 5, z: 5, w: 5} |
|||
m_isUsingLegacyAnimationComponent: 0 |
|||
m_isVolumetricText: 0 |
|||
m_hasFontAssetChanged: 0 |
|||
m_baseMaterial: {fileID: 0} |
|||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0} |
|
|||
fileFormatVersion: 2 |
|||
guid: f90e4035352c7ce40b68e50109a9bb4f |
|||
PrefabImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
1001
Assets/Prefabs/UI/LobbyUserList.prefab
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!1 &1256834224708745402 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
serializedVersion: 6 |
|||
m_Component: |
|||
- component: {fileID: 8845592316474837655} |
|||
- component: {fileID: 1432688179978162209} |
|||
- component: {fileID: 7859013680193933450} |
|||
- component: {fileID: 4194466567228727858} |
|||
- component: {fileID: 8041986936720407558} |
|||
m_Layer: 5 |
|||
m_Name: ErrorText |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 0 |
|||
m_IsActive: 1 |
|||
--- !u!224 &8845592316474837655 |
|||
RectTransform: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 1256834224708745402} |
|||
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: 8141644855275361747} |
|||
m_RootOrder: 1 |
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
|||
m_AnchorMin: {x: 0.5, y: 0.5} |
|||
m_AnchorMax: {x: 0.5, y: 0.5} |
|||
m_AnchoredPosition: {x: 0, y: -75} |
|||
m_SizeDelta: {x: 300, y: 50} |
|||
m_Pivot: {x: 0.5, y: 0.5} |
|||
--- !u!222 &1432688179978162209 |
|||
CanvasRenderer: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 1256834224708745402} |
|||
m_CullTransparentMesh: 1 |
|||
--- !u!114 &7859013680193933450 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 1256834224708745402} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
m_Material: {fileID: 0} |
|||
m_Color: {r: 1, g: 1, b: 1, a: 1} |
|||
m_RaycastTarget: 1 |
|||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} |
|||
m_Maskable: 1 |
|||
m_OnCullStateChanged: |
|||
m_PersistentCalls: |
|||
m_Calls: [] |
|||
m_text: 'Error:' |
|||
m_isRightToLeft: 0 |
|||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} |
|||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} |
|||
m_fontSharedMaterials: [] |
|||
m_fontMaterial: {fileID: 0} |
|||
m_fontMaterials: [] |
|||
m_fontColor32: |
|||
serializedVersion: 2 |
|||
rgba: 4282729983 |
|||
m_fontColor: {r: 1, g: 0.2688679, b: 0.2688679, a: 1} |
|||
m_enableVertexGradient: 0 |
|||
m_colorMode: 3 |
|||
m_fontColorGradient: |
|||
topLeft: {r: 1, g: 1, b: 1, a: 1} |
|||
topRight: {r: 1, g: 1, b: 1, a: 1} |
|||
bottomLeft: {r: 1, g: 1, b: 1, a: 1} |
|||
bottomRight: {r: 1, g: 1, b: 1, a: 1} |
|||
m_fontColorGradientPreset: {fileID: 0} |
|||
m_spriteAsset: {fileID: 0} |
|||
m_tintAllSprites: 0 |
|||
m_StyleSheet: {fileID: 0} |
|||
m_TextStyleHashCode: -1183493901 |
|||
m_overrideHtmlColors: 0 |
|||
m_faceColor: |
|||
serializedVersion: 2 |
|||
rgba: 4294967295 |
|||
m_fontSize: 22 |
|||
m_fontSizeBase: 36 |
|||
m_fontWeight: 400 |
|||
m_enableAutoSizing: 1 |
|||
m_fontSizeMin: 12 |
|||
m_fontSizeMax: 22 |
|||
m_fontStyle: 0 |
|||
m_HorizontalAlignment: 2 |
|||
m_VerticalAlignment: 256 |
|||
m_textAlignment: 65535 |
|||
m_characterSpacing: 0 |
|||
m_wordSpacing: 0 |
|||
m_lineSpacing: 0 |
|||
m_lineSpacingMax: 0 |
|||
m_paragraphSpacing: 0 |
|||
m_charWidthMaxAdj: 0 |
|||
m_enableWordWrapping: 1 |
|||
m_wordWrappingRatios: 0.4 |
|||
m_overflowMode: 0 |
|||
m_linkedTextComponent: {fileID: 0} |
|||
parentLinkedComponent: {fileID: 0} |
|||
m_enableKerning: 1 |
|||
m_enableExtraPadding: 0 |
|||
checkPaddingRequired: 0 |
|||
m_isRichText: 1 |
|||
m_parseCtrlCharacters: 1 |
|||
m_isOrthographic: 1 |
|||
m_isCullingEnabled: 0 |
|||
m_horizontalMapping: 0 |
|||
m_verticalMapping: 0 |
|||
m_uvLineOffset: 0 |
|||
m_geometrySortingOrder: 0 |
|||
m_IsTextObjectScaleStatic: 0 |
|||
m_VertexBufferAutoSizeReduction: 0 |
|||
m_useMaxVisibleDescender: 1 |
|||
m_pageToDisplay: 1 |
|||
m_margin: {x: 0, y: 0, z: 0, w: 0} |
|||
m_isUsingLegacyAnimationComponent: 0 |
|||
m_isVolumetricText: 0 |
|||
m_hasFontAssetChanged: 0 |
|||
m_baseMaterial: {fileID: 0} |
|||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0} |
|||
--- !u!225 &4194466567228727858 |
|||
CanvasGroup: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 1256834224708745402} |
|||
m_Enabled: 1 |
|||
m_Alpha: 0 |
|||
m_Interactable: 0 |
|||
m_BlocksRaycasts: 0 |
|||
m_IgnoreParentGroups: 0 |
|||
--- !u!114 &8041986936720407558 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 1256834224708745402} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: ab355d5994635724dbde297a055fb586, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
m_onVisibilityChange: |
|||
m_PersistentCalls: |
|||
m_Calls: [] |
|||
showing: 0 |
|||
--- !u!1 &3885698492068079262 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
serializedVersion: 6 |
|||
m_Component: |
|||
- component: {fileID: 2952266133262597715} |
|||
- component: {fileID: 6343008175747624988} |
|||
- component: {fileID: 3328931846061827219} |
|||
- component: {fileID: 7708916085883345062} |
|||
- component: {fileID: 50617661778815274} |
|||
m_Layer: 5 |
|||
m_Name: SpinnerImage |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 0 |
|||
m_IsActive: 1 |
|||
--- !u!224 &2952266133262597715 |
|||
RectTransform: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 3885698492068079262} |
|||
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: 8141644855275361747} |
|||
m_RootOrder: 0 |
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
|||
m_AnchorMin: {x: 0.5, y: 0.5} |
|||
m_AnchorMax: {x: 0.5, y: 0.5} |
|||
m_AnchoredPosition: {x: 0, y: 0} |
|||
m_SizeDelta: {x: 100, y: 100} |
|||
m_Pivot: {x: 0.5, y: 0.5} |
|||
--- !u!222 &6343008175747624988 |
|||
CanvasRenderer: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 3885698492068079262} |
|||
m_CullTransparentMesh: 1 |
|||
--- !u!114 &3328931846061827219 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 3885698492068079262} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
m_Material: {fileID: 0} |
|||
m_Color: {r: 1, g: 1, b: 1, a: 1} |
|||
m_RaycastTarget: 1 |
|||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} |
|||
m_Maskable: 1 |
|||
m_OnCullStateChanged: |
|||
m_PersistentCalls: |
|||
m_Calls: [] |
|||
m_Sprite: {fileID: 21300000, guid: 7eb43e8205c10c846b4243bb963f4aa4, type: 3} |
|||
m_Type: 0 |
|||
m_PreserveAspect: 0 |
|||
m_FillCenter: 1 |
|||
m_FillMethod: 4 |
|||
m_FillAmount: 1 |
|||
m_FillClockwise: 1 |
|||
m_FillOrigin: 0 |
|||
m_UseSpriteMesh: 0 |
|||
m_PixelsPerUnitMultiplier: 1 |
|||
--- !u!225 &7708916085883345062 |
|||
CanvasGroup: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 3885698492068079262} |
|||
m_Enabled: 1 |
|||
m_Alpha: 1 |
|||
m_Interactable: 1 |
|||
m_BlocksRaycasts: 1 |
|||
m_IgnoreParentGroups: 0 |
|||
--- !u!114 &50617661778815274 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 3885698492068079262} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: ab355d5994635724dbde297a055fb586, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
m_onVisibilityChange: |
|||
m_PersistentCalls: |
|||
m_Calls: [] |
|||
showing: 0 |
|||
--- !u!1 &5113050813143078450 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
serializedVersion: 6 |
|||
m_Component: |
|||
- component: {fileID: 3762085718257779991} |
|||
- component: {fileID: 3237472603761236039} |
|||
- component: {fileID: 4465921850208724247} |
|||
- component: {fileID: 2807560142073425131} |
|||
- component: {fileID: 1576294672583716881} |
|||
m_Layer: 5 |
|||
m_Name: EmptyText |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 0 |
|||
m_IsActive: 1 |
|||
--- !u!224 &3762085718257779991 |
|||
RectTransform: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 5113050813143078450} |
|||
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: 8141644855275361747} |
|||
m_RootOrder: 2 |
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
|||
m_AnchorMin: {x: 0.5, y: 0.5} |
|||
m_AnchorMax: {x: 0.5, y: 0.5} |
|||
m_AnchoredPosition: {x: 0, y: 0} |
|||
m_SizeDelta: {x: 400, y: 50} |
|||
m_Pivot: {x: 0.5, y: 0.5} |
|||
--- !u!222 &3237472603761236039 |
|||
CanvasRenderer: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 5113050813143078450} |
|||
m_CullTransparentMesh: 1 |
|||
--- !u!114 &4465921850208724247 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 5113050813143078450} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
m_Material: {fileID: 0} |
|||
m_Color: {r: 1, g: 1, b: 1, a: 1} |
|||
m_RaycastTarget: 1 |
|||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} |
|||
m_Maskable: 1 |
|||
m_OnCullStateChanged: |
|||
m_PersistentCalls: |
|||
m_Calls: [] |
|||
m_text: No Servers Found. |
|||
m_isRightToLeft: 0 |
|||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} |
|||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} |
|||
m_fontSharedMaterials: [] |
|||
m_fontMaterial: {fileID: 0} |
|||
m_fontMaterials: [] |
|||
m_fontColor32: |
|||
serializedVersion: 2 |
|||
rgba: 4280558628 |
|||
m_fontColor: {r: 0.14150941, g: 0.14150941, b: 0.14150941, a: 1} |
|||
m_enableVertexGradient: 0 |
|||
m_colorMode: 3 |
|||
m_fontColorGradient: |
|||
topLeft: {r: 1, g: 1, b: 1, a: 1} |
|||
topRight: {r: 1, g: 1, b: 1, a: 1} |
|||
bottomLeft: {r: 1, g: 1, b: 1, a: 1} |
|||
bottomRight: {r: 1, g: 1, b: 1, a: 1} |
|||
m_fontColorGradientPreset: {fileID: 0} |
|||
m_spriteAsset: {fileID: 0} |
|||
m_tintAllSprites: 0 |
|||
m_StyleSheet: {fileID: 0} |
|||
m_TextStyleHashCode: -1183493901 |
|||
m_overrideHtmlColors: 0 |
|||
m_faceColor: |
|||
serializedVersion: 2 |
|||
rgba: 4294967295 |
|||
m_fontSize: 22 |
|||
m_fontSizeBase: 36 |
|||
m_fontWeight: 400 |
|||
m_enableAutoSizing: 1 |
|||
m_fontSizeMin: 12 |
|||
m_fontSizeMax: 22 |
|||
m_fontStyle: 0 |
|||
m_HorizontalAlignment: 2 |
|||
m_VerticalAlignment: 512 |
|||
m_textAlignment: 65535 |
|||
m_characterSpacing: 0 |
|||
m_wordSpacing: 0 |
|||
m_lineSpacing: 0 |
|||
m_lineSpacingMax: 0 |
|||
m_paragraphSpacing: 0 |
|||
m_charWidthMaxAdj: 0 |
|||
m_enableWordWrapping: 1 |
|||
m_wordWrappingRatios: 0.4 |
|||
m_overflowMode: 0 |
|||
m_linkedTextComponent: {fileID: 0} |
|||
parentLinkedComponent: {fileID: 0} |
|||
m_enableKerning: 1 |
|||
m_enableExtraPadding: 0 |
|||
checkPaddingRequired: 0 |
|||
m_isRichText: 1 |
|||
m_parseCtrlCharacters: 1 |
|||
m_isOrthographic: 1 |
|||
m_isCullingEnabled: 0 |
|||
m_horizontalMapping: 0 |
|||
m_verticalMapping: 0 |
|||
m_uvLineOffset: 0 |
|||
m_geometrySortingOrder: 0 |
|||
m_IsTextObjectScaleStatic: 0 |
|||
m_VertexBufferAutoSizeReduction: 0 |
|||
m_useMaxVisibleDescender: 1 |
|||
m_pageToDisplay: 1 |
|||
m_margin: {x: 0, y: 0, z: 0, w: 0} |
|||
m_isUsingLegacyAnimationComponent: 0 |
|||
m_isVolumetricText: 0 |
|||
m_hasFontAssetChanged: 0 |
|||
m_baseMaterial: {fileID: 0} |
|||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0} |
|||
--- !u!225 &2807560142073425131 |
|||
CanvasGroup: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 5113050813143078450} |
|||
m_Enabled: 1 |
|||
m_Alpha: 0 |
|||
m_Interactable: 0 |
|||
m_BlocksRaycasts: 0 |
|||
m_IgnoreParentGroups: 0 |
|||
--- !u!114 &1576294672583716881 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 5113050813143078450} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: ab355d5994635724dbde297a055fb586, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
m_onVisibilityChange: |
|||
m_PersistentCalls: |
|||
m_Calls: [] |
|||
showing: 0 |
|||
--- !u!1 &7144088886657378797 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
serializedVersion: 6 |
|||
m_Component: |
|||
- component: {fileID: 8141644855275361747} |
|||
- component: {fileID: 8024795096463497524} |
|||
- component: {fileID: 6317050540274997421} |
|||
- component: {fileID: 2592976293271768794} |
|||
- component: {fileID: 7469848848124085693} |
|||
- component: {fileID: 3773418773225383442} |
|||
m_Layer: 5 |
|||
m_Name: SpinnerUI |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 0 |
|||
m_IsActive: 1 |
|||
--- !u!224 &8141644855275361747 |
|||
RectTransform: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 7144088886657378797} |
|||
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: |
|||
- {fileID: 2952266133262597715} |
|||
- {fileID: 8845592316474837655} |
|||
- {fileID: 3762085718257779991} |
|||
m_Father: {fileID: 0} |
|||
m_RootOrder: 0 |
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
|||
m_AnchorMin: {x: 0.5, y: 0.5} |
|||
m_AnchorMax: {x: 0.5, y: 0.5} |
|||
m_AnchoredPosition: {x: 0, y: 0} |
|||
m_SizeDelta: {x: 100, y: 100} |
|||
m_Pivot: {x: 0.5, y: 0.5} |
|||
--- !u!222 &8024795096463497524 |
|||
CanvasRenderer: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 7144088886657378797} |
|||
m_CullTransparentMesh: 1 |
|||
--- !u!114 &6317050540274997421 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 7144088886657378797} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: e4af858941d9d1f418a84e8f0ff6085c, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
m_onVisibilityChange: |
|||
m_PersistentCalls: |
|||
m_Calls: [] |
|||
showing: 0 |
|||
errorText: {fileID: 7859013680193933450} |
|||
spinnerImage: {fileID: 50617661778815274} |
|||
noServerText: {fileID: 1576294672583716881} |
|||
errorTextVisibility: {fileID: 8041986936720407558} |
|||
--- !u!114 &2592976293271768794 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 7144088886657378797} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: edfa4d53eaae84c43ba581088940700c, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
OnObservedUpdated: |
|||
m_PersistentCalls: |
|||
m_Calls: |
|||
- m_Target: {fileID: 6317050540274997421} |
|||
m_TargetAssemblyTypeName: LobbyRooms.UI.SpinnerUI, Assembly-CSharp |
|||
m_MethodName: ObservedUpdated |
|||
m_Mode: 0 |
|||
m_Arguments: |
|||
m_ObjectArgument: {fileID: 0} |
|||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine |
|||
m_IntArgument: 0 |
|||
m_FloatArgument: 0 |
|||
m_StringArgument: |
|||
m_BoolArgument: 0 |
|||
m_CallState: 2 |
|||
--- !u!95 &7469848848124085693 |
|||
Animator: |
|||
serializedVersion: 3 |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 7144088886657378797} |
|||
m_Enabled: 1 |
|||
m_Avatar: {fileID: 0} |
|||
m_Controller: {fileID: 9100000, guid: 12ca31314ac02d24c9fac9beff769388, type: 2} |
|||
m_CullingMode: 0 |
|||
m_UpdateMode: 0 |
|||
m_ApplyRootMotion: 0 |
|||
m_LinearVelocityBlending: 0 |
|||
m_WarningMessage: |
|||
m_HasTransformHierarchy: 1 |
|||
m_AllowConstantClipSamplingOptimization: 1 |
|||
m_KeepAnimatorControllerStateOnDisable: 0 |
|||
--- !u!225 &3773418773225383442 |
|||
CanvasGroup: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 7144088886657378797} |
|||
m_Enabled: 1 |
|||
m_Alpha: 1 |
|||
m_Interactable: 1 |
|||
m_BlocksRaycasts: 1 |
|||
m_IgnoreParentGroups: 0 |
|
|||
fileFormatVersion: 2 |
|||
guid: c9b04951bd45e154b8096955d9bc8a0b |
|||
PrefabImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System; |
|||
using System.Collections; |
|||
using LobbyRooms; |
|||
using LobbyRooms.UI; |
|||
using TMPro; |
|||
using UnityEngine; |
|||
|
|||
public class CountdownUI : ObserverPanel<LobbyData> |
|||
{ |
|||
[SerializeField] |
|||
TMP_Text m_CountDownText; |
|||
|
|||
public override void ObservedUpdated(LobbyData observed) |
|||
{ |
|||
if (observed.CountDownTime <= 0) |
|||
return; |
|||
m_CountDownText.SetText($"Starting in: {observed.CountDownTime}"); |
|||
} |
|||
} |
|
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
using Utilities; |
|||
|
|||
namespace LobbyRooms.UI |
|||
{ |
|||
public class EndGameButtonUI : MonoBehaviour |
|||
{ |
|||
public void EndServer() |
|||
{ |
|||
Locator.Get.Messenger.OnReceiveMessage(MessageType.ToLobby, null); |
|||
} |
|||
} |
|||
} |
|
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
|
|||
namespace LobbyRooms.UI |
|||
{ |
|||
public class ExitButtonUI : MonoBehaviour |
|||
{ |
|||
public void OnExitButton() |
|||
{ |
|||
Application.Quit(); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 7a8d936c1e569c84ab12655041cb57ba |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using UnityEngine; |
|||
|
|||
namespace LobbyRooms.UI |
|||
{ |
|||
public class LobbyStateVisibilityUI : ObserverPanel<LobbyData> |
|||
{ |
|||
[SerializeField] |
|||
private LobbyState m_ShowThisWhen; |
|||
|
|||
public override void ObservedUpdated(LobbyData observed) |
|||
{ |
|||
if (m_ShowThisWhen.HasFlag(observed.State)) |
|||
Show(); |
|||
else |
|||
Hide(); |
|||
} |
|||
} |
|||
} |
|||
|
|
|||
fileFormatVersion: 2 |
|||
guid: f38cf340acfcd4c64a6968b7386ad570 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using Player; |
|||
using TMPro; |
|||
using UnityEngine; |
|||
|
|||
namespace LobbyRooms.UI |
|||
{ |
|||
/// <summary>
|
|||
/// Shows the player info in-lobby and game
|
|||
/// </summary>
|
|||
[RequireComponent(typeof(LobbyUserObserver))] |
|||
public class LobbyUserCardUI : ObserverPanel<LobbyUser> |
|||
{ |
|||
[SerializeField] |
|||
TMP_Text m_DisplayNameText; |
|||
|
|||
[SerializeField] |
|||
TMP_Text m_StatusText; |
|||
|
|||
[SerializeField] |
|||
TMP_Text m_EmoteText; |
|||
|
|||
public bool IsAssigned |
|||
{ |
|||
get { return UserId != null; } |
|||
} |
|||
|
|||
public string UserId { get; private set; } |
|||
private LobbyUserObserver m_observer; |
|||
|
|||
public void SetUser(LobbyUser myLobbyUser) |
|||
{ |
|||
Show(); |
|||
if (m_observer == null) |
|||
m_observer = GetComponent<LobbyUserObserver>(); |
|||
m_observer.BeginObserving(myLobbyUser); |
|||
UserId = myLobbyUser.ID; |
|||
} |
|||
|
|||
public void OnUserLeft() |
|||
{ |
|||
UserId = null; |
|||
Hide(); |
|||
m_observer.EndObserving(); |
|||
} |
|||
|
|||
public override void ObservedUpdated(LobbyUser observed) |
|||
{ |
|||
m_DisplayNameText.SetText(observed.DisplayName); |
|||
m_StatusText.SetText(SetStatusFancy(observed.UserStatus)); |
|||
m_EmoteText.SetText(observed.Emote); |
|||
} |
|||
|
|||
string SetStatusFancy(UserStatus status) |
|||
{ |
|||
switch (status) |
|||
{ |
|||
case UserStatus.Lobby: |
|||
return "<color=#56B4E9>Lobby.</color>"; // Light Blue
|
|||
case UserStatus.Ready: |
|||
return "<color=#009E73>Ready!</color>"; // Light Mint
|
|||
case UserStatus.Connecting: |
|||
return "<color=#F0E442>Connecting.</color>"; // Bright Yellow
|
|||
case UserStatus.Connected: |
|||
return "<color=#005500>Connected.</color>"; //Orange
|
|||
default: |
|||
return "<color=#56B4E9>In Lobby.</color>"; |
|||
} |
|||
} |
|||
} |
|||
} |
|
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
using UnityEngine.Serialization; |
|||
|
|||
namespace LobbyRooms.UI |
|||
{ |
|||
/// <summary>
|
|||
/// Watches for changes in the Lobby's player List
|
|||
/// </summary>
|
|||
[RequireComponent(typeof(LobbyDataObserver))] |
|||
public class LobbyUsersUI : ObserverPanel<LobbyData> |
|||
{ |
|||
[SerializeField] |
|||
List<LobbyUserCardUI> m_PlayerCardSlots = new List<LobbyUserCardUI>(); |
|||
List<string> m_CurrentUsers = new List<string>(); // Just for keeping track more easily of which users are already displayed.
|
|||
|
|||
/// <summary>
|
|||
/// When the observed data updates, we need to detect changes to the list of players.
|
|||
/// </summary>
|
|||
public override void ObservedUpdated(LobbyData observed) |
|||
{ |
|||
// if (observed.PlayerCount == m_CurrentUsers.Count) // TODO: Not a 100% accurate shorthand.
|
|||
// return;
|
|||
|
|||
for (int id = m_CurrentUsers.Count - 1; id >= 0; id--) // We might remove users if they aren't in the new data, so iterate backwards.
|
|||
{ |
|||
string userId = m_CurrentUsers[id]; |
|||
if (!observed.LobbyUsers.ContainsKey(userId)) |
|||
{ |
|||
foreach (var card in m_PlayerCardSlots) |
|||
{ |
|||
if (card.UserId == userId) |
|||
{ |
|||
card.OnUserLeft(); |
|||
OnUserLeft(userId); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
foreach (var lobbyUserKvp in observed.LobbyUsers) // If there are new players, we need to hook them into the UI.
|
|||
{ |
|||
if (m_CurrentUsers.Contains(lobbyUserKvp.Key)) |
|||
continue; |
|||
m_CurrentUsers.Add(lobbyUserKvp.Key); |
|||
|
|||
foreach (var pcu in m_PlayerCardSlots) |
|||
{ |
|||
if (pcu.IsAssigned) |
|||
continue; |
|||
pcu.SetUser(lobbyUserKvp.Value); |
|||
break; |
|||
} |
|||
} |
|||
} |
|||
|
|||
void OnUserLeft(string userID) |
|||
{ |
|||
if (!m_CurrentUsers.Contains(userID)) |
|||
return; |
|||
m_CurrentUsers.Remove(userID); |
|||
} |
|||
} |
|||
} |
|
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
using Utilities; |
|||
|
|||
namespace LobbyRooms.UI |
|||
{ |
|||
public class ReadyCheckUI : MonoBehaviour |
|||
{ |
|||
public void OnReadyButton() |
|||
{ |
|||
ChangeState(UserStatus.Ready); |
|||
} |
|||
public void OnCancelButton() |
|||
{ |
|||
ChangeState(UserStatus.Lobby); |
|||
} |
|||
private void ChangeState(UserStatus status) |
|||
{ |
|||
Locator.Get.Messenger.OnReceiveMessage(MessageType.ChangeLobbyUserState, status); |
|||
} |
|||
} |
|||
} |
|
|||
using System.Text; |
|||
using TMPro; |
|||
using UnityEngine; |
|||
using UnityEngine.Serialization; |
|||
|
|||
namespace LobbyRooms.UI |
|||
{ |
|||
public class SpinnerUI : ObserverPanel<LobbyServiceData> |
|||
{ |
|||
public TMP_Text errorText; |
|||
public UIPanelBase spinnerImage; |
|||
public UIPanelBase noServerText; |
|||
public UIPanelBase errorTextVisibility; |
|||
|
|||
public override void ObservedUpdated(LobbyServiceData observed) |
|||
{ |
|||
if (observed.State == LobbyServiceState.Fetching) |
|||
{ |
|||
Show(); |
|||
spinnerImage.Show(); |
|||
noServerText.Hide(); |
|||
errorTextVisibility.Hide(); |
|||
} |
|||
else if (observed.State == LobbyServiceState.Error) |
|||
{ |
|||
spinnerImage.Hide(); |
|||
errorTextVisibility.Show(); |
|||
var errorString = new StringBuilder(); |
|||
errorString.Append("Error"); |
|||
var codeString = ": " + observed.lastErrorCode; |
|||
if (observed.lastErrorCode < 1) |
|||
codeString = "."; |
|||
|
|||
errorString.Append(codeString); |
|||
errorText.SetText(errorString.ToString()); |
|||
} |
|||
else if (observed.State == LobbyServiceState.Fetched) |
|||
{ |
|||
if (observed.CurrentLobbies.Count < 1) |
|||
{ |
|||
noServerText.Show(); |
|||
} |
|||
else |
|||
{ |
|||
noServerText.Hide(); |
|||
} |
|||
|
|||
spinnerImage.Hide(); |
|||
} |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: e4af858941d9d1f418a84e8f0ff6085c |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
using Utilities; |
|||
|
|||
namespace LobbyRooms |
|||
{ |
|||
public class StartLobbyButton : MonoBehaviour |
|||
{ |
|||
public void ToJoinMenu() |
|||
{ |
|||
Locator.Get.Messenger.OnReceiveMessage(MessageType.ChangeGameState, GameState.JoinMenu); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 507533c9939ee6f4abe2b70c9c1eae43 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace Utilities |
|||
{ |
|||
/// <summary>
|
|||
/// Just for fun, give a cute default name if no name is provided.
|
|||
/// </summary>
|
|||
public static class NameGenerator |
|||
{ |
|||
public static string GetName(string userId) |
|||
{ |
|||
int seed = userId.GetHashCode(); |
|||
seed *= Math.Sign(seed); |
|||
StringBuilder nameOutput = new StringBuilder(); |
|||
#region Word part
|
|||
int word = seed % 22; |
|||
if (word == 0) // Note that some more data-driven approach would be better.
|
|||
nameOutput.Append("Ant"); |
|||
else if (word == 1) |
|||
nameOutput.Append("Bear"); |
|||
else if (word == 2) |
|||
nameOutput.Append("Cow"); |
|||
else if (word == 3) |
|||
nameOutput.Append("Dog"); |
|||
else if (word == 4) |
|||
nameOutput.Append("Eel"); |
|||
else if (word == 5) |
|||
nameOutput.Append("Frog"); |
|||
else if (word == 6) |
|||
nameOutput.Append("Gopher"); |
|||
else if (word == 7) |
|||
nameOutput.Append("Heron"); |
|||
else if (word == 8) |
|||
nameOutput.Append("Ibex"); |
|||
else if (word == 9) |
|||
nameOutput.Append("Jerboa"); |
|||
else if (word == 10) |
|||
nameOutput.Append("Koala"); |
|||
else if (word == 11) |
|||
nameOutput.Append("Llama"); |
|||
else if (word == 12) |
|||
nameOutput.Append("Moth"); |
|||
else if (word == 13) |
|||
nameOutput.Append("Newt"); |
|||
else if (word == 14) |
|||
nameOutput.Append("Owl"); |
|||
else if (word == 15) |
|||
nameOutput.Append("Puffin"); |
|||
else if (word == 16) |
|||
nameOutput.Append("Raven"); |
|||
else if (word == 17) |
|||
nameOutput.Append("Snake"); |
|||
else if (word == 18) |
|||
nameOutput.Append("Trout"); |
|||
else if (word == 19) |
|||
nameOutput.Append("Vulture"); |
|||
else if (word == 20) |
|||
nameOutput.Append("Wolf"); |
|||
else |
|||
nameOutput.Append("Zebra"); |
|||
#endregion
|
|||
|
|||
int number = seed % 1000; |
|||
nameOutput.Append(number.ToString("000")); |
|||
|
|||
return nameOutput.ToString(); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 064df57c398256e4e8fbd3c43df26118 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 93006e6c7cc88684f968141b0e6c16c7 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
{ |
|||
"MonoBehaviour": { |
|||
"Version": 3, |
|||
"EnableBurstCompilation": true, |
|||
"EnableOptimisations": true, |
|||
"EnableSafetyChecks": false, |
|||
"EnableDebugInAllBuilds": false, |
|||
"UsePlatformSDKLinker": false, |
|||
"CpuMinTargetX32": 0, |
|||
"CpuMaxTargetX32": 0, |
|||
"CpuMinTargetX64": 0, |
|||
"CpuMaxTargetX64": 0, |
|||
"CpuTargetsX32": 6, |
|||
"CpuTargetsX64": 72 |
|||
} |
|||
} |
|
|||
{ |
|||
"MonoBehaviour": { |
|||
"Version": 3, |
|||
"DisabledWarnings": "" |
|||
} |
|||
} |
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!387306366 &1 |
|||
MemorySettings: |
|||
m_ObjectHideFlags: 0 |
|||
m_EditorMemorySettings: |
|||
m_MainAllocatorBlockSize: -1 |
|||
m_ThreadAllocatorBlockSize: -1 |
|||
m_MainGfxBlockSize: -1 |
|||
m_ThreadGfxBlockSize: -1 |
|||
m_CacheBlockSize: -1 |
|||
m_TypetreeBlockSize: -1 |
|||
m_ProfilerBlockSize: -1 |
|||
m_ProfilerEditorBlockSize: -1 |
|||
m_BucketAllocatorGranularity: -1 |
|||
m_BucketAllocatorBucketsCount: -1 |
|||
m_BucketAllocatorBlockSize: -1 |
|||
m_BucketAllocatorBlockCount: -1 |
|||
m_ProfilerBucketAllocatorGranularity: -1 |
|||
m_ProfilerBucketAllocatorBucketsCount: -1 |
|||
m_ProfilerBucketAllocatorBlockSize: -1 |
|||
m_ProfilerBucketAllocatorBlockCount: -1 |
|||
m_TempAllocatorSizeMain: -1 |
|||
m_JobTempAllocatorBlockSize: -1 |
|||
m_BackgroundJobTempAllocatorBlockSize: -1 |
|||
m_JobTempAllocatorReducedBlockSize: -1 |
|||
m_TempAllocatorSizeGIBakingWorker: -1 |
|||
m_TempAllocatorSizeNavMeshWorker: -1 |
|||
m_TempAllocatorSizeAudioWorker: -1 |
|||
m_TempAllocatorSizeCloudWorker: -1 |
|||
m_TempAllocatorSizeGfx: -1 |
|||
m_TempAllocatorSizeJobWorker: -1 |
|||
m_TempAllocatorSizeBackgroundWorker: -1 |
|||
m_TempAllocatorSizePreloadManager: -1 |
|||
m_PlatformMemorySettings: {} |
|
|||
fileFormatVersion: 2 |
|||
guid: b58b3305a26c4764591529bfe1f064c3 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 7eb43e8205c10c846b4243bb963f4aa4 |
|||
TextureImporter: |
|||
internalIDToNameTable: [] |
|||
externalObjects: {} |
|||
serializedVersion: 11 |
|||
mipmaps: |
|||
mipMapMode: 0 |
|||
enableMipMap: 0 |
|||
sRGBTexture: 1 |
|||
linearTexture: 0 |
|||
fadeOut: 0 |
|||
borderMipMap: 0 |
|||
mipMapsPreserveCoverage: 0 |
|||
alphaTestReferenceValue: 0.5 |
|||
mipMapFadeDistanceStart: 1 |
|||
mipMapFadeDistanceEnd: 3 |
|||
bumpmap: |
|||
convertToNormalMap: 0 |
|||
externalNormalMap: 0 |
|||
heightScale: 0.25 |
|||
normalMapFilter: 0 |
|||
isReadable: 0 |
|||
streamingMipmaps: 0 |
|||
streamingMipmapsPriority: 0 |
|||
vTOnly: 0 |
|||
grayScaleToAlpha: 0 |
|||
generateCubemap: 6 |
|||
cubemapConvolution: 0 |
|||
seamlessCubemap: 0 |
|||
textureFormat: 1 |
|||
maxTextureSize: 2048 |
|||
textureSettings: |
|||
serializedVersion: 2 |
|||
filterMode: 1 |
|||
aniso: 1 |
|||
mipBias: 0 |
|||
wrapU: 1 |
|||
wrapV: 1 |
|||
wrapW: 1 |
|||
nPOTScale: 0 |
|||
lightmap: 0 |
|||
compressionQuality: 50 |
|||
spriteMode: 1 |
|||
spriteExtrude: 1 |
|||
spriteMeshType: 1 |
|||
alignment: 0 |
|||
spritePivot: {x: 0.5, y: 0.5} |
|||
spritePixelsToUnits: 100 |
|||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} |
|||
spriteGenerateFallbackPhysicsShape: 1 |
|||
alphaUsage: 1 |
|||
alphaIsTransparency: 1 |
|||
spriteTessellationDetail: -1 |
|||
textureType: 8 |
|||
textureShape: 1 |
|||
singleChannelComponent: 0 |
|||
flipbookRows: 1 |
|||
flipbookColumns: 1 |
|||
maxTextureSizeSet: 0 |
|||
compressionQualitySet: 0 |
|||
textureFormatSet: 0 |
|||
ignorePngGamma: 0 |
|||
applyGammaDecoding: 0 |
|||
platformSettings: |
|||
- serializedVersion: 3 |
|||
buildTarget: DefaultTexturePlatform |
|||
maxTextureSize: 2048 |
|||
resizeAlgorithm: 0 |
|||
textureFormat: -1 |
|||
textureCompression: 1 |
|||
compressionQuality: 50 |
|||
crunchedCompression: 0 |
|||
allowsAlphaSplitting: 0 |
|||
overridden: 0 |
|||
androidETC2FallbackOverride: 0 |
|||
forceMaximumCompressionQuality_BC6H_BC7: 0 |
|||
spriteSheet: |
|||
serializedVersion: 2 |
|||
sprites: [] |
|||
outline: [] |
|||
physicsShape: [] |
|||
bones: [] |
|||
spriteID: 5e97eb03825dee720800000000000000 |
|||
internalID: 0 |
|||
vertices: [] |
|||
indices: |
|||
edges: [] |
|||
weights: [] |
|||
secondaryTextures: [] |
|||
nameFileIdTable: {} |
|||
spritePackingTag: |
|||
pSDRemoveMatte: 0 |
|||
pSDShowRemoveMatteOption: 0 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!1102 &-8227511378914398008 |
|||
AnimatorState: |
|||
serializedVersion: 6 |
|||
m_ObjectHideFlags: 1 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_Name: Pause |
|||
m_Speed: 1 |
|||
m_CycleOffset: 0 |
|||
m_Transitions: |
|||
- {fileID: -8120510241330444836} |
|||
m_StateMachineBehaviours: [] |
|||
m_Position: {x: 50, y: 50, z: 0} |
|||
m_IKOnFeet: 0 |
|||
m_WriteDefaultValues: 1 |
|||
m_Mirror: 0 |
|||
m_SpeedParameterActive: 0 |
|||
m_MirrorParameterActive: 0 |
|||
m_CycleOffsetParameterActive: 0 |
|||
m_TimeParameterActive: 0 |
|||
m_Motion: {fileID: 7400000, guid: fef7968afddaa344fb658282f7ec64b0, type: 2} |
|||
m_Tag: |
|||
m_SpeedParameter: |
|||
m_MirrorParameter: |
|||
m_CycleOffsetParameter: |
|||
m_TimeParameter: |
|||
--- !u!1101 &-8120510241330444836 |
|||
AnimatorStateTransition: |
|||
m_ObjectHideFlags: 1 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_Name: |
|||
m_Conditions: |
|||
- m_ConditionMode: 1 |
|||
m_ConditionEvent: Spinning |
|||
m_EventTreshold: 0 |
|||
m_DstStateMachine: {fileID: 0} |
|||
m_DstState: {fileID: 8275329687920695311} |
|||
m_Solo: 0 |
|||
m_Mute: 0 |
|||
m_IsExit: 0 |
|||
serializedVersion: 3 |
|||
m_TransitionDuration: 0 |
|||
m_TransitionOffset: 0 |
|||
m_ExitTime: 0 |
|||
m_HasExitTime: 1 |
|||
m_HasFixedDuration: 1 |
|||
m_InterruptionSource: 0 |
|||
m_OrderedInterruption: 1 |
|||
m_CanTransitionToSelf: 1 |
|||
--- !u!1101 &-7244168724185863680 |
|||
AnimatorStateTransition: |
|||
m_ObjectHideFlags: 1 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_Name: |
|||
m_Conditions: |
|||
- m_ConditionMode: 2 |
|||
m_ConditionEvent: Spinning |
|||
m_EventTreshold: 0 |
|||
m_DstStateMachine: {fileID: 0} |
|||
m_DstState: {fileID: -8227511378914398008} |
|||
m_Solo: 0 |
|||
m_Mute: 0 |
|||
m_IsExit: 0 |
|||
serializedVersion: 3 |
|||
m_TransitionDuration: 0 |
|||
m_TransitionOffset: 0 |
|||
m_ExitTime: 0 |
|||
m_HasExitTime: 1 |
|||
m_HasFixedDuration: 1 |
|||
m_InterruptionSource: 0 |
|||
m_OrderedInterruption: 1 |
|||
m_CanTransitionToSelf: 1 |
|||
--- !u!1101 &-6073023726327908739 |
|||
AnimatorStateTransition: |
|||
m_ObjectHideFlags: 1 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_Name: |
|||
m_Conditions: |
|||
- m_ConditionMode: 1 |
|||
m_ConditionEvent: Error |
|||
m_EventTreshold: 0 |
|||
m_DstStateMachine: {fileID: 0} |
|||
m_DstState: {fileID: 2412120046085290492} |
|||
m_Solo: 0 |
|||
m_Mute: 0 |
|||
m_IsExit: 0 |
|||
serializedVersion: 3 |
|||
m_TransitionDuration: 0 |
|||
m_TransitionOffset: 0 |
|||
m_ExitTime: 0 |
|||
m_HasExitTime: 1 |
|||
m_HasFixedDuration: 1 |
|||
m_InterruptionSource: 4 |
|||
m_OrderedInterruption: 1 |
|||
m_CanTransitionToSelf: 1 |
|||
--- !u!1107 &-5797106235668173274 |
|||
AnimatorStateMachine: |
|||
serializedVersion: 6 |
|||
m_ObjectHideFlags: 1 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_Name: ErrorLayer |
|||
m_ChildStates: |
|||
- serializedVersion: 1 |
|||
m_State: {fileID: 2412120046085290492} |
|||
m_Position: {x: 450, y: 110, z: 0} |
|||
- serializedVersion: 1 |
|||
m_State: {fileID: 1598352576774540682} |
|||
m_Position: {x: 450, y: 210, z: 0} |
|||
m_ChildStateMachines: [] |
|||
m_AnyStateTransitions: [] |
|||
m_EntryTransitions: [] |
|||
m_StateMachineTransitions: {} |
|||
m_StateMachineBehaviours: [] |
|||
m_AnyStatePosition: {x: 50, y: 20, z: 0} |
|||
m_EntryPosition: {x: 50, y: 120, z: 0} |
|||
m_ExitPosition: {x: 800, y: 120, z: 0} |
|||
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} |
|||
m_DefaultState: {fileID: 2412120046085290492} |
|||
--- !u!91 &9100000 |
|||
AnimatorController: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_Name: SpinnerController |
|||
serializedVersion: 5 |
|||
m_AnimatorParameters: |
|||
- m_Name: Spinning |
|||
m_Type: 4 |
|||
m_DefaultFloat: 0 |
|||
m_DefaultInt: 0 |
|||
m_DefaultBool: 1 |
|||
m_Controller: {fileID: 0} |
|||
- m_Name: Error |
|||
m_Type: 4 |
|||
m_DefaultFloat: 0 |
|||
m_DefaultInt: 0 |
|||
m_DefaultBool: 0 |
|||
m_Controller: {fileID: 0} |
|||
m_AnimatorLayers: |
|||
- serializedVersion: 5 |
|||
m_Name: Base Layer |
|||
m_StateMachine: {fileID: 274881663938255016} |
|||
m_Mask: {fileID: 0} |
|||
m_Motions: [] |
|||
m_Behaviours: [] |
|||
m_BlendingMode: 0 |
|||
m_SyncedLayerIndex: -1 |
|||
m_DefaultWeight: 0 |
|||
m_IKPass: 0 |
|||
m_SyncedLayerAffectsTiming: 0 |
|||
m_Controller: {fileID: 9100000} |
|||
- serializedVersion: 5 |
|||
m_Name: ErrorLayer |
|||
m_StateMachine: {fileID: -5797106235668173274} |
|||
m_Mask: {fileID: 0} |
|||
m_Motions: [] |
|||
m_Behaviours: [] |
|||
m_BlendingMode: 1 |
|||
m_SyncedLayerIndex: -1 |
|||
m_DefaultWeight: 1 |
|||
m_IKPass: 0 |
|||
m_SyncedLayerAffectsTiming: 0 |
|||
m_Controller: {fileID: 9100000} |
|||
--- !u!1107 &274881663938255016 |
|||
AnimatorStateMachine: |
|||
serializedVersion: 6 |
|||
m_ObjectHideFlags: 1 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_Name: Base Layer |
|||
m_ChildStates: |
|||
- serializedVersion: 1 |
|||
m_State: {fileID: 8275329687920695311} |
|||
m_Position: {x: 400, y: 120, z: 0} |
|||
- serializedVersion: 1 |
|||
m_State: {fileID: -8227511378914398008} |
|||
m_Position: {x: 400, y: 210, z: 0} |
|||
m_ChildStateMachines: [] |
|||
m_AnyStateTransitions: [] |
|||
m_EntryTransitions: [] |
|||
m_StateMachineTransitions: {} |
|||
m_StateMachineBehaviours: [] |
|||
m_AnyStatePosition: {x: 50, y: 20, z: 0} |
|||
m_EntryPosition: {x: 50, y: 120, z: 0} |
|||
m_ExitPosition: {x: 800, y: 120, z: 0} |
|||
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} |
|||
m_DefaultState: {fileID: 8275329687920695311} |
|||
--- !u!1102 &1598352576774540682 |
|||
AnimatorState: |
|||
serializedVersion: 6 |
|||
m_ObjectHideFlags: 1 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_Name: SpinnerStatic |
|||
m_Speed: 1 |
|||
m_CycleOffset: 0 |
|||
m_Transitions: |
|||
- {fileID: -6073023726327908739} |
|||
m_StateMachineBehaviours: [] |
|||
m_Position: {x: 50, y: 50, z: 0} |
|||
m_IKOnFeet: 0 |
|||
m_WriteDefaultValues: 1 |
|||
m_Mirror: 0 |
|||
m_SpeedParameterActive: 0 |
|||
m_MirrorParameterActive: 0 |
|||
m_CycleOffsetParameterActive: 0 |
|||
m_TimeParameterActive: 0 |
|||
m_Motion: {fileID: 7400000, guid: fef7968afddaa344fb658282f7ec64b0, type: 2} |
|||
m_Tag: |
|||
m_SpeedParameter: |
|||
m_MirrorParameter: |
|||
m_CycleOffsetParameter: |
|||
m_TimeParameter: |
|||
--- !u!1102 &2412120046085290492 |
|||
AnimatorState: |
|||
serializedVersion: 6 |
|||
m_ObjectHideFlags: 1 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_Name: SpinnerError |
|||
m_Speed: 1 |
|||
m_CycleOffset: 0 |
|||
m_Transitions: |
|||
- {fileID: 2963536771589793208} |
|||
m_StateMachineBehaviours: [] |
|||
m_Position: {x: 50, y: 50, z: 0} |
|||
m_IKOnFeet: 0 |
|||
m_WriteDefaultValues: 1 |
|||
m_Mirror: 0 |
|||
m_SpeedParameterActive: 0 |
|||
m_MirrorParameterActive: 0 |
|||
m_CycleOffsetParameterActive: 0 |
|||
m_TimeParameterActive: 0 |
|||
m_Motion: {fileID: 7400000, guid: 8aac3971e57c2a94f8d287084b3b0565, type: 2} |
|||
m_Tag: |
|||
m_SpeedParameter: |
|||
m_MirrorParameter: |
|||
m_CycleOffsetParameter: |
|||
m_TimeParameter: |
|||
--- !u!1101 &2963536771589793208 |
|||
AnimatorStateTransition: |
|||
m_ObjectHideFlags: 1 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_Name: |
|||
m_Conditions: |
|||
- m_ConditionMode: 2 |
|||
m_ConditionEvent: Error |
|||
m_EventTreshold: 0 |
|||
m_DstStateMachine: {fileID: 0} |
|||
m_DstState: {fileID: 1598352576774540682} |
|||
m_Solo: 0 |
|||
m_Mute: 0 |
|||
m_IsExit: 0 |
|||
serializedVersion: 3 |
|||
m_TransitionDuration: 0.01 |
|||
m_TransitionOffset: 0 |
|||
m_ExitTime: 0.1 |
|||
m_HasExitTime: 0 |
|||
m_HasFixedDuration: 0 |
|||
m_InterruptionSource: 3 |
|||
m_OrderedInterruption: 1 |
|||
m_CanTransitionToSelf: 1 |
|||
--- !u!1102 &8275329687920695311 |
|||
AnimatorState: |
|||
serializedVersion: 6 |
|||
m_ObjectHideFlags: 1 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_Name: SpinnerUISpin |
|||
m_Speed: 1 |
|||
m_CycleOffset: 0 |
|||
m_Transitions: |
|||
- {fileID: -7244168724185863680} |
|||
m_StateMachineBehaviours: [] |
|||
m_Position: {x: 50, y: 50, z: 0} |
|||
m_IKOnFeet: 0 |
|||
m_WriteDefaultValues: 1 |
|||
m_Mirror: 0 |
|||
m_SpeedParameterActive: 0 |
|||
m_MirrorParameterActive: 0 |
|||
m_CycleOffsetParameterActive: 0 |
|||
m_TimeParameterActive: 0 |
|||
m_Motion: {fileID: 7400000, guid: 19f04425ed653504ebb780d2372dd9ba, type: 2} |
|||
m_Tag: |
|||
m_SpeedParameter: |
|||
m_MirrorParameter: |
|||
m_CycleOffsetParameter: |
|||
m_TimeParameter: |
|
|||
fileFormatVersion: 2 |
|||
guid: 12ca31314ac02d24c9fac9beff769388 |
|||
NativeFormatImporter: |
|||
externalObjects: {} |
|||
mainObjectFileID: 9100000 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!74 &7400000 |
|||
AnimationClip: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_Name: SpinnerError |
|||
serializedVersion: 6 |
|||
m_Legacy: 0 |
|||
m_Compressed: 0 |
|||
m_UseHighQualityCurve: 1 |
|||
m_RotationCurves: [] |
|||
m_CompressedRotationCurves: [] |
|||
m_EulerCurves: [] |
|||
m_PositionCurves: [] |
|||
m_ScaleCurves: [] |
|||
m_FloatCurves: |
|||
- curve: |
|||
serializedVersion: 2 |
|||
m_Curve: |
|||
- serializedVersion: 3 |
|||
time: 0 |
|||
value: 0 |
|||
inSlope: 0 |
|||
outSlope: 0 |
|||
tangentMode: 136 |
|||
weightedMode: 0 |
|||
inWeight: 0.33333334 |
|||
outWeight: 0.33333334 |
|||
- serializedVersion: 3 |
|||
time: 0.16666667 |
|||
value: 37 |
|||
inSlope: 258.4 |
|||
outSlope: 258.4 |
|||
tangentMode: 136 |
|||
weightedMode: 0 |
|||
inWeight: 0.33333334 |
|||
outWeight: 0.33333334 |
|||
- serializedVersion: 3 |
|||
time: 0.5 |
|||
value: 129.2 |
|||
inSlope: 0 |
|||
outSlope: 0 |
|||
tangentMode: 136 |
|||
weightedMode: 0 |
|||
inWeight: 0.33333334 |
|||
outWeight: 0.33333334 |
|||
m_PreInfinity: 2 |
|||
m_PostInfinity: 2 |
|||
m_RotationOrder: 4 |
|||
attribute: m_AnchoredPosition.x |
|||
path: SpinnerImage |
|||
classID: 224 |
|||
script: {fileID: 0} |
|||
- curve: |
|||
serializedVersion: 2 |
|||
m_Curve: |
|||
- serializedVersion: 3 |
|||
time: 0 |
|||
value: 0 |
|||
inSlope: 0 |
|||
outSlope: 0 |
|||
tangentMode: 136 |
|||
weightedMode: 0 |
|||
inWeight: 0.33333334 |
|||
outWeight: 0.33333334 |
|||
- serializedVersion: 3 |
|||
time: 0.16666667 |
|||
value: 63.8 |
|||
inSlope: 0 |
|||
outSlope: 0 |
|||
tangentMode: 136 |
|||
weightedMode: 0 |
|||
inWeight: 0.33333334 |
|||
outWeight: 0.33333334 |
|||
- serializedVersion: 3 |
|||
time: 0.5 |
|||
value: -287 |
|||
inSlope: 0 |
|||
outSlope: 0 |
|||
tangentMode: 136 |
|||
weightedMode: 0 |
|||
inWeight: 0.33333334 |
|||
outWeight: 0.33333334 |
|||
m_PreInfinity: 2 |
|||
m_PostInfinity: 2 |
|||
m_RotationOrder: 4 |
|||
attribute: m_AnchoredPosition.y |
|||
path: SpinnerImage |
|||
classID: 224 |
|||
script: {fileID: 0} |
|||
m_PPtrCurves: [] |
|||
m_SampleRate: 60 |
|||
m_WrapMode: 0 |
|||
m_Bounds: |
|||
m_Center: {x: 0, y: 0, z: 0} |
|||
m_Extent: {x: 0, y: 0, z: 0} |
|||
m_ClipBindingConstant: |
|||
genericBindings: |
|||
- serializedVersion: 2 |
|||
path: 4019898539 |
|||
attribute: 1460864421 |
|||
script: {fileID: 0} |
|||
typeID: 224 |
|||
customType: 28 |
|||
isPPtrCurve: 0 |
|||
- serializedVersion: 2 |
|||
path: 4019898539 |
|||
attribute: 538195251 |
|||
script: {fileID: 0} |
|||
typeID: 224 |
|||
customType: 28 |
|||
isPPtrCurve: 0 |
|||
pptrCurveMapping: [] |
|||
m_AnimationClipSettings: |
|||
serializedVersion: 2 |
|||
m_AdditiveReferencePoseClip: {fileID: 0} |
|||
m_AdditiveReferencePoseTime: 0 |
|||
m_StartTime: 0 |
|||
m_StopTime: 0.5 |
|||
m_OrientationOffsetY: 0 |
|||
m_Level: 0 |
|||
m_CycleOffset: 0 |
|||
m_HasAdditiveReferencePose: 0 |
|||
m_LoopTime: 1 |
|||
m_LoopBlend: 0 |
|||
m_LoopBlendOrientation: 0 |
|||
m_LoopBlendPositionY: 0 |
|||
m_LoopBlendPositionXZ: 0 |
|||
m_KeepOriginalOrientation: 0 |
|||
m_KeepOriginalPositionY: 1 |
|||
m_KeepOriginalPositionXZ: 0 |
|||
m_HeightFromFeet: 0 |
|||
m_Mirror: 0 |
|||
m_EditorCurves: |
|||
- curve: |
|||
serializedVersion: 2 |
|||
m_Curve: |
|||
- serializedVersion: 3 |
|||
time: 0 |
|||
value: 0 |
|||
inSlope: 0 |
|||
outSlope: 0 |
|||
tangentMode: 136 |
|||
weightedMode: 0 |
|||
inWeight: 0.33333334 |
|||
outWeight: 0.33333334 |
|||
- serializedVersion: 3 |
|||
time: 0.16666667 |
|||
value: 37 |
|||
inSlope: 258.4 |
|||
outSlope: 258.4 |
|||
tangentMode: 136 |
|||
weightedMode: 0 |
|||
inWeight: 0.33333334 |
|||
outWeight: 0.33333334 |
|||
- serializedVersion: 3 |
|||
time: 0.5 |
|||
value: 129.2 |
|||
inSlope: 0 |
|||
outSlope: 0 |
|||
tangentMode: 136 |
|||
weightedMode: 0 |
|||
inWeight: 0.33333334 |
|||
outWeight: 0.33333334 |
|||
m_PreInfinity: 2 |
|||
m_PostInfinity: 2 |
|||
m_RotationOrder: 4 |
|||
attribute: m_AnchoredPosition.x |
|||
path: SpinnerImage |
|||
classID: 224 |
|||
script: {fileID: 0} |
|||
- curve: |
|||
serializedVersion: 2 |
|||
m_Curve: |
|||
- serializedVersion: 3 |
|||
time: 0 |
|||
value: 0 |
|||
inSlope: 0 |
|||
outSlope: 0 |
|||
tangentMode: 136 |
|||
weightedMode: 0 |
|||
inWeight: 0.33333334 |
|||
outWeight: 0.33333334 |
|||
- serializedVersion: 3 |
|||
time: 0.16666667 |
|||
value: 63.8 |
|||
inSlope: 0 |
|||
outSlope: 0 |
|||
tangentMode: 136 |
|||
weightedMode: 0 |
|||
inWeight: 0.33333334 |
|||
outWeight: 0.33333334 |
|||
- serializedVersion: 3 |
|||
time: 0.5 |
|||
value: -287 |
|||
inSlope: 0 |
|||
outSlope: 0 |
|||
tangentMode: 136 |
|||
weightedMode: 0 |
|||
inWeight: 0.33333334 |
|||
outWeight: 0.33333334 |
|||
m_PreInfinity: 2 |
|||
m_PostInfinity: 2 |
|||
m_RotationOrder: 4 |
|||
attribute: m_AnchoredPosition.y |
|||
path: SpinnerImage |
|||
classID: 224 |
|||
script: {fileID: 0} |
|||
m_EulerEditorCurves: [] |
|||
m_HasGenericRootTransform: 0 |
|||
m_HasMotionFloatCurves: 0 |
|||
m_Events: [] |
|
|||
fileFormatVersion: 2 |
|||
guid: 8aac3971e57c2a94f8d287084b3b0565 |
|||
NativeFormatImporter: |
|||
externalObjects: {} |
|||
mainObjectFileID: 7400000 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!74 &7400000 |
|||
AnimationClip: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_Name: SpinnerStatic |
|||
serializedVersion: 6 |
|||
m_Legacy: 0 |
|||
m_Compressed: 0 |
|||
m_UseHighQualityCurve: 1 |
|||
m_RotationCurves: [] |
|||
m_CompressedRotationCurves: [] |
|||
m_EulerCurves: [] |
|||
m_PositionCurves: [] |
|||
m_ScaleCurves: [] |
|||
m_FloatCurves: |
|||
- curve: |
|||
serializedVersion: 2 |
|||
m_Curve: |
|||
- serializedVersion: 3 |
|||
time: 0 |
|||
value: 0 |
|||
inSlope: 0 |
|||
outSlope: 0 |
|||
tangentMode: 136 |
|||
weightedMode: 0 |
|||
inWeight: 0 |
|||
outWeight: 0 |
|||
m_PreInfinity: 2 |
|||
m_PostInfinity: 2 |
|||
m_RotationOrder: 4 |
|||
attribute: m_AnchoredPosition.x |
|||
path: SpinnerImage |
|||
classID: 224 |
|||
script: {fileID: 0} |
|||
- curve: |
|||
serializedVersion: 2 |
|||
m_Curve: |
|||
- serializedVersion: 3 |
|||
time: 0 |
|||
value: 0 |
|||
inSlope: 0 |
|||
outSlope: 0 |
|||
tangentMode: 136 |
|||
weightedMode: 0 |
|||
inWeight: 0 |
|||
outWeight: 0 |
|||
m_PreInfinity: 2 |
|||
m_PostInfinity: 2 |
|||
m_RotationOrder: 4 |
|||
attribute: m_AnchoredPosition.y |
|||
path: SpinnerImage |
|||
classID: 224 |
|||
script: {fileID: 0} |
|||
m_PPtrCurves: [] |
|||
m_SampleRate: 60 |
|||
m_WrapMode: 0 |
|||
m_Bounds: |
|||
m_Center: {x: 0, y: 0, z: 0} |
|||
m_Extent: {x: 0, y: 0, z: 0} |
|||
m_ClipBindingConstant: |
|||
genericBindings: |
|||
- serializedVersion: 2 |
|||
path: 4019898539 |
|||
attribute: 1460864421 |
|||
script: {fileID: 0} |
|||
typeID: 224 |
|||
customType: 28 |
|||
isPPtrCurve: 0 |
|||
- serializedVersion: 2 |
|||
path: 4019898539 |
|||
attribute: 538195251 |
|||
script: {fileID: 0} |
|||
typeID: 224 |
|||
customType: 28 |
|||
isPPtrCurve: 0 |
|||
pptrCurveMapping: [] |
|||
m_AnimationClipSettings: |
|||
serializedVersion: 2 |
|||
m_AdditiveReferencePoseClip: {fileID: 0} |
|||
m_AdditiveReferencePoseTime: 0 |
|||
m_StartTime: 0 |
|||
m_StopTime: 0 |
|||
m_OrientationOffsetY: 0 |
|||
m_Level: 0 |
|||
m_CycleOffset: 0 |
|||
m_HasAdditiveReferencePose: 0 |
|||
m_LoopTime: 1 |
|||
m_LoopBlend: 0 |
|||
m_LoopBlendOrientation: 0 |
|||
m_LoopBlendPositionY: 0 |
|||
m_LoopBlendPositionXZ: 0 |
|||
m_KeepOriginalOrientation: 0 |
|||
m_KeepOriginalPositionY: 1 |
|||
m_KeepOriginalPositionXZ: 0 |
|||
m_HeightFromFeet: 0 |
|||
m_Mirror: 0 |
|||
m_EditorCurves: |
|||
- curve: |
|||
serializedVersion: 2 |
|||
m_Curve: |
|||
- serializedVersion: 3 |
|||
time: 0 |
|||
value: 0 |
|||
inSlope: 0 |
|||
outSlope: 0 |
|||
tangentMode: 136 |
|||
weightedMode: 0 |
|||
inWeight: 0 |
|||
outWeight: 0 |
|||
m_PreInfinity: 2 |
|||
m_PostInfinity: 2 |
|||
m_RotationOrder: 4 |
|||
attribute: m_AnchoredPosition.x |
|||
path: SpinnerImage |
|||
classID: 224 |
|||
script: {fileID: 0} |
|||
- curve: |
|||
serializedVersion: 2 |
|||
m_Curve: |
|||
- serializedVersion: 3 |
|||
time: 0 |
|||
value: 0 |
|||
inSlope: 0 |
|||
outSlope: 0 |
|||
tangentMode: 136 |
|||
weightedMode: 0 |
|||
inWeight: 0 |
|||
outWeight: 0 |
|||
m_PreInfinity: 2 |
|||
m_PostInfinity: 2 |
|||
m_RotationOrder: 4 |
|||
attribute: m_AnchoredPosition.y |
|||
path: SpinnerImage |
|||
classID: 224 |
|||
script: {fileID: 0} |
|||
m_EulerEditorCurves: [] |
|||
m_HasGenericRootTransform: 0 |
|||
m_HasMotionFloatCurves: 0 |
|||
m_Events: [] |
|
|||
fileFormatVersion: 2 |
|||
guid: fef7968afddaa344fb658282f7ec64b0 |
|||
NativeFormatImporter: |
|||
externalObjects: {} |
|||
mainObjectFileID: 7400000 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!74 &7400000 |
|||
AnimationClip: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_Name: SpinnerUISpin |
|||
serializedVersion: 6 |
|||
m_Legacy: 0 |
|||
m_Compressed: 0 |
|||
m_UseHighQualityCurve: 1 |
|||
m_RotationCurves: [] |
|||
m_CompressedRotationCurves: [] |
|||
m_EulerCurves: |
|||
- curve: |
|||
serializedVersion: 2 |
|||
m_Curve: |
|||
- serializedVersion: 3 |
|||
time: 0 |
|||
value: {x: 0, y: 0, z: 0} |
|||
inSlope: {x: 0, y: 0, z: 0} |
|||
outSlope: {x: 0, y: 0, z: -360} |
|||
tangentMode: 0 |
|||
weightedMode: 0 |
|||
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} |
|||
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} |
|||
- serializedVersion: 3 |
|||
time: 1 |
|||
value: {x: 0, y: 0, z: -360} |
|||
inSlope: {x: 0, y: 0, z: -360} |
|||
outSlope: {x: 0, y: 0, z: 0} |
|||
tangentMode: 0 |
|||
weightedMode: 0 |
|||
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} |
|||
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} |
|||
m_PreInfinity: 2 |
|||
m_PostInfinity: 2 |
|||
m_RotationOrder: 4 |
|||
path: SpinnerImage |
|||
m_PositionCurves: [] |
|||
m_ScaleCurves: [] |
|||
m_FloatCurves: [] |
|||
m_PPtrCurves: [] |
|||
m_SampleRate: 60 |
|||
m_WrapMode: 0 |
|||
m_Bounds: |
|||
m_Center: {x: 0, y: 0, z: 0} |
|||
m_Extent: {x: 0, y: 0, z: 0} |
|||
m_ClipBindingConstant: |
|||
genericBindings: |
|||
- serializedVersion: 2 |
|||
path: 4019898539 |
|||
attribute: 4 |
|||
script: {fileID: 0} |
|||
typeID: 4 |
|||
customType: 4 |
|||
isPPtrCurve: 0 |
|||
pptrCurveMapping: [] |
|||
m_AnimationClipSettings: |
|||
serializedVersion: 2 |
|||
m_AdditiveReferencePoseClip: {fileID: 0} |
|||
m_AdditiveReferencePoseTime: 0 |
|||
m_StartTime: 0 |
|||
m_StopTime: 1 |
|||
m_OrientationOffsetY: 0 |
|||
m_Level: 0 |
|||
m_CycleOffset: 0 |
|||
m_HasAdditiveReferencePose: 0 |
|||
m_LoopTime: 1 |
|||
m_LoopBlend: 0 |
|||
m_LoopBlendOrientation: 0 |
|||
m_LoopBlendPositionY: 0 |
|||
m_LoopBlendPositionXZ: 0 |
|||
m_KeepOriginalOrientation: 0 |
|||
m_KeepOriginalPositionY: 1 |
|||
m_KeepOriginalPositionXZ: 0 |
|||
m_HeightFromFeet: 0 |
|||
m_Mirror: 0 |
|||
m_EditorCurves: |
|||
- curve: |
|||
serializedVersion: 2 |
|||
m_Curve: |
|||
- serializedVersion: 3 |
|||
time: 0 |
|||
value: 0 |
|||
inSlope: 0 |
|||
outSlope: 0 |
|||
tangentMode: 136 |
|||
weightedMode: 0 |
|||
inWeight: 0.33333334 |
|||
outWeight: 0.33333334 |
|||
- serializedVersion: 3 |
|||
time: 1 |
|||
value: 0 |
|||
inSlope: 0 |
|||
outSlope: 0 |
|||
tangentMode: 136 |
|||
weightedMode: 0 |
|||
inWeight: 0.33333334 |
|||
outWeight: 0.33333334 |
|||
m_PreInfinity: 2 |
|||
m_PostInfinity: 2 |
|||
m_RotationOrder: 4 |
|||
attribute: localEulerAnglesRaw.x |
|||
path: SpinnerImage |
|||
classID: 224 |
|||
script: {fileID: 0} |
|||
- curve: |
|||
serializedVersion: 2 |
|||
m_Curve: |
|||
- serializedVersion: 3 |
|||
time: 0 |
|||
value: 0 |
|||
inSlope: 0 |
|||
outSlope: 0 |
|||
tangentMode: 136 |
|||
weightedMode: 0 |
|||
inWeight: 0.33333334 |
|||
outWeight: 0.33333334 |
|||
- serializedVersion: 3 |
|||
time: 1 |
|||
value: 0 |
|||
inSlope: 0 |
|||
outSlope: 0 |
|||
tangentMode: 136 |
|||
weightedMode: 0 |
|||
inWeight: 0.33333334 |
|||
outWeight: 0.33333334 |
|||
m_PreInfinity: 2 |
|||
m_PostInfinity: 2 |
|||
m_RotationOrder: 4 |
|||
attribute: localEulerAnglesRaw.y |
|||
path: SpinnerImage |
|||
classID: 224 |
|||
script: {fileID: 0} |
|||
- curve: |
|||
serializedVersion: 2 |
|||
m_Curve: |
|||
- serializedVersion: 3 |
|||
time: 0 |
|||
value: 0 |
|||
inSlope: 0 |
|||
outSlope: -360 |
|||
tangentMode: 69 |
|||
weightedMode: 0 |
|||
inWeight: 0.33333334 |
|||
outWeight: 0.33333334 |
|||
- serializedVersion: 3 |
|||
time: 1 |
|||
value: -360 |
|||
inSlope: -360 |
|||
outSlope: 0 |
|||
tangentMode: 69 |
|||
weightedMode: 0 |
|||
inWeight: 0.33333334 |
|||
outWeight: 0.33333334 |
|||
m_PreInfinity: 2 |
|||
m_PostInfinity: 2 |
|||
m_RotationOrder: 4 |
|||
attribute: localEulerAnglesRaw.z |
|||
path: SpinnerImage |
|||
classID: 224 |
|||
script: {fileID: 0} |
|||
m_EulerEditorCurves: |
|||
- curve: |
|||
serializedVersion: 2 |
|||
m_Curve: [] |
|||
m_PreInfinity: 2 |
|||
m_PostInfinity: 2 |
|||
m_RotationOrder: 4 |
|||
attribute: m_LocalEulerAngles.x |
|||
path: SpinnerImage |
|||
classID: 224 |
|||
script: {fileID: 0} |
|||
- curve: |
|||
serializedVersion: 2 |
|||
m_Curve: [] |
|||
m_PreInfinity: 2 |
|||
m_PostInfinity: 2 |
|||
m_RotationOrder: 4 |
|||
attribute: m_LocalEulerAngles.y |
|||
path: SpinnerImage |
|||
classID: 224 |
|||
script: {fileID: 0} |
|||
- curve: |
|||
serializedVersion: 2 |
|||
m_Curve: [] |
|||
m_PreInfinity: 2 |
|||
m_PostInfinity: 2 |
|||
m_RotationOrder: 4 |
|||
attribute: m_LocalEulerAngles.z |
|||
path: SpinnerImage |
|||
classID: 224 |
|||
script: {fileID: 0} |
|||
m_HasGenericRootTransform: 0 |
|||
m_HasMotionFloatCurves: 0 |
|||
m_Events: [] |
|
|||
fileFormatVersion: 2 |
|||
guid: 19f04425ed653504ebb780d2372dd9ba |
|||
NativeFormatImporter: |
|||
externalObjects: {} |
|||
mainObjectFileID: 7400000 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
1001
Assets/Prefabs/UI/PlayerList.prefab
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
using Utilities; |
|||
|
|||
namespace LobbyRooms.UI |
|||
{ |
|||
public class HostReadyCheckUI : MonoBehaviour |
|||
{ |
|||
public void InitReadyCheck(bool init) |
|||
{ |
|||
Locator.Get.Messenger.OnReceiveMessage(MessageType.HostInitReadyCheck, init); |
|||
} |
|||
} |
|||
} |
|
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
using Utilities; |
|||
|
|||
namespace LobbyRooms.UI |
|||
{ |
|||
public class LobbyUserInteractionUI : UIPanelBase |
|||
{ |
|||
|
|||
public void HostInitReadyCheck() |
|||
{ |
|||
Locator.Get.Messenger.OnReceiveMessage(MessageType.HostInitReadyCheck, null); |
|||
} |
|||
|
|||
|
|||
} |
|||
} |
|
|||
using Player; |
|||
using TMPro; |
|||
using UnityEngine; |
|||
|
|||
namespace LobbyRooms.UI |
|||
{ |
|||
/// <summary>
|
|||
/// Shows the player info in-lobby and game
|
|||
/// </summary>
|
|||
[RequireComponent(typeof(LobbyUserObserver))] |
|||
public class PlayerCardUI : ObserverPanel<LobbyUser> |
|||
{ |
|||
[SerializeField] |
|||
TMP_Text m_DisplayNameText; |
|||
|
|||
[SerializeField] |
|||
TMP_Text m_StatusText; |
|||
|
|||
[SerializeField] |
|||
TMP_Text m_EmoteText; |
|||
|
|||
public bool IsAssigned { get { return UserId != null; } } |
|||
public string UserId { get; private set; } |
|||
|
|||
public void SetUser(LobbyUser myLobbyUser) |
|||
{ |
|||
Show(); |
|||
myLobbyUser.onDestroyed += OnUserLeft; |
|||
GetComponent<LobbyUserObserver>().BeginObserving(myLobbyUser); |
|||
UserId = myLobbyUser.ID; |
|||
} |
|||
|
|||
public void OnUserLeft(LobbyUser user) |
|||
{ |
|||
OnUserLeft(user?.ID); |
|||
} |
|||
public void OnUserLeft(string userId) |
|||
{ |
|||
if (userId == UserId) |
|||
{ |
|||
UserId = null; |
|||
Hide(); |
|||
} |
|||
} |
|||
|
|||
public override void ObservedUpdated(LobbyUser observed) |
|||
{ |
|||
m_DisplayNameText.SetText(observed.DisplayName); |
|||
m_StatusText.SetText(SetStatusFancy(observed.UserStatus)); |
|||
m_EmoteText.SetText(observed.Emote); |
|||
} |
|||
|
|||
string SetStatusFancy(UserStatus status) |
|||
{ |
|||
switch (status) |
|||
{ |
|||
case UserStatus.Lobby: |
|||
return "<color=#56B4E9>Lobby.</color>"; // Light Blue
|
|||
case UserStatus.ReadyCheck: |
|||
return "<color=#E69F00>Ready?</color>"; //Light Orange
|
|||
case UserStatus.Ready: |
|||
return "<color=#009E73>Ready!</color>"; // Light Mint
|
|||
case UserStatus.Connecting: |
|||
return "<color=#F0E442>Connecting.</color>"; // Bright Yellow
|
|||
case UserStatus.Connected: |
|||
return "<color=#005500>Connected.</color>"; //Orange
|
|||
default: |
|||
return "<color=#56B4E9>In Lobby.</color>"; |
|||
} |
|||
} |
|||
} |
|||
} |
|
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
using UnityEngine.Serialization; |
|||
|
|||
namespace LobbyRooms.UI |
|||
{ |
|||
/// <summary>
|
|||
/// Watches for changes in the Lobby's player List
|
|||
/// </summary>
|
|||
[RequireComponent(typeof(LobbyDataObserver))] |
|||
public class RoomPlayersUI : ObserverPanel<LobbyData> |
|||
{ |
|||
[SerializeField] |
|||
List<PlayerCardUI> m_PlayerCardSlots = new List<PlayerCardUI>(); |
|||
List<string> m_CurrentUsers = new List<string>(); // Just for keeping track more easily of which users are already displayed.
|
|||
|
|||
/// <summary>
|
|||
/// When the observed data updates, we need to detect changes to the list of players.
|
|||
/// </summary>
|
|||
public override void ObservedUpdated(LobbyData observed) |
|||
{ |
|||
// if (observed.PlayerCount == m_CurrentUsers.Count) // TODO: Not a 100% accurate shorthand.
|
|||
// return;
|
|||
|
|||
for (int id = m_CurrentUsers.Count - 1; id >= 0; id--) // We might remove users if they aren't in the new data, so iterate backwards.
|
|||
{ |
|||
string userId = m_CurrentUsers[id]; |
|||
if (!observed.LobbyUsers.ContainsKey(userId)) |
|||
{ foreach (var card in m_PlayerCardSlots) |
|||
{ if (card.UserId == userId) |
|||
{ |
|||
card.OnUserLeft(userId); |
|||
OnPlayerLeft(userId); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
foreach (var lobbyUserKvp in observed.LobbyUsers) // If there are new players, we need to hook them into the UI.
|
|||
{ |
|||
if (m_CurrentUsers.Contains(lobbyUserKvp.Key)) |
|||
continue; |
|||
m_CurrentUsers.Add(lobbyUserKvp.Key); |
|||
|
|||
foreach (var pcu in m_PlayerCardSlots) |
|||
{ |
|||
if (pcu.IsAssigned) |
|||
continue; |
|||
var lobbyUser = lobbyUserKvp.Value; |
|||
lobbyUser.onDestroyed += OnPlayerLeft; // TODO: Where do we unsubscribe?
|
|||
pcu.SetUser(lobbyUserKvp.Value); |
|||
break; |
|||
} |
|||
} |
|||
} |
|||
|
|||
void OnPlayerLeft(LobbyUser left) |
|||
{ |
|||
OnPlayerLeft(left.ID); |
|||
} |
|||
void OnPlayerLeft(string playerId) // TODO: We seem to waffle between player and user.
|
|||
{ |
|||
if (!m_CurrentUsers.Contains(playerId)) |
|||
return; |
|||
m_CurrentUsers.Remove(playerId); |
|||
} |
|||
} |
|||
} |
|
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
using Utilities; |
|||
|
|||
namespace LobbyRooms.UI |
|||
{ |
|||
public class UserReadyCheckUI : MonoBehaviour |
|||
{ |
|||
public void Ready(bool isReady) |
|||
{ |
|||
Locator.Get.Messenger.OnReceiveMessage(MessageType.LocalUserReadyCheckResponse, isReady); |
|||
} |
|||
} |
|||
} |
撰写
预览
正在加载...
取消
保存
Reference in new issue