localization - closes #17 & #16 #19

Merged
Fangh merged 13 commits from localization into main 2024-02-29 21:50:50 +00:00
4 changed files with 57 additions and 54 deletions
Showing only changes of commit 39bfa4b2e7 - Show all commits

View File

@ -17,14 +17,14 @@ MonoBehaviour:
m_SerializedData: [] m_SerializedData: []
m_GUID: 3638895c7d697af48853e75ae2426f52 m_GUID: 3638895c7d697af48853e75ae2426f52
m_SerializeEntries: m_SerializeEntries:
- m_GUID: b687ef6015830a84a91ae1c741f420fc - m_GUID: db738e9bed1d4da4fa372aa455bfa440
m_Address: English (en) m_Address: French (fr)
m_ReadOnly: 1 m_ReadOnly: 1
m_SerializedLabels: m_SerializedLabels:
- Locale - Locale
FlaggedDuringContentUpdateRestriction: 0 FlaggedDuringContentUpdateRestriction: 0
- m_GUID: db738e9bed1d4da4fa372aa455bfa440 - m_GUID: b687ef6015830a84a91ae1c741f420fc
m_Address: French (fr) m_Address: English (en)
m_ReadOnly: 1 m_ReadOnly: 1
m_SerializedLabels: m_SerializedLabels:
- Locale - Locale

View File

@ -25,7 +25,7 @@ MonoBehaviour:
m_Metadata: m_Metadata:
m_Items: [] m_Items: []
m_ProjectLocaleIdentifier: m_ProjectLocaleIdentifier:
m_Code: en m_Code: fr
m_PreloadBehavior: 1 m_PreloadBehavior: 1
m_InitializeSynchronously: 0 m_InitializeSynchronously: 0
references: references:
@ -44,7 +44,7 @@ MonoBehaviour:
type: {class: SpecificLocaleSelector, ns: UnityEngine.Localization.Settings, asm: Unity.Localization} type: {class: SpecificLocaleSelector, ns: UnityEngine.Localization.Settings, asm: Unity.Localization}
data: data:
m_LocaleId: m_LocaleId:
m_Code: en m_Code: fr
- rid: 8151037669503139843 - rid: 8151037669503139843
type: {class: LocalesProvider, ns: UnityEngine.Localization.Settings, asm: Unity.Localization} type: {class: LocalesProvider, ns: UnityEngine.Localization.Settings, asm: Unity.Localization}
data: data:

View File

@ -1003,7 +1003,7 @@ MonoBehaviour:
id: id:
creationDate: 0 creationDate: 0
explanationTime: 4 explanationTime: 4
stringTableCollection: {fileID: 0} stringTableCollection: {fileID: 11400000, guid: 3d4b6573839c0274ca08f4bf9dedeca2, type: 2}
roomCodeField: {fileID: 2023851070} roomCodeField: {fileID: 2023851070}
roomError: {fileID: 991600093} roomError: {fileID: 991600093}
playerNameField: {fileID: 1163479463} playerNameField: {fileID: 1163479463}
@ -3682,11 +3682,11 @@ RectTransform:
m_Children: [] m_Children: []
m_Father: {fileID: 2023851069} m_Father: {fileID: 2023851069}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: 2.9758, y: 20.4609} m_AnchoredPosition: {x: 0, y: -14}
m_SizeDelta: {x: 154.05, y: 13.5401} m_SizeDelta: {x: 0, y: 12}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0}
--- !u!114 &991600093 --- !u!114 &991600093
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -3734,12 +3734,12 @@ MonoBehaviour:
m_faceColor: m_faceColor:
serializedVersion: 2 serializedVersion: 2
rgba: 4294967295 rgba: 4294967295
m_fontSize: 11.43 m_fontSize: 11.25
m_fontSizeBase: 11.43 m_fontSizeBase: 11.43
m_fontWeight: 400 m_fontWeight: 400
m_enableAutoSizing: 0 m_enableAutoSizing: 1
m_fontSizeMin: 18 m_fontSizeMin: 8
m_fontSizeMax: 72 m_fontSizeMax: 12
m_fontStyle: 0 m_fontStyle: 0
m_HorizontalAlignment: 1 m_HorizontalAlignment: 1
m_VerticalAlignment: 256 m_VerticalAlignment: 256
@ -3770,7 +3770,7 @@ MonoBehaviour:
m_VertexBufferAutoSizeReduction: 0 m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1 m_useMaxVisibleDescender: 1
m_pageToDisplay: 1 m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: -0.000000025251643, w: 0} m_margin: {x: 5, y: 0, z: 5, w: 0}
m_isUsingLegacyAnimationComponent: 0 m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0 m_isVolumetricText: 0
m_hasFontAssetChanged: 0 m_hasFontAssetChanged: 0
@ -4586,9 +4586,9 @@ RectTransform:
- {fileID: 1224049645} - {fileID: 1224049645}
m_Father: {fileID: 2027556832} m_Father: {fileID: 2027556832}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: 0, y: -97.527} m_AnchoredPosition: {x: 0, y: -1178.527}
m_SizeDelta: {x: 160, y: 30} m_SizeDelta: {x: 160, y: 30}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1163479463 --- !u!114 &1163479463
@ -5026,16 +5026,16 @@ RectTransform:
m_GameObject: {fileID: 1224049644} m_GameObject: {fileID: 1224049644}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1.0029413, y: 1.0029413, z: 0.8627451} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 1163479462} m_Father: {fileID: 1163479462}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 2.9845557, y: 18.5} m_AnchoredPosition: {x: 0, y: 14}
m_SizeDelta: {x: 154.05, y: 13.5401} m_SizeDelta: {x: 0, y: 12}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 1}
--- !u!114 &1224049646 --- !u!114 &1224049646
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -5083,12 +5083,12 @@ MonoBehaviour:
m_faceColor: m_faceColor:
serializedVersion: 2 serializedVersion: 2
rgba: 4294967295 rgba: 4294967295
m_fontSize: 11.43 m_fontSize: 10.1
m_fontSizeBase: 11.43 m_fontSizeBase: 11.43
m_fontWeight: 400 m_fontWeight: 400
m_enableAutoSizing: 0 m_enableAutoSizing: 1
m_fontSizeMin: 18 m_fontSizeMin: 8
m_fontSizeMax: 72 m_fontSizeMax: 12
m_fontStyle: 0 m_fontStyle: 0
m_HorizontalAlignment: 1 m_HorizontalAlignment: 1
m_VerticalAlignment: 256 m_VerticalAlignment: 256
@ -5119,7 +5119,7 @@ MonoBehaviour:
m_VertexBufferAutoSizeReduction: 0 m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1 m_useMaxVisibleDescender: 1
m_pageToDisplay: 1 m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: -0.000000025251643, w: 0} m_margin: {x: 5, y: 0, z: 5, w: 0}
m_isUsingLegacyAnimationComponent: 0 m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0 m_isVolumetricText: 0
m_hasFontAssetChanged: 0 m_hasFontAssetChanged: 0
@ -5581,9 +5581,9 @@ RectTransform:
m_Children: [] m_Children: []
m_Father: {fileID: 2027556832} m_Father: {fileID: 2027556832}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: 0, y: -409} m_AnchoredPosition: {x: 0, y: -1490}
m_SizeDelta: {x: 160, y: 30} m_SizeDelta: {x: 160, y: 30}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1371739072 --- !u!114 &1371739072
@ -7085,11 +7085,11 @@ RectTransform:
m_Children: [] m_Children: []
m_Father: {fileID: 1163479462} m_Father: {fileID: 1163479462}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: 2.8591, y: -36.5711} m_AnchoredPosition: {x: 0, y: -14}
m_SizeDelta: {x: 194.2818, y: 45.5423} m_SizeDelta: {x: 0, y: 14}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0}
--- !u!114 &1770783106 --- !u!114 &1770783106
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -7137,15 +7137,15 @@ MonoBehaviour:
m_faceColor: m_faceColor:
serializedVersion: 2 serializedVersion: 2
rgba: 4294967295 rgba: 4294967295
m_fontSize: 9.9 m_fontSize: 10
m_fontSizeBase: 9.9 m_fontSizeBase: 9.9
m_fontWeight: 400 m_fontWeight: 400
m_enableAutoSizing: 0 m_enableAutoSizing: 1
m_fontSizeMin: 18 m_fontSizeMin: 8
m_fontSizeMax: 72 m_fontSizeMax: 10
m_fontStyle: 0 m_fontStyle: 0
m_HorizontalAlignment: 2 m_HorizontalAlignment: 2
m_VerticalAlignment: 256 m_VerticalAlignment: 512
m_textAlignment: 65535 m_textAlignment: 65535
m_characterSpacing: 0 m_characterSpacing: 0
m_wordSpacing: 0 m_wordSpacing: 0
@ -7173,7 +7173,7 @@ MonoBehaviour:
m_VertexBufferAutoSizeReduction: 0 m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1 m_useMaxVisibleDescender: 1
m_pageToDisplay: 1 m_pageToDisplay: 1
m_margin: {x: 20.1389, y: 0, z: 21.198944, w: 30.573076} m_margin: {x: 5, y: 0, z: 5, w: 0}
m_isUsingLegacyAnimationComponent: 0 m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0 m_isVolumetricText: 0
m_hasFontAssetChanged: 0 m_hasFontAssetChanged: 0
@ -8104,9 +8104,9 @@ RectTransform:
- {fileID: 991600092} - {fileID: 991600092}
m_Father: {fileID: 2027556832} m_Father: {fileID: 2027556832}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: 0, y: 272} m_AnchoredPosition: {x: 0, y: -809}
m_SizeDelta: {x: 160, y: 30} m_SizeDelta: {x: 160, y: 30}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &2023851070 --- !u!114 &2023851070
@ -8583,15 +8583,15 @@ MonoBehaviour:
m_faceColor: m_faceColor:
serializedVersion: 2 serializedVersion: 2
rgba: 4294967295 rgba: 4294967295
m_fontSize: 102 m_fontSize: 80
m_fontSizeBase: 102 m_fontSizeBase: 102
m_fontWeight: 400 m_fontWeight: 400
m_enableAutoSizing: 0 m_enableAutoSizing: 1
m_fontSizeMin: 18 m_fontSizeMin: 50
m_fontSizeMax: 72 m_fontSizeMax: 80
m_fontStyle: 0 m_fontStyle: 0
m_HorizontalAlignment: 2 m_HorizontalAlignment: 2
m_VerticalAlignment: 512 m_VerticalAlignment: 1024
m_textAlignment: 65535 m_textAlignment: 65535
m_characterSpacing: 0 m_characterSpacing: 0
m_wordSpacing: 0 m_wordSpacing: 0
@ -8619,7 +8619,7 @@ MonoBehaviour:
m_VertexBufferAutoSizeReduction: 0 m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1 m_useMaxVisibleDescender: 1
m_pageToDisplay: 1 m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0} m_margin: {x: 0, y: 0, z: 0, w: 25}
m_isUsingLegacyAnimationComponent: 0 m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0 m_isVolumetricText: 0
m_hasFontAssetChanged: 0 m_hasFontAssetChanged: 0

View File

@ -114,6 +114,9 @@ private void OnApplicationQuit()
private void Update() private void Update()
{ {
if (myRoom == null)
return;
if (myRoom.currentState == (int)GameState.Explanation && endOfViewDate != DateTime.MinValue) if (myRoom.currentState == (int)GameState.Explanation && endOfViewDate != DateTime.MinValue)
{ {
TimeSpan duration = endOfViewDate - DateTime.Now; TimeSpan duration = endOfViewDate - DateTime.Now;