diff --git a/Assets/Prefabs.meta b/Assets/Prefabs.meta new file mode 100644 index 0000000..ffdf056 --- /dev/null +++ b/Assets/Prefabs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3886f5e8ed5884a99bbd7a95c2f6b27c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/PropositionFrame.prefab b/Assets/Prefabs/PropositionFrame.prefab new file mode 100644 index 0000000..a90936e --- /dev/null +++ b/Assets/Prefabs/PropositionFrame.prefab @@ -0,0 +1,323 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &4654528575356896576 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2993570874611009919} + - component: {fileID: 1014643739613990429} + - component: {fileID: 782069874130417341} + m_Layer: 5 + m_Name: PropositionFrame.PlayerName + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2993570874611009919 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4654528575356896576} + 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: 3953387086501582844} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 75} + m_SizeDelta: {x: 0, y: 50} + m_Pivot: {x: 0.5, y: 1} +--- !u!222 &1014643739613990429 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4654528575356896576} + m_CullTransparentMesh: 1 +--- !u!114 &782069874130417341 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4654528575356896576} + 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: 01234567890123456 + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 72af27804d5aa49408430b4b2500f877, type: 2} + m_sharedMaterial: {fileID: 8890805173838430465, guid: 72af27804d5aa49408430b4b2500f877, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4278190080 + m_fontColor: {r: 0, g: 0, b: 0, 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: 64 + m_fontSizeBase: 64 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + 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!1 &5138585656555316049 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1424407976172285298} + - component: {fileID: 2716772787860397017} + - component: {fileID: 423066451263622249} + m_Layer: 5 + m_Name: PropositionFrame.Picture + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1424407976172285298 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5138585656555316049} + 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: 3953387086501582844} + 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: 500, y: 500} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &2716772787860397017 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5138585656555316049} + m_CullTransparentMesh: 1 +--- !u!114 &423066451263622249 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5138585656555316049} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, 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_Texture: {fileID: 2800000, guid: 57d7dffbdddc24c959c3c072208cbafe, type: 3} + m_UVRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 +--- !u!1 &6433924239447685472 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4509981124141486577} + - component: {fileID: 4661236625436494338} + m_Layer: 5 + m_Name: PropositionFrame.VotersGrid + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4509981124141486577 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6433924239447685472} + 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: 3953387086501582844} + 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!114 &4661236625436494338 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6433924239447685472} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8a8695521f0d02e499659fee002a26c2, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 5 + m_Right: 5 + m_Top: 5 + m_Bottom: 5 + m_ChildAlignment: 4 + m_StartCorner: 0 + m_StartAxis: 0 + m_CellSize: {x: 200, y: 100} + m_Spacing: {x: 75, y: 25} + m_Constraint: 0 + m_ConstraintCount: 2 +--- !u!1 &7016400590500538500 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3953387086501582844} + - component: {fileID: 9141429158838199157} + m_Layer: 5 + m_Name: PropositionFrame + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3953387086501582844 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7016400590500538500} + 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: 1424407976172285298} + - {fileID: 4509981124141486577} + - {fileID: 2993570874611009919} + m_Father: {fileID: 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: -556, y: 0} + m_SizeDelta: {x: 500, y: 500} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &9141429158838199157 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7016400590500538500} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 18061644c95a147eb81059fa46414624, type: 3} + m_Name: + m_EditorClassIdentifier: + picture: {fileID: 423066451263622249} + voterStickerPrefab: {fileID: 4312846972391547553, guid: 69942fa558cf34dfc91982c6bccef840, type: 3} + playerName: {fileID: 782069874130417341} + playerGrid: {fileID: 4509981124141486577} diff --git a/Assets/Prefabs/PropositionFrame.prefab.meta b/Assets/Prefabs/PropositionFrame.prefab.meta new file mode 100644 index 0000000..811fab0 --- /dev/null +++ b/Assets/Prefabs/PropositionFrame.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6f5bb6680660e49fd9cb0ff864a44bf4 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/VoterSticker.prefab b/Assets/Prefabs/VoterSticker.prefab new file mode 100644 index 0000000..c90d840 --- /dev/null +++ b/Assets/Prefabs/VoterSticker.prefab @@ -0,0 +1,262 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &2462192938238515664 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4847416433156003170} + - component: {fileID: 5164741681773790499} + - component: {fileID: 2430977146559507814} + m_Layer: 5 + m_Name: VoterSticker.PlayerName + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4847416433156003170 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2462192938238515664} + 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: 943229596838791819} + 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: -10, y: -10} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &5164741681773790499 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2462192938238515664} + m_CullTransparentMesh: 1 +--- !u!114 &2430977146559507814 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2462192938238515664} + 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: playernamevraimentlong + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 72af27804d5aa49408430b4b2500f877, type: 2} + m_sharedMaterial: {fileID: 8890805173838430465, guid: 72af27804d5aa49408430b4b2500f877, 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: 36 + m_fontSizeBase: 36 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + 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: 0 + m_wordWrappingRatios: 0.4 + m_overflowMode: 1 + 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!1 &2704804050822234674 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7101168500304376256} + - component: {fileID: 3089203999989860493} + - component: {fileID: 5096287721252539344} + m_Layer: 5 + m_Name: VoterSticker.Backgound + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &7101168500304376256 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2704804050822234674} + 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: 943229596838791819} + 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 &3089203999989860493 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2704804050822234674} + m_CullTransparentMesh: 1 +--- !u!114 &5096287721252539344 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2704804050822234674} + 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: 0.854902, g: 0.75294125, b: 0.76470596, 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: 0} + m_Type: 1 + 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!1 &4312846972391547553 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 943229596838791819} + - component: {fileID: -3919290783414862184} + m_Layer: 5 + m_Name: VoterSticker + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &943229596838791819 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4312846972391547553} + 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: 7101168500304376256} + - {fileID: 4847416433156003170} + m_Father: {fileID: 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: -427, y: 38} + m_SizeDelta: {x: 200, y: 100} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &-3919290783414862184 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4312846972391547553} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 63ba002d2116d4c54a8d55e905869d8f, type: 3} + m_Name: + m_EditorClassIdentifier: + playerNameLabel: {fileID: 2430977146559507814} diff --git a/Assets/Prefabs/VoterSticker.prefab.meta b/Assets/Prefabs/VoterSticker.prefab.meta new file mode 100644 index 0000000..5f266c3 --- /dev/null +++ b/Assets/Prefabs/VoterSticker.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 69942fa558cf34dfc91982c6bccef840 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/ComputerView.unity b/Assets/Scenes/ComputerView.unity index 7b35f82..150fd60 100644 --- a/Assets/Scenes/ComputerView.unity +++ b/Assets/Scenes/ComputerView.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 705507994} - m_IndirectSpecularColor: {r: 0.18018535, g: 0.22559482, b: 0.30677685, a: 1} + m_IndirectSpecularColor: {r: 0.18028328, g: 0.22571328, b: 0.3069218, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -637,10 +637,10 @@ RectTransform: m_Children: [] m_Father: {fileID: 6747543} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 150, y: -300} + m_SizeDelta: {x: 300, y: 200} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &132605380 MonoBehaviour: @@ -1235,10 +1235,10 @@ RectTransform: m_Children: [] m_Father: {fileID: 6747543} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 1050, y: -300} + m_SizeDelta: {x: 300, y: 200} m_Pivot: {x: 0, y: 0.5} --- !u!114 &340074661 MonoBehaviour: @@ -1395,7 +1395,7 @@ MonoBehaviour: - {fileID: 1854893636} - {fileID: 2065109614} - {fileID: 1197279072} - promptList: {fileID: 0} + promptList: {fileID: 11400000, guid: 21907abc84e40403ca34c4fb9ab30b06, type: 2} votingTime: 20 --- !u!114 &375256413 MonoBehaviour: @@ -1596,10 +1596,10 @@ RectTransform: m_Children: [] m_Father: {fileID: 6747543} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 350, y: -300} + m_SizeDelta: {x: 300, y: 200} m_Pivot: {x: 0, y: 0.5} --- !u!114 &496953434 MonoBehaviour: @@ -2666,151 +2666,6 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} ---- !u!1 &779167723 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 779167724} - - component: {fileID: 779167726} - - component: {fileID: 779167725} - m_Layer: 5 - m_Name: Proposition1 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &779167724 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 779167723} - 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: 1660260834} - 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: -556, y: 0} - m_SizeDelta: {x: 500, y: 500} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &779167725 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 779167723} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, 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_Texture: {fileID: 0} - m_UVRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 ---- !u!222 &779167726 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 779167723} - m_CullTransparentMesh: 1 ---- !u!1 &817282464 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 817282465} - - component: {fileID: 817282467} - - component: {fileID: 817282466} - m_Layer: 5 - m_Name: Timer - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &817282465 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 817282464} - 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: 2016313507} - m_Father: {fileID: 1660260834} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 1, y: 1} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: -40, y: -46} - m_SizeDelta: {x: 100, y: 100} - m_Pivot: {x: 1, y: 1} ---- !u!114 &817282466 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 817282464} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, 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_Texture: {fileID: 0} - m_UVRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 ---- !u!222 &817282467 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 817282464} - m_CullTransparentMesh: 1 --- !u!1 &818068297 GameObject: m_ObjectHideFlags: 0 @@ -3337,10 +3192,10 @@ RectTransform: m_Children: [] m_Father: {fileID: 6747543} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 1050, y: -100} + m_SizeDelta: {x: 300, y: 200} m_Pivot: {x: 0, y: 0.5} --- !u!114 &983174567 MonoBehaviour: @@ -3807,10 +3662,10 @@ RectTransform: m_Children: [] m_Father: {fileID: 6747543} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 700, y: -100} + m_SizeDelta: {x: 300, y: 200} m_Pivot: {x: 0, y: 0.5} --- !u!114 &1018720202 MonoBehaviour: @@ -3982,6 +3837,119 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1043602402} m_CullTransparentMesh: 1 +--- !u!1001 &1097420890 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 1660260834} + m_Modifications: + - target: {fileID: 3953387086501582844, guid: 6f5bb6680660e49fd9cb0ff864a44bf4, type: 3} + propertyPath: m_Pivot.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3953387086501582844, guid: 6f5bb6680660e49fd9cb0ff864a44bf4, type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 3953387086501582844, guid: 6f5bb6680660e49fd9cb0ff864a44bf4, type: 3} + propertyPath: m_AnchorMax.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3953387086501582844, guid: 6f5bb6680660e49fd9cb0ff864a44bf4, type: 3} + propertyPath: m_AnchorMax.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 3953387086501582844, guid: 6f5bb6680660e49fd9cb0ff864a44bf4, type: 3} + propertyPath: m_AnchorMin.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3953387086501582844, guid: 6f5bb6680660e49fd9cb0ff864a44bf4, type: 3} + propertyPath: m_AnchorMin.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 3953387086501582844, guid: 6f5bb6680660e49fd9cb0ff864a44bf4, type: 3} + propertyPath: m_SizeDelta.x + value: 500 + objectReference: {fileID: 0} + - target: {fileID: 3953387086501582844, guid: 6f5bb6680660e49fd9cb0ff864a44bf4, type: 3} + propertyPath: m_SizeDelta.y + value: 500 + objectReference: {fileID: 0} + - target: {fileID: 3953387086501582844, guid: 6f5bb6680660e49fd9cb0ff864a44bf4, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3953387086501582844, guid: 6f5bb6680660e49fd9cb0ff864a44bf4, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3953387086501582844, guid: 6f5bb6680660e49fd9cb0ff864a44bf4, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3953387086501582844, guid: 6f5bb6680660e49fd9cb0ff864a44bf4, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3953387086501582844, guid: 6f5bb6680660e49fd9cb0ff864a44bf4, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3953387086501582844, guid: 6f5bb6680660e49fd9cb0ff864a44bf4, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3953387086501582844, guid: 6f5bb6680660e49fd9cb0ff864a44bf4, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3953387086501582844, guid: 6f5bb6680660e49fd9cb0ff864a44bf4, type: 3} + propertyPath: m_AnchoredPosition.x + value: -250 + objectReference: {fileID: 0} + - target: {fileID: 3953387086501582844, guid: 6f5bb6680660e49fd9cb0ff864a44bf4, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3953387086501582844, guid: 6f5bb6680660e49fd9cb0ff864a44bf4, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3953387086501582844, guid: 6f5bb6680660e49fd9cb0ff864a44bf4, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3953387086501582844, guid: 6f5bb6680660e49fd9cb0ff864a44bf4, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7016400590500538500, guid: 6f5bb6680660e49fd9cb0ff864a44bf4, type: 3} + propertyPath: m_Name + value: PropositionFrame + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 6f5bb6680660e49fd9cb0ff864a44bf4, type: 3} +--- !u!224 &1097420891 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 3953387086501582844, guid: 6f5bb6680660e49fd9cb0ff864a44bf4, type: 3} + m_PrefabInstance: {fileID: 1097420890} + m_PrefabAsset: {fileID: 0} +--- !u!114 &1097420892 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 9141429158838199157, guid: 6f5bb6680660e49fd9cb0ff864a44bf4, type: 3} + m_PrefabInstance: {fileID: 1097420890} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 18061644c95a147eb81059fa46414624, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &1102286561 GameObject: m_ObjectHideFlags: 0 @@ -4138,7 +4106,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &1117928115 RectTransform: m_ObjectHideFlags: 0 @@ -4665,78 +4633,6 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1197279070} m_CullTransparentMesh: 0 ---- !u!1 &1224089676 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1224089677} - - component: {fileID: 1224089679} - - component: {fileID: 1224089678} - m_Layer: 5 - m_Name: Proposition2 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1224089677 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1224089676} - 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: 1660260834} - 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: 517, y: 0} - m_SizeDelta: {x: 500, y: 500} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1224089678 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1224089676} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, 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_Texture: {fileID: 0} - m_UVRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 ---- !u!222 &1224089679 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1224089676} - m_CullTransparentMesh: 1 --- !u!1 &1236996026 GameObject: m_ObjectHideFlags: 0 @@ -4749,7 +4645,7 @@ GameObject: - component: {fileID: 1236996029} - component: {fileID: 1236996028} m_Layer: 5 - m_Name: WaitingText + m_Name: Prompt m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -4769,11 +4665,11 @@ RectTransform: m_Children: [] m_Father: {fileID: 1660260834} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: -85} - m_SizeDelta: {x: 0, y: 50} - m_Pivot: {x: 0.5, y: 1} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: 0, y: 180} + m_SizeDelta: {x: 0, y: 100} + m_Pivot: {x: 0.5, y: 0} --- !u!114 &1236996028 MonoBehaviour: m_ObjectHideFlags: 0 @@ -4794,17 +4690,17 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: waiting for player pictures + m_text: prompt m_isRightToLeft: 0 - m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} - m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontAsset: {fileID: 11400000, guid: 72af27804d5aa49408430b4b2500f877, type: 2} + m_sharedMaterial: {fileID: 8890805173838430465, guid: 72af27804d5aa49408430b4b2500f877, type: 2} m_fontSharedMaterials: [] m_fontMaterial: {fileID: 0} m_fontMaterials: [] m_fontColor32: serializedVersion: 2 - rgba: 4278190080 - m_fontColor: {r: 0, g: 0, b: 0, a: 1} + rgba: 4278255585 + m_fontColor: {r: 0.88354087, g: 1, b: 0, a: 1} m_enableVertexGradient: 0 m_colorMode: 3 m_fontColorGradient: @@ -4821,8 +4717,8 @@ MonoBehaviour: m_faceColor: serializedVersion: 2 rgba: 4294967295 - m_fontSize: 36 - m_fontSizeBase: 36 + m_fontSize: 100 + m_fontSizeBase: 100 m_fontWeight: 400 m_enableAutoSizing: 0 m_fontSizeMin: 18 @@ -5257,6 +5153,140 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1350310807} m_CullTransparentMesh: 1 +--- !u!1 &1351333134 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1351333135} + - component: {fileID: 1351333137} + - component: {fileID: 1351333136} + m_Layer: 5 + m_Name: Title + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1351333135 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1351333134} + 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: 1660260834} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: -30} + m_SizeDelta: {x: 0, y: 100} + m_Pivot: {x: 0.5, y: 1} +--- !u!114 &1351333136 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1351333134} + 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: Vote for best picture! + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 72af27804d5aa49408430b4b2500f877, type: 2} + m_sharedMaterial: {fileID: 8890805173838430465, guid: 72af27804d5aa49408430b4b2500f877, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4278255585 + m_fontColor: {r: 0.88354087, g: 1, b: 0, 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: 100 + m_fontSizeBase: 100 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + 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.020233134, 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!222 &1351333137 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1351333134} + m_CullTransparentMesh: 1 --- !u!1 &1374681047 GameObject: m_ObjectHideFlags: 0 @@ -5693,10 +5723,10 @@ RectTransform: m_Children: [] m_Father: {fileID: 6747543} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 350, y: -100} + m_SizeDelta: {x: 300, y: 200} m_Pivot: {x: 0, y: 0.5} --- !u!114 &1452182577 MonoBehaviour: @@ -5972,6 +6002,157 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1499472361} m_CullTransparentMesh: 1 +--- !u!1 &1542177989 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1542177990} + - component: {fileID: 1542177992} + - component: {fileID: 1542177991} + m_Layer: 5 + m_Name: Image + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1542177990 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1542177989} + 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: 1660260834} + 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: -756, y: 200.00002} + m_SizeDelta: {x: 100, y: 100} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1542177991 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1542177989} + 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: 0} + 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!222 &1542177992 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1542177989} + m_CullTransparentMesh: 1 +--- !u!1 &1567271221 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1567271222} + - component: {fileID: 1567271224} + - component: {fileID: 1567271223} + m_Layer: 5 + m_Name: VoteTimer + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1567271222 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1567271221} + 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: 1888088772} + m_Father: {fileID: 1660260834} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: -43.000122, y: -50.999878} + m_SizeDelta: {x: 200, y: 200} + m_Pivot: {x: 1, y: 1} +--- !u!114 &1567271223 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1567271221} + 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: 141de4e4cebc12c489ea471b0df36fd8, 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!222 &1567271224 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1567271221} + m_CullTransparentMesh: 1 --- !u!1 &1660260833 GameObject: m_ObjectHideFlags: 0 @@ -5981,13 +6162,14 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 1660260834} + - component: {fileID: 1660260835} m_Layer: 5 - m_Name: ChoosePictureState + m_Name: VotingPage m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!224 &1660260834 RectTransform: m_ObjectHideFlags: 0 @@ -6000,11 +6182,13 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: + - {fileID: 1542177990} - {fileID: 1850877722} + - {fileID: 1351333135} - {fileID: 1236996027} - - {fileID: 817282465} - - {fileID: 779167724} - - {fileID: 1224089677} + - {fileID: 1567271222} + - {fileID: 2214187228236614841} + - {fileID: 1097420891} m_Father: {fileID: 610087870} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} @@ -6012,6 +6196,24 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1660260835 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1660260833} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 18219aa91e9f14d64b46209ebcc6d0d9, type: 3} + m_Name: + m_EditorClassIdentifier: + proposition1: {fileID: 2214187228236614842} + proposition2: {fileID: 1097420892} + currentPromptLabel: {fileID: 1236996028} + timerLabel: {fileID: 1888088773} + promptList: {fileID: 11400000, guid: 21907abc84e40403ca34c4fb9ab30b06, type: 2} + votingTime: 20 --- !u!1 &1677433385 GameObject: m_ObjectHideFlags: 0 @@ -6717,10 +6919,10 @@ RectTransform: m_Children: [] m_Father: {fileID: 6747543} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 150, y: -100} + m_SizeDelta: {x: 300, y: 200} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1794849355 MonoBehaviour: @@ -7477,14 +7679,14 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 0.7294118, g: 1, b: 0.96835685, a: 1} + 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_Texture: {fileID: 0} + m_Texture: {fileID: 2800000, guid: 51cab6d235722024da1a1ba85f4d2e99, type: 3} m_UVRect: serializedVersion: 2 x: 0 @@ -7706,6 +7908,140 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1868885117} m_CullTransparentMesh: 1 +--- !u!1 &1888088771 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1888088772} + - component: {fileID: 1888088774} + - component: {fileID: 1888088773} + m_Layer: 5 + m_Name: VoteTimer.Counter + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1888088772 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1888088771} + 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: 1567271222} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: -2.5, y: -12.5} + m_SizeDelta: {x: -5, y: -25} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1888088773 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1888088771} + 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: 60 + 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: 4278190080 + m_fontColor: {r: 0, g: 0, b: 0, 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: 52 + m_fontSizeBase: 52 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 1 + 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!222 &1888088774 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1888088771} + m_CullTransparentMesh: 1 --- !u!1 &1901141294 GameObject: m_ObjectHideFlags: 0 @@ -8121,140 +8457,6 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1996258850} m_CullTransparentMesh: 1 ---- !u!1 &2016313506 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2016313507} - - component: {fileID: 2016313509} - - component: {fileID: 2016313508} - m_Layer: 5 - m_Name: Text (TMP) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &2016313507 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2016313506} - 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: 817282465} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 1, y: 1} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 128, y: -30} - m_SizeDelta: {x: 200, y: 50} - m_Pivot: {x: 1, y: 1} ---- !u!114 &2016313508 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2016313506} - 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: 60 - 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: 4278190080 - m_fontColor: {r: 0, g: 0, b: 0, 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: 36 - m_fontSizeBase: 36 - m_fontWeight: 400 - m_enableAutoSizing: 0 - m_fontSizeMin: 18 - m_fontSizeMax: 72 - m_fontStyle: 0 - m_HorizontalAlignment: 1 - 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: 157.45232, w: 8.397432} - m_isUsingLegacyAnimationComponent: 0 - m_isVolumetricText: 0 - m_hasFontAssetChanged: 0 - m_baseMaterial: {fileID: 0} - m_maskOffset: {x: 0, y: 0, z: 0, w: 0} ---- !u!222 &2016313509 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2016313506} - m_CullTransparentMesh: 1 --- !u!1 &2027627811 GameObject: m_ObjectHideFlags: 0 @@ -8555,10 +8757,10 @@ RectTransform: m_Children: [] m_Father: {fileID: 6747543} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 700, y: -300} + m_SizeDelta: {x: 300, y: 200} m_Pivot: {x: 0, y: 0.5} --- !u!114 &2137991537 MonoBehaviour: @@ -8657,6 +8859,119 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2137991535} m_CullTransparentMesh: 0 +--- !u!1001 &2214187228236614840 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 1660260834} + m_Modifications: + - target: {fileID: 3953387086501582844, guid: 6f5bb6680660e49fd9cb0ff864a44bf4, type: 3} + propertyPath: m_Pivot.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3953387086501582844, guid: 6f5bb6680660e49fd9cb0ff864a44bf4, type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 3953387086501582844, guid: 6f5bb6680660e49fd9cb0ff864a44bf4, type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3953387086501582844, guid: 6f5bb6680660e49fd9cb0ff864a44bf4, type: 3} + propertyPath: m_AnchorMax.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 3953387086501582844, guid: 6f5bb6680660e49fd9cb0ff864a44bf4, type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3953387086501582844, guid: 6f5bb6680660e49fd9cb0ff864a44bf4, type: 3} + propertyPath: m_AnchorMin.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 3953387086501582844, guid: 6f5bb6680660e49fd9cb0ff864a44bf4, type: 3} + propertyPath: m_SizeDelta.x + value: 500 + objectReference: {fileID: 0} + - target: {fileID: 3953387086501582844, guid: 6f5bb6680660e49fd9cb0ff864a44bf4, type: 3} + propertyPath: m_SizeDelta.y + value: 500 + objectReference: {fileID: 0} + - target: {fileID: 3953387086501582844, guid: 6f5bb6680660e49fd9cb0ff864a44bf4, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3953387086501582844, guid: 6f5bb6680660e49fd9cb0ff864a44bf4, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3953387086501582844, guid: 6f5bb6680660e49fd9cb0ff864a44bf4, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3953387086501582844, guid: 6f5bb6680660e49fd9cb0ff864a44bf4, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3953387086501582844, guid: 6f5bb6680660e49fd9cb0ff864a44bf4, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3953387086501582844, guid: 6f5bb6680660e49fd9cb0ff864a44bf4, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3953387086501582844, guid: 6f5bb6680660e49fd9cb0ff864a44bf4, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3953387086501582844, guid: 6f5bb6680660e49fd9cb0ff864a44bf4, type: 3} + propertyPath: m_AnchoredPosition.x + value: 250 + objectReference: {fileID: 0} + - target: {fileID: 3953387086501582844, guid: 6f5bb6680660e49fd9cb0ff864a44bf4, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3953387086501582844, guid: 6f5bb6680660e49fd9cb0ff864a44bf4, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3953387086501582844, guid: 6f5bb6680660e49fd9cb0ff864a44bf4, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3953387086501582844, guid: 6f5bb6680660e49fd9cb0ff864a44bf4, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7016400590500538500, guid: 6f5bb6680660e49fd9cb0ff864a44bf4, type: 3} + propertyPath: m_Name + value: PropositionFrame + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 6f5bb6680660e49fd9cb0ff864a44bf4, type: 3} +--- !u!224 &2214187228236614841 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 3953387086501582844, guid: 6f5bb6680660e49fd9cb0ff864a44bf4, type: 3} + m_PrefabInstance: {fileID: 2214187228236614840} + m_PrefabAsset: {fileID: 0} +--- !u!114 &2214187228236614842 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 9141429158838199157, guid: 6f5bb6680660e49fd9cb0ff864a44bf4, type: 3} + m_PrefabInstance: {fileID: 2214187228236614840} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 18061644c95a147eb81059fa46414624, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1660057539 &9223372036854775807 SceneRoots: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/DatabaseClasses/Player.cs b/Assets/Scripts/DatabaseClasses/Player.cs index 95d58bc..f45ce73 100644 --- a/Assets/Scripts/DatabaseClasses/Player.cs +++ b/Assets/Scripts/DatabaseClasses/Player.cs @@ -17,7 +17,6 @@ public Player(string _name, string _id, double _creationDate) name = _name; id = _id; creationDate = _creationDate; - } public Player(string _name) diff --git a/Assets/Scripts/DatabaseClasses/Prompt.cs b/Assets/Scripts/DatabaseClasses/Prompt.cs index 183ca15..0da39a4 100644 --- a/Assets/Scripts/DatabaseClasses/Prompt.cs +++ b/Assets/Scripts/DatabaseClasses/Prompt.cs @@ -18,5 +18,4 @@ public class Prompt [field: SerializeField] [FirestoreProperty] public string en { get; set; } - } diff --git a/Assets/Scripts/DatabaseClasses/Question.cs b/Assets/Scripts/DatabaseClasses/Question.cs index db6666e..216b3f9 100644 --- a/Assets/Scripts/DatabaseClasses/Question.cs +++ b/Assets/Scripts/DatabaseClasses/Question.cs @@ -6,7 +6,18 @@ [JsonObject] public class Question { + public string id; public string promptId; public Dictionary propositions; public double creationDate; + + public Proposition GetFirstProposition() + { + return propositions["0"]; + } + public Proposition GetSecondProposition() + { + return propositions["1"]; + } } + diff --git a/Assets/Scripts/DatabaseClasses/Room.cs b/Assets/Scripts/DatabaseClasses/Room.cs index 772cab7..d129c66 100644 --- a/Assets/Scripts/DatabaseClasses/Room.cs +++ b/Assets/Scripts/DatabaseClasses/Room.cs @@ -10,7 +10,7 @@ public class Room public string code; public Dictionary questions; public Dictionary players; - public int currentQuestion; + public string currentQuestionId; public double creationDate; public int currentState; @@ -20,10 +20,19 @@ public Room(string _code) creationDate = DateTime.Now.ToOADate(); players = new Dictionary(); questions = new Dictionary(); - currentQuestion = 0; + currentQuestionId = ""; currentState = 1; //default by PC } + /// + /// Return the only player with a specific ID + /// + /// + public Player GetPlayerById(string id) + { + return players[id]; + } + public List GetPlayerList() { return new List(players.Values); diff --git a/Assets/Scripts/GameManager.cs b/Assets/Scripts/GameManager.cs index 19830f5..4ed2600 100644 --- a/Assets/Scripts/GameManager.cs +++ b/Assets/Scripts/GameManager.cs @@ -337,10 +337,10 @@ private void OnRoomUpdate(object sender, ValueChangedEventArgs e) } case (int)GameState.WaitingForOtherPlayersToJoin: { - + CheckIfIAmTheFirst(myRoom.GetPlayerList()); UpdateDisplayedListUser(myRoom.GetPlayerList()); - + break; } case (int)GameState.Explanation: @@ -425,8 +425,8 @@ public void OnClickSubmitSignIn() public void onClickSamePlayers() { myRoom.currentState = (int)GameState.Explanation; - myRoom.currentQuestion = 2; myRoom.questions = null; + myRoom.currentQuestionId = string.Empty; string json = JsonUtility.ToJson(myRoom); myOnlineRoom.SetRawJsonValueAsync(json).ContinueWithOnMainThread(task => @@ -441,7 +441,7 @@ public void onClickSamePlayers() public void onClickNewPlayers() { myRoom.currentState = (int)GameState.EnteringName; - myRoom.currentQuestion = 0; + myRoom.currentQuestionId = string.Empty; myRoom.questions = null; myRoom.players = null; string json = JsonUtility.ToJson(myRoom); diff --git a/Assets/Scripts/PromptList.cs b/Assets/Scripts/PromptList.cs index 2c2bb13..002e958 100644 --- a/Assets/Scripts/PromptList.cs +++ b/Assets/Scripts/PromptList.cs @@ -19,4 +19,9 @@ private void CreateEntry() }; prompts.Add(temp); } + + public Prompt GetPromptById(string _id) + { + return prompts.Find(x => x.id == _id); + } } diff --git a/Assets/Scripts/PropositionFrame.cs b/Assets/Scripts/PropositionFrame.cs new file mode 100644 index 0000000..f0d76a4 --- /dev/null +++ b/Assets/Scripts/PropositionFrame.cs @@ -0,0 +1,81 @@ +using System.Collections; +using System.Collections.Generic; +using Firebase.Extensions; +using Firebase.Storage; +using TMPro; +using UnityEditor.SceneManagement; +using UnityEngine; +using UnityEngine.Networking; +using UnityEngine.UI; + +public class PropositionFrame : MonoBehaviour +{ + public RawImage picture; + public GameObject voterStickerPrefab; + public TextMeshProUGUI playerName; + public Transform playerGrid; + + private List currentVoters = new List(); + private Proposition proposition; + + public void Initialize(Proposition _proposition) + { + Debug.Log($"Initializing {_proposition.owner}'s proposition", this); + proposition = _proposition; + DisplayPicture(proposition.photoUrl); + playerName.text = proposition.owner.name; + } + + private void DisplayPicture(string _url) + { + Debug.Log($"Downloading {_url}"); + + StorageReference imageRef = FirebaseStorage.DefaultInstance.GetReferenceFromUrl(_url); + imageRef.GetDownloadUrlAsync().ContinueWithOnMainThread(task => + { + if (task.IsFaulted || task.IsCanceled) + { + Debug.LogException(task.Exception); + } + else + { + Debug.Log("Download URL: " + task.Result); + StartCoroutine(DownloadImage(task.Result.AbsolutePath, _texture => + { + Debug.Log("Set texture in the raw image"); + picture.texture = _texture; + })); + } + }); + } + + private IEnumerator DownloadImage(string _url, System.Action callback_OnTextureDownloaded) + { + UnityWebRequest request = UnityWebRequestTexture.GetTexture(_url); + yield return request.SendWebRequest(); + + if (request.result != UnityWebRequest.Result.Success) + { + Debug.LogError(request.error); + } + else + { + callback_OnTextureDownloaded?.Invoke(((DownloadHandlerTexture)request.downloadHandler).texture); + } + } + + public void UpdateVoters(List _newVoters) + { + Debug.Log($"There are some new voters for {proposition.owner}'s proposition", this); + foreach (Player p in _newVoters) + { + if (!currentVoters.Contains(p)) + { + currentVoters.Add(p); + VoterSticker sticker = Instantiate(voterStickerPrefab, playerGrid).GetComponent(); + sticker.playerNameLabel.text = p.name; + Debug.Log($"{p.name} has just voted for {proposition.owner.name}'s proposition."); + } + } + } +} diff --git a/Assets/Scripts/PropositionFrame.cs.meta b/Assets/Scripts/PropositionFrame.cs.meta new file mode 100644 index 0000000..6e76169 --- /dev/null +++ b/Assets/Scripts/PropositionFrame.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 18061644c95a147eb81059fa46414624 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/QuestionHandler.cs b/Assets/Scripts/QuestionHandler.cs index bd9edc5..55e5044 100644 --- a/Assets/Scripts/QuestionHandler.cs +++ b/Assets/Scripts/QuestionHandler.cs @@ -32,26 +32,19 @@ void Redraw(int currentQuestion) cameraManager.WebcamResume(); } - string GetQuestionRef(string promptId) + string GetPropRef(string playerId) { - return gameManager.myRoom.questions.First(x => x.Value.promptId == promptId).Key; - } - - string GetPropRef(string questionRef, string playerId) - { - return gameManager.myRoom.questions[questionRef].propositions.First(x => x.Value.owner.id == playerId).Key; + return gameManager.myRoom.questions[(currentQuestion - 1).ToString()].propositions.First(x => x.Value.owner.id == playerId).Key; } public void OnSubmitButton() { - string questionRef = GetQuestionRef(player2questions[currentQuestion - 1].promptId); - StorageManager storageManager = managers.GetComponent(); storageManager.UploadPhoto( gameManager.myRoom.code, gameManager.currentPlayer.id, - GetQuestionRef(questionRef), - GetPropRef(questionRef, gameManager.currentPlayer.id)); + currentQuestion, + GetPropRef(gameManager.currentPlayer.id)); if (currentQuestion < 2) { Redraw(++currentQuestion); diff --git a/Assets/Scripts/RoomManager.cs b/Assets/Scripts/RoomManager.cs index 7c8cf36..42cac40 100644 --- a/Assets/Scripts/RoomManager.cs +++ b/Assets/Scripts/RoomManager.cs @@ -6,6 +6,7 @@ using UnityEngine; using Newtonsoft.Json; using System.Linq; +using Google.MiniJSON; public class RoomManager : MonoBehaviour { @@ -35,24 +36,12 @@ public class RoomManager : MonoBehaviour private bool allPlayersHasProposedTwoPictures = false; private Dictionary propositionsPerPlayers = new Dictionary(); + [Header("Waiting For Proposition Page")] + public VotingPage votingPage; + [Header("Other")] public PromptList promptList; private Room myRoom = null; - public float votingTime = 20; - - private float votingCurrentTime = 0; - - /// - /// Contain the infos about the current displayed question (during votes) - /// - private Question currentQuestion; - - private List questions; - - /// - /// When this is equal to questions.Count, go to score page - /// - private int numberOfQuestionVoted = 0; DatabaseReference realtimeDB; @@ -66,8 +55,6 @@ private void Start() explanationPage.SetActive(false); waitingForPropositionsPage.SetActive(false); waitingForPlayersPage.SetActive(true); - - votingCurrentTime = votingTime; ResetAllPlayerLabels(); } @@ -298,43 +285,27 @@ public void HostHasStartedGame() public void GeneratePrompts() { System.Random rnd = new(); - List prompts = promptList.prompts.OrderBy(x => rnd.Next()).Take(myRoom.players.Count() * 2).ToList(); - List fullPlayers = myRoom.players.Values.ToList().Concat(myRoom.players.Values.ToList()).OrderBy(x => rnd.Next()).ToList(); + List prompts = promptList.prompts.OrderBy(x => rnd.Next()).Take(myRoom.players.Count()).ToList(); + List players = myRoom.players.Values.ToList().OrderBy(x => rnd.Next()).ToList(); Dictionary questions = new(); - foreach (Prompt prompt in prompts) + for (int i = 0; i < players.Count(); i++) { Dictionary propositions = new(); - Player basePlayer = fullPlayers[0]; - propositions.Add(Guid.NewGuid().ToString(), new Proposition() + for (int j = 0; j < 2; j++) { - owner = basePlayer, - creationDate = DateTime.Now.ToOADate() - }); - - //fullPlayers.RemoveAt(0); - - for (int i = 1; i < fullPlayers.Count(); i++) - { - Player secondPlayer = fullPlayers[i]; - - if (basePlayer.id != secondPlayer.id) + propositions.Add(j.ToString(), new Proposition() { - propositions.Add(Guid.NewGuid().ToString(), new Proposition() - { - owner = secondPlayer, - creationDate = DateTime.Now.ToOADate() - }); - - fullPlayers.RemoveAt(0); - break; - } + owner = players[i + j < players.Count() ? i + j : 0], + creationDate = DateTime.Now.ToOADate() + }); } - questions.Add(Guid.NewGuid().ToString(), new Question() + questions.Add(i.ToString(), new Question() { - promptId = prompt.id, + id = Guid.NewGuid().ToString(), + promptId = prompts[i].id, propositions = propositions, creationDate = DateTime.Now.ToOADate(), }); @@ -406,21 +377,34 @@ private void OnNewGameStateStarted() case (int)GameState.WaitingForOtherPlayersToJoin: Debug.Log("New State : WaitingForOtherPlayersToJoin"); break; + case (int)GameState.Explanation: Debug.Log("New State : Explanation"); waitingForPlayersPage.SetActive(false); explanationPage.SetActive(true); endOfExplanationDate = DateTime.Now.AddSeconds(explanationTime); AudioSource.PlayClipAtPoint(counterSFX, Vector3.zero); - //generate all the questions during the explanation GeneratePrompts(); - break; + case (int)GameState.MakeProposition: Debug.Log("New State : MakeProposition"); HostHasStartedGame(); break; + + case (int)GameState.MakeVote: + votingPage.ShowVotingPage( + realtimeDB.Child("rooms").Child(myRoom.code) + , myRoom.players + , myRoom.questions + , () => SendRoomState(GameState.Score)); + break; + + case (int)GameState.Score: + //something + break; + default: break; } diff --git a/Assets/Scripts/StorageManager.cs b/Assets/Scripts/StorageManager.cs index c8921a5..227bf9d 100644 --- a/Assets/Scripts/StorageManager.cs +++ b/Assets/Scripts/StorageManager.cs @@ -33,7 +33,7 @@ void Update() } - public void UploadPhoto(string roomCode, string playerId, string questionRef, string propRef) + public void UploadPhoto(string roomCode, string playerId, int question, string proposition) { Texture2D photo = gameObject.GetComponent().GetPhoto(); byte[] photoBytes = ImageConversion.EncodeToJPG(photo); @@ -41,7 +41,7 @@ public void UploadPhoto(string roomCode, string playerId, string questionRef, st GameManager game = gameObject.GetComponent(); string imageUuid = Guid.NewGuid().ToString(); - StorageReference imageRef = storage.Child($"{game.myRoom.code}/{game.currentPlayer.id}/{imageUuid}.png"); + StorageReference imageRef = storage.Child($"{roomCode}/{playerId}/{imageUuid}.png"); imageRef.PutBytesAsync(photoBytes).ContinueWith((Task task) => { @@ -52,9 +52,15 @@ public void UploadPhoto(string roomCode, string playerId, string questionRef, st } else { - // Metadata contains file metadata such as size, content-type, and md5hash. - StorageMetadata metadata = task.Result; - + realtimeDB + .Child("rooms") + .Child(roomCode) + .Child("questions") + .Child(question.ToString()) + .Child("propositions") + .Child(proposition) + .Child("photoUrl") + .SetValueAsync(imageRef.Path); } }); diff --git a/Assets/Scripts/VoterSticker.cs b/Assets/Scripts/VoterSticker.cs new file mode 100644 index 0000000..1a5992e --- /dev/null +++ b/Assets/Scripts/VoterSticker.cs @@ -0,0 +1,9 @@ +using System.Collections; +using System.Collections.Generic; +using TMPro; +using UnityEngine; + +public class VoterSticker : MonoBehaviour +{ + public TextMeshProUGUI playerNameLabel; +} diff --git a/Assets/Scripts/VoterSticker.cs.meta b/Assets/Scripts/VoterSticker.cs.meta new file mode 100644 index 0000000..baad1a2 --- /dev/null +++ b/Assets/Scripts/VoterSticker.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 63ba002d2116d4c54a8d55e905869d8f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/VotingPage.cs b/Assets/Scripts/VotingPage.cs new file mode 100644 index 0000000..3f59cf8 --- /dev/null +++ b/Assets/Scripts/VotingPage.cs @@ -0,0 +1,131 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using Firebase.Database; +using TMPro; +using UnityEngine; + +public class VotingPage : MonoBehaviour +{ + [Header("Scene References")] + public PropositionFrame proposition1; + public PropositionFrame proposition2; + public TextMeshProUGUI currentPromptLabel; + public TextMeshProUGUI timerLabel; + + [Header("Asset References")] + public PromptList promptList; + + [Header("Settings")] + public float votingTime = 20; + + private Queue remainingQuestions = new Queue(); + private Question currentQuestion = null; + + private DatabaseReference roomRef; + private Dictionary currentPlayers; //all the current playing players + + private DateTime endOfTimer = DateTime.MinValue; + + private Action OnVoteEnded; + + + private void Update() + { + //there is no question displayed or timer is not started + if (currentQuestion == null || endOfTimer == DateTime.MinValue) + return; + + + if (endOfTimer <= DateTime.Now) + { + timerLabel.text = "0"; + if (remainingQuestions.Count > 0) + { + currentQuestion = remainingQuestions.Dequeue(); + ShowQuestion(); + } + else + { + OnVoteEnded?.Invoke(); + } + } + else + { + timerLabel.text = (DateTime.Now - endOfTimer).ToString("D2"); + } + } + + + // Start is called before the first frame update + public void ShowVotingPage(DatabaseReference _roomRef, Dictionary _currentPlayers, Dictionary _questions, Action _callback_OnVoteEnded) + { + Debug.Log("Initializing voting page"); + this.gameObject.SetActive(true); + roomRef = _roomRef; + currentPlayers = _currentPlayers; + OnVoteEnded = _callback_OnVoteEnded; + + foreach (var QuestionByID in _questions) + { + remainingQuestions.Enqueue(QuestionByID.Value); + roomRef.Child("questions").Child(QuestionByID.Key).ValueChanged += OnQuestionChanged; + } + + currentQuestion = remainingQuestions.Dequeue(); + roomRef.Child("currentQuestion").SetValueAsync(currentQuestion.id); + ShowQuestion(); + } + + void ShowQuestion() + { + Debug.Log($"Show Question {currentQuestion.promptId}", this); + Prompt currentPrompt = promptList.GetPromptById(currentQuestion.promptId); + currentPromptLabel.text = currentPrompt.en; + + Debug.Log($"Prompt is {currentPromptLabel.text}", this); + + proposition1.Initialize(currentQuestion.GetFirstProposition()); + proposition1.Initialize(currentQuestion.GetSecondProposition()); + endOfTimer = DateTime.Now.AddSeconds(votingTime); + } + + /// + /// Is called when a question is updated (someone has voted) + /// + /// + /// + private void OnQuestionChanged(object sender, ValueChangedEventArgs _questionRef) + { + Debug.Log("a question value has changed, maybe someone has voted", this); + string JSON = _questionRef.Snapshot.GetRawJsonValue(); + Question question = Newtonsoft.Json.JsonConvert.DeserializeObject(JSON); + + //if someone succeeded to vote for another question than the one that is displayed => yeet + if (question.id != currentQuestion.id) + return; + + Debug.Log($"someone has voted for {question.id}", this); + currentQuestion.propositions = question.propositions; + UpdateVoters(); + + } + + private void UpdateVoters() + { + List playersThatHasVotedForFirstProposition = new List(); + foreach (string playerId in currentQuestion.GetFirstProposition().voters) + { + playersThatHasVotedForFirstProposition.Add(currentPlayers[playerId]); + } + + List playersThatHasVotedForSecondProposition = new List(); + foreach (string playerId in currentQuestion.GetSecondProposition().voters) + { + playersThatHasVotedForSecondProposition.Add(currentPlayers[playerId]); + } + + proposition1.UpdateVoters(playersThatHasVotedForFirstProposition); + proposition2.UpdateVoters(playersThatHasVotedForSecondProposition); + } +} diff --git a/Assets/Scripts/VotingPage.cs.meta b/Assets/Scripts/VotingPage.cs.meta new file mode 100644 index 0000000..b36c31b --- /dev/null +++ b/Assets/Scripts/VotingPage.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 18219aa91e9f14d64b46209ebcc6d0d9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: