feat: Move GameManager to Managers

This commit is contained in:
Michel Roux 2024-01-28 00:32:01 +01:00
parent 5e207ddae7
commit e994fd7f4e
2 changed files with 40 additions and 40 deletions

View File

@ -862,6 +862,7 @@ GameObject:
- component: {fileID: 429358649} - component: {fileID: 429358649}
- component: {fileID: 429358651} - component: {fileID: 429358651}
- component: {fileID: 429358652} - component: {fileID: 429358652}
- component: {fileID: 429358653}
m_Layer: 0 m_Layer: 0
m_Name: '[Managers]' m_Name: '[Managers]'
m_TagString: Untagged m_TagString: Untagged
@ -925,6 +926,42 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
Canvas: {fileID: 1202782726} Canvas: {fileID: 1202782726}
--- !u!114 &429358653
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 429358648}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 27a435387a7644784a6fc6ae538b68e5, type: 3}
m_Name:
m_EditorClassIdentifier:
currentPlayer:
name:
id:
creationDate: 0
explanationTime: 4
roomCodeField: {fileID: 2023851070}
roomError: {fileID: 991600093}
playerNameField: {fileID: 1163479463}
nameError: {fileID: 1224049646}
submitNewPlayer: {fileID: 1158329299}
listPlayersUI: {fileID: 1891690322}
submitStartGame: {fileID: 638947073}
HomeConnection: {fileID: 2027556831}
WaitingRoom: {fileID: 1590939977}
BeforeStart: {fileID: 563000513}
TakePicture: {fileID: 1181392805}
VotePicture: {fileID: 531335861}
WaitingOtherPlayers: {fileID: 2095389711}
EndGame: {fileID: 1850164816}
myRoom:
code:
currentQuestion: 0
creationDate: 0
currentState: 0
--- !u!1 &436596783 --- !u!1 &436596783
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1257,7 +1294,7 @@ MonoBehaviour:
m_OnClick: m_OnClick:
m_PersistentCalls: m_PersistentCalls:
m_Calls: m_Calls:
- m_Target: {fileID: 1202782732} - m_Target: {fileID: 429358653}
m_TargetAssemblyTypeName: GameManager, Assembly-CSharp m_TargetAssemblyTypeName: GameManager, Assembly-CSharp
m_MethodName: StartGame m_MethodName: StartGame
m_Mode: 1 m_Mode: 1
@ -3032,7 +3069,7 @@ MonoBehaviour:
m_OnClick: m_OnClick:
m_PersistentCalls: m_PersistentCalls:
m_Calls: m_Calls:
- m_Target: {fileID: 1202782732} - m_Target: {fileID: 429358653}
m_TargetAssemblyTypeName: GameManager, Assembly-CSharp m_TargetAssemblyTypeName: GameManager, Assembly-CSharp
m_MethodName: OnClickSubmitSignIn m_MethodName: OnClickSubmitSignIn
m_Mode: 1 m_Mode: 1
@ -3407,7 +3444,6 @@ GameObject:
- component: {fileID: 1202782729} - component: {fileID: 1202782729}
- component: {fileID: 1202782728} - component: {fileID: 1202782728}
- component: {fileID: 1202782727} - component: {fileID: 1202782727}
- component: {fileID: 1202782732}
m_Layer: 5 m_Layer: 5
m_Name: Canvas m_Name: Canvas
m_TagString: Untagged m_TagString: Untagged
@ -3498,42 +3534,6 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0} m_Pivot: {x: 0, y: 0}
--- !u!114 &1202782732
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1202782726}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 27a435387a7644784a6fc6ae538b68e5, type: 3}
m_Name:
m_EditorClassIdentifier:
currentPlayer:
name:
id:
creationDate: 0
explanationTime: 4
roomCodeField: {fileID: 2023851070}
roomError: {fileID: 991600093}
playerNameField: {fileID: 1163479463}
nameError: {fileID: 1224049646}
submitNewPlayer: {fileID: 1158329299}
listPlayersUI: {fileID: 1891690322}
submitStartGame: {fileID: 638947073}
HomeConnection: {fileID: 2027556831}
WaitingRoom: {fileID: 1590939977}
BeforeStart: {fileID: 563000513}
TakePicture: {fileID: 1181392805}
VotePicture: {fileID: 531335861}
WaitingOtherPlayers: {fileID: 2095389711}
EndGame: {fileID: 1850164816}
myRoom:
code:
currentQuestion: 0
creationDate: 0
currentState: 0
--- !u!1 &1224049644 --- !u!1 &1224049644
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -42,7 +42,7 @@ public void UploadPhoto()
GameManager game = Canvas.GetComponent<GameManager>(); GameManager game = Canvas.GetComponent<GameManager>();
string imageUuid = Guid.NewGuid().ToString(); string imageUuid = Guid.NewGuid().ToString();
StorageReference imageRef = storage.Child(game.myRoom.code).Child(game.currentPlayer.id).Child($"{imageUuid}.jpg"); StorageReference imageRef = storage.Child($"{game.myRoom.code}/{game.currentPlayer.id}/{imageUuid}.png");
imageRef.PutBytesAsync(photoBytes).ContinueWith((Task<StorageMetadata> task) => imageRef.PutBytesAsync(photoBytes).ContinueWith((Task<StorageMetadata> task) =>
{ {