feature: Added random buttons
This commit is contained in:
parent
5d5af8a4c6
commit
2c91a0cb0f
15 changed files with 2461 additions and 36 deletions
8
Assets/Fonts.meta
Normal file
8
Assets/Fonts.meta
Normal file
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 06a7f88ec12b80b409a6954c6dbd30f4
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
1646
Assets/Fonts/nokiafc22 SDF.asset
Normal file
1646
Assets/Fonts/nokiafc22 SDF.asset
Normal file
File diff suppressed because one or more lines are too long
8
Assets/Fonts/nokiafc22 SDF.asset.meta
Normal file
8
Assets/Fonts/nokiafc22 SDF.asset.meta
Normal file
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: f1576c7f923ce3e4a982e515b076cf0b
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Fonts/nokiafc22.ttf
Normal file
BIN
Assets/Fonts/nokiafc22.ttf
Normal file
Binary file not shown.
21
Assets/Fonts/nokiafc22.ttf.meta
Normal file
21
Assets/Fonts/nokiafc22.ttf.meta
Normal file
|
@ -0,0 +1,21 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 01d3b46b505379b41913cf3286d8b716
|
||||
TrueTypeFontImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 4
|
||||
fontSize: 8
|
||||
forceTextureCase: -2
|
||||
characterSpacing: 0
|
||||
characterPadding: 1
|
||||
includeFontData: 1
|
||||
fontNames:
|
||||
- Nokia Cellphone FC
|
||||
fallbackFontReferences: []
|
||||
customCharacters:
|
||||
fontRenderingMode: 2
|
||||
ascentCalculationMode: 1
|
||||
useLegacyBoundsCalculation: 0
|
||||
shouldRoundAdvanceValue: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -169,7 +169,7 @@ RectTransform:
|
|||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 16}
|
||||
m_SizeDelta: {x: 0, y: 20}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &2269813050067969261
|
||||
CanvasRenderer:
|
||||
|
@ -201,15 +201,15 @@ MonoBehaviour:
|
|||
m_Calls: []
|
||||
m_text:
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_fontAsset: {fileID: 11400000, guid: f1576c7f923ce3e4a982e515b076cf0b, type: 2}
|
||||
m_sharedMaterial: {fileID: -1538904502437759526, guid: f1576c7f923ce3e4a982e515b076cf0b, 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: 4287324819
|
||||
m_fontColor: {r: 0.5764706, g: 0.38431373, b: 0.54509807, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
|
@ -226,15 +226,15 @@ MonoBehaviour:
|
|||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 16
|
||||
m_fontSizeBase: 16
|
||||
m_fontSize: 8
|
||||
m_fontSizeBase: 8
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 1
|
||||
m_VerticalAlignment: 256
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
|
@ -575,7 +575,7 @@ RectTransform:
|
|||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 16}
|
||||
m_SizeDelta: {x: 0, y: 20}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &7849525619481103722
|
||||
CanvasRenderer:
|
||||
|
@ -607,15 +607,15 @@ MonoBehaviour:
|
|||
m_Calls: []
|
||||
m_text:
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_fontAsset: {fileID: 11400000, guid: f1576c7f923ce3e4a982e515b076cf0b, type: 2}
|
||||
m_sharedMaterial: {fileID: -1538904502437759526, guid: f1576c7f923ce3e4a982e515b076cf0b, 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: 4287324819
|
||||
m_fontColor: {r: 0.5764706, g: 0.38431373, b: 0.54509807, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
|
@ -632,15 +632,15 @@ MonoBehaviour:
|
|||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 16
|
||||
m_fontSizeBase: 16
|
||||
m_fontSize: 8
|
||||
m_fontSizeBase: 8
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 1
|
||||
m_VerticalAlignment: 256
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
|
|
|
@ -239,6 +239,81 @@ RectTransform:
|
|||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!1 &52289221
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 52289222}
|
||||
- component: {fileID: 52289224}
|
||||
- component: {fileID: 52289223}
|
||||
m_Layer: 5
|
||||
m_Name: Person1
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &52289222
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 52289221}
|
||||
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: 1083019348}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 373, y: -85}
|
||||
m_SizeDelta: {x: 50, y: 52}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
--- !u!114 &52289223
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 52289221}
|
||||
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: 81cf7a32db45a594aabf77d8a7e65353, 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 &52289224
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 52289221}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &101750550
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -316,7 +391,7 @@ Canvas:
|
|||
m_OverridePixelPerfect: 0
|
||||
m_SortingBucketNormalizedSize: 0
|
||||
m_VertexColorAlwaysGammaSpace: 0
|
||||
m_AdditionalShaderChannelsFlag: 0
|
||||
m_AdditionalShaderChannelsFlag: 25
|
||||
m_UpdateRectTransformForStandalone: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingOrder: 0
|
||||
|
@ -333,7 +408,7 @@ RectTransform:
|
|||
m_LocalScale: {x: 0, y: 0, z: 0}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 661212293}
|
||||
- {fileID: 1083019348}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
|
@ -416,6 +491,140 @@ CanvasRenderer:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 279922734}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &376898294
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 376898295}
|
||||
- component: {fileID: 376898297}
|
||||
- component: {fileID: 376898296}
|
||||
m_Layer: 5
|
||||
m_Name: Person2Name
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &376898295
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 376898294}
|
||||
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: 1083019348}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 387, y: -218}
|
||||
m_SizeDelta: {x: 73.2172, y: 9.9975}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
--- !u!114 &376898296
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 376898294}
|
||||
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: Cael Del Medio
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: f1576c7f923ce3e4a982e515b076cf0b, type: 2}
|
||||
m_sharedMaterial: {fileID: -1538904502437759526, guid: f1576c7f923ce3e4a982e515b076cf0b, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4285671270
|
||||
m_fontColor: {r: 0.4, g: 0.15294118, b: 0.44705883, 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: 8
|
||||
m_fontSizeBase: 8
|
||||
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: 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 &376898297
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 376898294}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &507035065
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -453,6 +662,140 @@ RectTransform:
|
|||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 480, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &527368509
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 527368510}
|
||||
- component: {fileID: 527368512}
|
||||
- component: {fileID: 527368511}
|
||||
m_Layer: 5
|
||||
m_Name: Person1Name
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &527368510
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 527368509}
|
||||
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: 1083019348}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 396, y: -139}
|
||||
m_SizeDelta: {x: 58.300903, y: 9.997498}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
--- !u!114 &527368511
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 527368509}
|
||||
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: Vandos Yse
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: f1576c7f923ce3e4a982e515b076cf0b, type: 2}
|
||||
m_sharedMaterial: {fileID: -1538904502437759526, guid: f1576c7f923ce3e4a982e515b076cf0b, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4285671270
|
||||
m_fontColor: {r: 0.4, g: 0.15294118, b: 0.44705883, 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: 8
|
||||
m_fontSizeBase: 8
|
||||
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: 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 &527368512
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 527368509}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &590262793
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -528,6 +871,17 @@ CanvasRenderer:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 590262793}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &637305697 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 5596010678248324506, guid: 5430324ec74b5f04581d090658d90b3e, type: 3}
|
||||
m_PrefabInstance: {fileID: 952211043}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &661212292
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -553,12 +907,12 @@ RectTransform:
|
|||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 661212292}
|
||||
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_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 101750554}
|
||||
m_Father: {fileID: 1083019348}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0}
|
||||
m_AnchorMax: {x: 0.5, y: 1}
|
||||
|
@ -615,6 +969,7 @@ GameObject:
|
|||
- component: {fileID: 726795830}
|
||||
- component: {fileID: 726795829}
|
||||
- component: {fileID: 726795828}
|
||||
- component: {fileID: 726795832}
|
||||
m_Layer: 5
|
||||
m_Name: ButtonCanvas
|
||||
m_TagString: Untagged
|
||||
|
@ -705,6 +1060,36 @@ RectTransform:
|
|||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!114 &726795832
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 726795827}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f8636a0406164ff9b960428f0a957034, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
buttons:
|
||||
- {fileID: 1620770958}
|
||||
- {fileID: 637305697}
|
||||
- {fileID: 1275531629}
|
||||
- {fileID: 965573481}
|
||||
- {fileID: 776071045}
|
||||
- {fileID: 1316790225}
|
||||
--- !u!114 &776071045 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 5596010678248324506, guid: 5430324ec74b5f04581d090658d90b3e, type: 3}
|
||||
m_PrefabInstance: {fileID: 1825731470}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &780374630
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -790,7 +1175,7 @@ PrefabInstance:
|
|||
m_Modifications:
|
||||
- target: {fileID: 5596010678248324506, guid: 5430324ec74b5f04581d090658d90b3e, type: 3}
|
||||
propertyPath: m_text
|
||||
value: <sprite=26>
|
||||
value:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5596010678248324506, guid: 5430324ec74b5f04581d090658d90b3e, type: 3}
|
||||
propertyPath: m_fontSize
|
||||
|
@ -906,6 +1291,81 @@ RectTransform:
|
|||
m_CorrespondingSourceObject: {fileID: 5783143251392024687, guid: 5430324ec74b5f04581d090658d90b3e, type: 3}
|
||||
m_PrefabInstance: {fileID: 804374705}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &861656303
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 861656304}
|
||||
- component: {fileID: 861656306}
|
||||
- component: {fileID: 861656305}
|
||||
m_Layer: 5
|
||||
m_Name: Person2
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &861656304
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 861656303}
|
||||
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: 1083019348}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 373, y: -163}
|
||||
m_SizeDelta: {x: 50, y: 52}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
--- !u!114 &861656305
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 861656303}
|
||||
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: a28ebfaf2bca1ca408938b7eeb907e21, 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 &861656306
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 861656303}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!224 &896566765 stripped
|
||||
RectTransform:
|
||||
m_CorrespondingSourceObject: {fileID: 5783143251392024687, guid: 5430324ec74b5f04581d090658d90b3e, type: 3}
|
||||
|
@ -921,7 +1381,7 @@ PrefabInstance:
|
|||
m_Modifications:
|
||||
- target: {fileID: 5596010678248324506, guid: 5430324ec74b5f04581d090658d90b3e, type: 3}
|
||||
propertyPath: m_text
|
||||
value: <sprite=24>
|
||||
value:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5596010678248324506, guid: 5430324ec74b5f04581d090658d90b3e, type: 3}
|
||||
propertyPath: m_fontSize
|
||||
|
@ -1037,6 +1497,17 @@ RectTransform:
|
|||
m_CorrespondingSourceObject: {fileID: 5783143251392024687, guid: 5430324ec74b5f04581d090658d90b3e, type: 3}
|
||||
m_PrefabInstance: {fileID: 952211043}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!114 &965573481 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 5596010678248324506, guid: 5430324ec74b5f04581d090658d90b3e, type: 3}
|
||||
m_PrefabInstance: {fileID: 804374705}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &1060367306
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -1233,6 +1704,46 @@ MonoBehaviour:
|
|||
maxVisibleMessages: 4
|
||||
messageHeight: 25
|
||||
messagePrefab: {fileID: 983200136183243889, guid: 6bf006df27e33a24088a28c9d46dbb43, type: 3}
|
||||
--- !u!1 &1083019347
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1083019348}
|
||||
m_Layer: 5
|
||||
m_Name: Container
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1083019348
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1083019347}
|
||||
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: 661212293}
|
||||
- {fileID: 52289222}
|
||||
- {fileID: 527368510}
|
||||
- {fileID: 861656304}
|
||||
- {fileID: 376898295}
|
||||
m_Father: {fileID: 101750554}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0}
|
||||
m_AnchorMax: {x: 0.5, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 480, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &1127065346
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -1450,7 +1961,7 @@ CanvasGroup:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1198578934}
|
||||
m_Enabled: 1
|
||||
m_Alpha: 0.58
|
||||
m_Alpha: 0.52
|
||||
m_Interactable: 1
|
||||
m_BlocksRaycasts: 1
|
||||
m_IgnoreParentGroups: 0
|
||||
|
@ -1611,6 +2122,17 @@ RectTransform:
|
|||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 480, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1275531629 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 5596010678248324506, guid: 5430324ec74b5f04581d090658d90b3e, type: 3}
|
||||
m_PrefabInstance: {fileID: 2129526353}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &1284257431
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -1703,6 +2225,28 @@ Transform:
|
|||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1316790225 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 5596010678248324506, guid: 5430324ec74b5f04581d090658d90b3e, type: 3}
|
||||
m_PrefabInstance: {fileID: 1854217698}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!114 &1620770958 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 5596010678248324506, guid: 5430324ec74b5f04581d090658d90b3e, type: 3}
|
||||
m_PrefabInstance: {fileID: 7128632576251210280}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &1637937844
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -2107,7 +2651,7 @@ PrefabInstance:
|
|||
m_Modifications:
|
||||
- target: {fileID: 5596010678248324506, guid: 5430324ec74b5f04581d090658d90b3e, type: 3}
|
||||
propertyPath: m_text
|
||||
value: <sprite=27>
|
||||
value:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5596010678248324506, guid: 5430324ec74b5f04581d090658d90b3e, type: 3}
|
||||
propertyPath: m_fontSize
|
||||
|
@ -2233,7 +2777,7 @@ PrefabInstance:
|
|||
m_Modifications:
|
||||
- target: {fileID: 5596010678248324506, guid: 5430324ec74b5f04581d090658d90b3e, type: 3}
|
||||
propertyPath: m_text
|
||||
value: <sprite=28>
|
||||
value:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5596010678248324506, guid: 5430324ec74b5f04581d090658d90b3e, type: 3}
|
||||
propertyPath: m_fontSize
|
||||
|
@ -2568,7 +3112,7 @@ PrefabInstance:
|
|||
m_Modifications:
|
||||
- target: {fileID: 5596010678248324506, guid: 5430324ec74b5f04581d090658d90b3e, type: 3}
|
||||
propertyPath: m_text
|
||||
value: <sprite=25>
|
||||
value:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5596010678248324506, guid: 5430324ec74b5f04581d090658d90b3e, type: 3}
|
||||
propertyPath: m_fontSize
|
||||
|
@ -2694,7 +3238,7 @@ PrefabInstance:
|
|||
m_Modifications:
|
||||
- target: {fileID: 5596010678248324506, guid: 5430324ec74b5f04581d090658d90b3e, type: 3}
|
||||
propertyPath: m_text
|
||||
value: <sprite=23>
|
||||
value:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5596010678248324506, guid: 5430324ec74b5f04581d090658d90b3e, type: 3}
|
||||
propertyPath: m_fontSize
|
||||
|
|
16
Assets/Scripts/Messaging/Composer/EmojiButtonManager.cs
Normal file
16
Assets/Scripts/Messaging/Composer/EmojiButtonManager.cs
Normal file
|
@ -0,0 +1,16 @@
|
|||
using System;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Messaging.Composer {
|
||||
public class EmojiButtonManager : MonoBehaviour {
|
||||
[SerializeField] private TMP_Text[] buttons;
|
||||
|
||||
public void SetButtonImages(string[] emojis) {
|
||||
for (int i = 0; i < emojis.Length; i++) {
|
||||
buttons[i].SetText(emojis[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: f8636a0406164ff9b960428f0a957034
|
||||
timeCreated: 1706397142
|
|
@ -1,10 +1,13 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using Flow;
|
||||
using Messaging.Composer;
|
||||
using UnityEngine;
|
||||
using Utilities;
|
||||
using Random = UnityEngine.Random;
|
||||
|
||||
namespace Messaging {
|
||||
|
@ -25,10 +28,15 @@ namespace Messaging {
|
|||
|
||||
private Lives _lives;
|
||||
|
||||
private readonly Regex _emojiGetter = new("<([a-z]+)(?![^>]*\\/>)[^>]*>");
|
||||
private const int NumEmojis = 34;
|
||||
private EmojiButtonManager _emojiButtonManager;
|
||||
|
||||
private void Awake() {
|
||||
_messages = messageStructureGenerator.GenerateMessages();
|
||||
_jokesBag = new List<TextAsset>(jokes);
|
||||
_lives = FindObjectOfType<Lives>();
|
||||
_emojiButtonManager = FindObjectOfType<EmojiButtonManager>();
|
||||
}
|
||||
|
||||
private void Start() {
|
||||
|
@ -40,6 +48,7 @@ namespace Messaging {
|
|||
await Task.Delay((int)(delay * 1000));
|
||||
_currentJoke = GetRandomJoke();
|
||||
CreateMessage(_currentJoke.QuestionMessage.Key, false);
|
||||
_emojiButtonManager.SetButtonImages(GenerateButtonOptions());
|
||||
}
|
||||
|
||||
public void CreateMessage(string message, bool isAnswer) {
|
||||
|
@ -66,11 +75,37 @@ namespace Messaging {
|
|||
}
|
||||
}
|
||||
|
||||
IEnumerator ShowRealTexts() {
|
||||
private IEnumerator ShowRealTexts() {
|
||||
yield return ModifyRealMessageText(_currentJoke.QuestionMessage.Value, _currentJokeIndex, false);
|
||||
yield return ModifyRealMessageText(_currentJoke.AnswerMessage.Value, _messages.Length - 1, true);
|
||||
}
|
||||
|
||||
private string[] GenerateButtonOptions() {
|
||||
List<string> neededEmojis = GetResultEmojis();
|
||||
|
||||
while (neededEmojis.Count < 6) {
|
||||
string emoji;
|
||||
do {
|
||||
emoji = $"<sprite={Random.Range(0, NumEmojis)}>";
|
||||
} while (neededEmojis.Contains(emoji));
|
||||
neededEmojis.Add(emoji);
|
||||
}
|
||||
|
||||
neededEmojis.Shuffle();
|
||||
return neededEmojis.ToArray();
|
||||
}
|
||||
|
||||
private List<string> GetResultEmojis() {
|
||||
MatchCollection emojis = _emojiGetter.Matches(_currentJoke.AnswerMessage.Key);
|
||||
|
||||
List<string> emojiStrings = new();
|
||||
foreach (Match emoji in emojis) {
|
||||
emojiStrings.Add(emoji.Value);
|
||||
}
|
||||
|
||||
return emojiStrings;
|
||||
}
|
||||
|
||||
private void ModifyMessageText(string message, int index, bool isAnswer) {
|
||||
ModifyPreviousMessage(index);
|
||||
_messages[index].SetMessageText(message, true, isAnswer);
|
||||
|
@ -80,12 +115,12 @@ namespace Messaging {
|
|||
return _messages[index].SetMessageRealText(message, true, isAnswer);
|
||||
}
|
||||
|
||||
private Coroutine ModifyPreviousMessage(int index) {
|
||||
private void ModifyPreviousMessage(int index) {
|
||||
ModifyPreviousMessage(_messages[index].Text, _messages[index].RealText, index - 1,
|
||||
_messages[index].IsAnswer, _messages[index].IsReal);
|
||||
|
||||
_messages[index].SetMessageText("", false, _messages[index].IsAnswer);
|
||||
return _messages[index].SetMessageRealText("", false, _messages[index].IsAnswer);
|
||||
_messages[index].SetMessageRealText("", false, _messages[index].IsAnswer);
|
||||
}
|
||||
|
||||
private MessageData.MessageData GetRandomJoke() {
|
||||
|
|
14
Assets/Scripts/Utilities/RandomExtensions.cs
Normal file
14
Assets/Scripts/Utilities/RandomExtensions.cs
Normal file
|
@ -0,0 +1,14 @@
|
|||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Utilities {
|
||||
public static class RandomExtensions {
|
||||
public static void Shuffle<T>(this List<T> array) {
|
||||
int n = array.Count;
|
||||
while (n > 1) {
|
||||
int k = Random.Range(0, n--);
|
||||
(array[n], array[k]) = (array[k], array[n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
3
Assets/Scripts/Utilities/RandomExtensions.cs.meta
Normal file
3
Assets/Scripts/Utilities/RandomExtensions.cs.meta
Normal file
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d3a2119b90024ecd94ba7fa9711378db
|
||||
timeCreated: 1706397620
|
|
@ -34,7 +34,7 @@ TextureImporter:
|
|||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
filterMode: 0
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
|
@ -48,7 +48,7 @@ TextureImporter:
|
|||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spritePixelsToUnits: 16
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
|
@ -72,7 +72,7 @@ TextureImporter:
|
|||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
|
|
|
@ -34,7 +34,7 @@ TextureImporter:
|
|||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
filterMode: 0
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
|
@ -48,7 +48,7 @@ TextureImporter:
|
|||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spritePixelsToUnits: 16
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
|
@ -72,7 +72,7 @@ TextureImporter:
|
|||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
|
|
127
Assets/Sprites/enviarapagado.png.meta
Normal file
127
Assets/Sprites/enviarapagado.png.meta
Normal file
|
@ -0,0 +1,127 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d8f3c281772d8ce428ce642723fa4ef9
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 12
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Server
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Add table
Add a link
Reference in a new issue