diff --git a/Assets/Fonts/NEW/NexaRegular COOL.asset b/Assets/Fonts/NEW/NexaRegular COOL.asset
index 9d33b98..7d3fa34 100644
--- a/Assets/Fonts/NEW/NexaRegular COOL.asset
+++ b/Assets/Fonts/NEW/NexaRegular COOL.asset
@@ -11349,7 +11349,7 @@ Material:
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767}
- _EnvMatrixRotation: {r: 0, g: 0, b: 0, a: 0}
- _FaceColor: {r: 1, g: 1, b: 1, a: 1}
- - _GlowColor: {r: 1, g: 0.13425158, b: 0, a: 1}
+ - _GlowColor: {r: 0.008461237, g: 1, b: 0, a: 1}
- _MaskCoord: {r: 0, g: 0, b: 32767, a: 32767}
- _OutlineColor: {r: 0.554717, g: 0.554717, b: 0.554717, a: 1}
- _ReflectFaceColor: {r: 0, g: 0, b: 0, a: 1}
diff --git a/Assets/Scenes/GameScene3D.unity b/Assets/Scenes/GameScene3D.unity
index 7289dc7..782994c 100644
--- a/Assets/Scenes/GameScene3D.unity
+++ b/Assets/Scenes/GameScene3D.unity
@@ -122,6 +122,102 @@ NavMeshSettings:
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
+--- !u!1 &2014457
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 2014458}
+ - component: {fileID: 2014461}
+ - component: {fileID: 2014460}
+ - component: {fileID: 2014459}
+ m_Layer: 0
+ m_Name: Panel
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &2014458
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 2014457}
+ 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: 1039507331}
+ 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 &2014459
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 2014457}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_IgnoreLayout: 1
+ m_MinWidth: -1
+ m_MinHeight: -1
+ m_PreferredWidth: -1
+ m_PreferredHeight: -1
+ m_FlexibleWidth: -1
+ m_FlexibleHeight: -1
+ m_LayoutPriority: 1
+--- !u!114 &2014460
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 2014457}
+ 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: 0.64043576, b: 0, 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: 1744797893, guid: 93e5f9833bed0474cb1481410d00191c, type: 3}
+ 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: 204.5
+--- !u!222 &2014461
+CanvasRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 2014457}
+ m_CullTransparentMesh: 1
--- !u!1 &7628166
GameObject:
m_ObjectHideFlags: 0
@@ -1288,6 +1384,140 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
startText: +
+--- !u!1 &60816060
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 60816061}
+ - component: {fileID: 60816063}
+ - component: {fileID: 60816062}
+ m_Layer: 0
+ m_Name: moves
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &60816061
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 60816060}
+ 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: 1039507331}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+ m_AnchorMin: {x: 0, y: 1}
+ m_AnchorMax: {x: 0, y: 1}
+ m_AnchoredPosition: {x: 0.1, y: 0}
+ m_SizeDelta: {x: 2.87, y: 0.5}
+ m_Pivot: {x: 0, y: 1}
+--- !u!114 &60816062
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 60816060}
+ 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: "\u0425\u043E\u0434\u044B:"
+ m_isRightToLeft: 0
+ m_fontAsset: {fileID: 11400000, guid: 3f10bbcf486189d4f95b8de6dc2e2177, type: 2}
+ m_sharedMaterial: {fileID: 4262305343556741190, guid: 3f10bbcf486189d4f95b8de6dc2e2177, 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: 0.35
+ m_fontSizeBase: 0.35
+ m_fontWeight: 400
+ m_enableAutoSizing: 0
+ m_fontSizeMin: 0
+ m_fontSizeMax: 64
+ m_fontStyle: 0
+ m_HorizontalAlignment: 1
+ m_VerticalAlignment: 512
+ m_textAlignment: 65535
+ m_characterSpacing: 0
+ m_wordSpacing: 0
+ m_lineSpacing: 0
+ m_lineSpacingMax: 0
+ m_paragraphSpacing: 0
+ m_charWidthMaxAdj: 0
+ m_enableWordWrapping: 1
+ m_wordWrappingRatios: 0.4
+ m_overflowMode: 0
+ m_linkedTextComponent: {fileID: 0}
+ parentLinkedComponent: {fileID: 0}
+ m_enableKerning: 1
+ m_enableExtraPadding: 0
+ checkPaddingRequired: 0
+ m_isRichText: 1
+ m_parseCtrlCharacters: 1
+ m_isOrthographic: 1
+ m_isCullingEnabled: 0
+ m_horizontalMapping: 0
+ m_verticalMapping: 0
+ m_uvLineOffset: 0
+ m_geometrySortingOrder: 0
+ m_IsTextObjectScaleStatic: 0
+ m_VertexBufferAutoSizeReduction: 0
+ m_useMaxVisibleDescender: 1
+ m_pageToDisplay: 1
+ m_margin: {x: 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 &60816063
+CanvasRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 60816060}
+ m_CullTransparentMesh: 1
--- !u!1 &69209758
GameObject:
m_ObjectHideFlags: 0
@@ -5336,6 +5566,8 @@ MonoBehaviour:
fastCheckCounters: {fileID: 246835608}
checkQrPanel: {fileID: 1614501702}
avatarController: {fileID: 1851050354}
+ pvpPointer: {fileID: 492468475}
+ movesAndTimeCounter: {fileID: 1039507332}
--- !u!4 &259182280
Transform:
m_ObjectHideFlags: 0
@@ -9599,6 +9831,108 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 489994582}
m_CullTransparentMesh: 1
+--- !u!1 &492468473
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 492468474}
+ - component: {fileID: 492468476}
+ - component: {fileID: 492468475}
+ m_Layer: 0
+ m_Name: 2Players pointer
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!4 &492468474
+Transform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 492468473}
+ serializedVersion: 2
+ m_LocalRotation: {x: 0, y: 0, z: -0.7071068, w: 0.7071068}
+ m_LocalPosition: {x: -34.21, y: 4.44, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_ConstrainProportionsScale: 0
+ m_Children: []
+ m_Father: {fileID: 1551328425}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: -90}
+--- !u!114 &492468475
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 492468473}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 21c0a89ccac34ae4f91d75a6908682c2, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ _renderer: {fileID: 492468476}
+ sprites:
+ - {fileID: 21300000, guid: abbe07a8e65cdae4fa70f648e92c727b, type: 3}
+ - {fileID: 21300000, guid: dc58521a76ffa524291e7e43262efbf3, type: 3}
+ offset: {x: 0, y: 0, z: 0}
+--- !u!212 &492468476
+SpriteRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 492468473}
+ m_Enabled: 1
+ m_CastShadows: 0
+ m_ReceiveShadows: 0
+ m_DynamicOccludee: 1
+ m_StaticShadowCaster: 0
+ m_MotionVectors: 1
+ m_LightProbeUsage: 1
+ m_ReflectionProbeUsage: 1
+ m_RayTracingMode: 0
+ m_RayTraceProcedural: 0
+ m_RenderingLayerMask: 1
+ m_RendererPriority: 0
+ m_Materials:
+ - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
+ m_StaticBatchInfo:
+ firstSubMesh: 0
+ subMeshCount: 0
+ m_StaticBatchRoot: {fileID: 0}
+ m_ProbeAnchor: {fileID: 0}
+ m_LightProbeVolumeOverride: {fileID: 0}
+ m_ScaleInLightmap: 1
+ m_ReceiveGI: 1
+ m_PreserveUVs: 0
+ m_IgnoreNormalsForChartDetection: 0
+ m_ImportantGI: 0
+ m_StitchLightmapSeams: 1
+ m_SelectedEditorRenderState: 0
+ m_MinimumChartSize: 4
+ m_AutoUVMaxDistance: 0.5
+ m_AutoUVMaxAngle: 89
+ m_LightmapParameters: {fileID: 0}
+ m_SortingLayerID: 500331691
+ m_SortingLayer: 3
+ m_SortingOrder: 22
+ m_Sprite: {fileID: 21300000, guid: abbe07a8e65cdae4fa70f648e92c727b, type: 3}
+ m_Color: {r: 1, g: 1, b: 1, a: 1}
+ m_FlipX: 0
+ m_FlipY: 0
+ m_DrawMode: 0
+ m_Size: {x: 1.28, y: 1.28}
+ m_AdaptiveModeThreshold: 0.5
+ m_SpriteTileMode: 0
+ m_WasSpriteAssigned: 1
+ m_MaskInteraction: 0
+ m_SpriteSortPoint: 0
--- !u!1 &500429078
GameObject:
m_ObjectHideFlags: 0
@@ -25352,6 +25686,86 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1037840203}
m_CullTransparentMesh: 1
+--- !u!1 &1039507330
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 1039507331}
+ - component: {fileID: 1039507333}
+ - component: {fileID: 1039507332}
+ m_Layer: 0
+ m_Name: Moves & Time counter
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &1039507331
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1039507330}
+ 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: 2014458}
+ - {fileID: 60816061}
+ - {fileID: 1547278204}
+ m_Father: {fileID: 1551328425}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+ m_AnchorMin: {x: 0, y: 0}
+ m_AnchorMax: {x: 0, y: 0}
+ m_AnchoredPosition: {x: -8.401, y: -1.41}
+ m_SizeDelta: {x: 3, y: 1}
+ m_Pivot: {x: 0.5, y: 0.5}
+--- !u!114 &1039507332
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1039507330}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: fe2d117b08365f74188f302445e7d79c, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ movesLabel: {fileID: 60816062}
+ movesPrefix: "\u0425\u043E\u0434\u044B: "
+ timeLabel: {fileID: 1547278205}
+ timePrefix: "\u0412\u0440\u0435\u043C\u044F: "
+ digitsAfterComma: 2
+--- !u!223 &1039507333
+Canvas:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1039507330}
+ m_Enabled: 1
+ serializedVersion: 3
+ m_RenderMode: 2
+ m_Camera: {fileID: 0}
+ m_PlaneDistance: 100
+ m_PixelPerfect: 0
+ m_ReceivesEvents: 1
+ m_OverrideSorting: 0
+ m_OverridePixelPerfect: 0
+ m_SortingBucketNormalizedSize: 0
+ m_VertexColorAlwaysGammaSpace: 0
+ m_AdditionalShaderChannelsFlag: 25
+ m_UpdateRectTransformForStandalone: 0
+ m_SortingLayerID: 500331691
+ m_SortingOrder: 22
+ m_TargetDisplay: 0
--- !u!1 &1042651725
GameObject:
m_ObjectHideFlags: 0
@@ -43251,6 +43665,7 @@ RectTransform:
m_Children:
- {fileID: 744794249}
- {fileID: 1868395657}
+ - {fileID: 1940615092}
m_Father: {fileID: 347852021}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
@@ -43957,6 +44372,140 @@ MonoBehaviour:
OnDraw:
m_PersistentCalls:
m_Calls: []
+--- !u!1 &1547278203
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 1547278204}
+ - component: {fileID: 1547278206}
+ - component: {fileID: 1547278205}
+ m_Layer: 0
+ m_Name: Time
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &1547278204
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1547278203}
+ 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: 1039507331}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+ m_AnchorMin: {x: 0, y: 1}
+ m_AnchorMax: {x: 0, y: 1}
+ m_AnchoredPosition: {x: 0.1, y: -0.5}
+ m_SizeDelta: {x: 2.87, y: 0.5}
+ m_Pivot: {x: 0, y: 1}
+--- !u!114 &1547278205
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1547278203}
+ 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: "\u0412\u0440\u0435\u043C\u044F:"
+ m_isRightToLeft: 0
+ m_fontAsset: {fileID: 11400000, guid: 3f10bbcf486189d4f95b8de6dc2e2177, type: 2}
+ m_sharedMaterial: {fileID: 4262305343556741190, guid: 3f10bbcf486189d4f95b8de6dc2e2177, 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: 0.35
+ m_fontSizeBase: 0.35
+ m_fontWeight: 400
+ m_enableAutoSizing: 0
+ m_fontSizeMin: 0
+ m_fontSizeMax: 64
+ m_fontStyle: 0
+ m_HorizontalAlignment: 1
+ m_VerticalAlignment: 512
+ m_textAlignment: 65535
+ m_characterSpacing: 0
+ m_wordSpacing: 0
+ m_lineSpacing: 0
+ m_lineSpacingMax: 0
+ m_paragraphSpacing: 0
+ m_charWidthMaxAdj: 0
+ m_enableWordWrapping: 1
+ m_wordWrappingRatios: 0.4
+ m_overflowMode: 0
+ m_linkedTextComponent: {fileID: 0}
+ parentLinkedComponent: {fileID: 0}
+ m_enableKerning: 1
+ m_enableExtraPadding: 0
+ checkPaddingRequired: 0
+ m_isRichText: 1
+ m_parseCtrlCharacters: 1
+ m_isOrthographic: 1
+ m_isCullingEnabled: 0
+ m_horizontalMapping: 0
+ m_verticalMapping: 0
+ m_uvLineOffset: 0
+ m_geometrySortingOrder: 0
+ m_IsTextObjectScaleStatic: 0
+ m_VertexBufferAutoSizeReduction: 0
+ m_useMaxVisibleDescender: 1
+ m_pageToDisplay: 1
+ m_margin: {x: 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 &1547278206
+CanvasRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1547278203}
+ m_CullTransparentMesh: 1
--- !u!1 &1551328423
GameObject:
m_ObjectHideFlags: 0
@@ -43993,6 +44542,8 @@ Transform:
- {fileID: 1723865211}
- {fileID: 1811884474}
- {fileID: 2097140892}
+ - {fileID: 492468474}
+ - {fileID: 1039507331}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1556574614
@@ -48621,6 +49172,81 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 8743e4d9f3eee864f8a12d196097acac, type: 3}
m_Name:
m_EditorClassIdentifier:
+--- !u!1 &1816781451
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 1816781452}
+ - component: {fileID: 1816781454}
+ - component: {fileID: 1816781453}
+ m_Layer: 5
+ m_Name: player1
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &1816781452
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1816781451}
+ m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1.0002826, y: 1.0002826, z: 1.0002826}
+ m_ConstrainProportionsScale: 0
+ m_Children: []
+ m_Father: {fileID: 2055613807}
+ 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: -142, y: -22.09999}
+ m_SizeDelta: {x: 100, y: 100}
+ m_Pivot: {x: 0.5, y: 0.5}
+--- !u!114 &1816781453
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1816781451}
+ 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: e6d4c7d1a7fbe3a4a8b02aa76ee78da4, 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 &1816781454
+CanvasRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1816781451}
+ m_CullTransparentMesh: 1
--- !u!1 &1818415287
GameObject:
m_ObjectHideFlags: 0
@@ -50635,6 +51261,81 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1931747178}
m_CullTransparentMesh: 1
+--- !u!1 &1940615091
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 1940615092}
+ - component: {fileID: 1940615094}
+ - component: {fileID: 1940615093}
+ m_Layer: 5
+ m_Name: player1
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &1940615092
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1940615091}
+ 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: 1482394972}
+ 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: 142.8, y: -22.1}
+ m_SizeDelta: {x: 100, y: 100}
+ m_Pivot: {x: 0.5, y: 0.5}
+--- !u!114 &1940615093
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1940615091}
+ 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: a640cc94f9689af4bbf5ca46685dfd85, 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 &1940615094
+CanvasRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1940615091}
+ m_CullTransparentMesh: 1
--- !u!1 &1944123992
GameObject:
m_ObjectHideFlags: 0
@@ -52678,6 +53379,7 @@ RectTransform:
m_Children:
- {fileID: 1195893194}
- {fileID: 918319252}
+ - {fileID: 1816781452}
m_Father: {fileID: 347852021}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
diff --git a/Assets/Scripts/CharacterS/Character2.prefab b/Assets/Scripts/CharacterS/Character2.prefab
index e6867ad..89f2630 100644
--- a/Assets/Scripts/CharacterS/Character2.prefab
+++ b/Assets/Scripts/CharacterS/Character2.prefab
@@ -243,8 +243,8 @@ MonoBehaviour:
PrizeType: 0
Amount: 0
HasPrize: 1
- boxLocalPosition: {x: 40, y: 380}
- CharacterLocalPosition: {x: 0, y: -13}
+ boxLocalPosition: {x: 40, y: 430}
+ CharacterLocalPosition: {x: 0, y: 87}
chipSpawningAnim: {fileID: 7400000, guid: 784e3317ca4a8de40b1f3bae81382df0, type: 2}
chipThrowClip: {fileID: 8300000, guid: a41d2ced8b227084186830008a638fac, type: 3}
difficultyPresetsEasy:
diff --git a/Assets/Scripts/GameFSM/MenuState.cs b/Assets/Scripts/GameFSM/MenuState.cs
index 5428950..99067f4 100644
--- a/Assets/Scripts/GameFSM/MenuState.cs
+++ b/Assets/Scripts/GameFSM/MenuState.cs
@@ -96,6 +96,7 @@ public class MenuState : IState
//ресет
gm.vsBotThinkTime = 0;
gm.vsBotMoves = 0;
+ gm.movesAndTimeCounter.SetVisibility(false);
CharacterController.HideCharacter();
CharacterController.I.SetAllCharactersPrizeAvailable(true);
@@ -280,6 +281,8 @@ public class MenuState : IState
//при переходе из меню первым ходит игрок1
gm.stateMachine.ChangeState(new StartRoundState(CellState.Player1));
+
+ if(gm.gameMode==GameMode.pve) gm.movesAndTimeCounter.SetVisibility(true);
}
}
}
diff --git a/Assets/Scripts/GameFSM/PositioningState.cs b/Assets/Scripts/GameFSM/PositioningState.cs
index 255f736..9b5d325 100644
--- a/Assets/Scripts/GameFSM/PositioningState.cs
+++ b/Assets/Scripts/GameFSM/PositioningState.cs
@@ -68,6 +68,7 @@ public class PositioningState : IState
public void exit()
{
+ gm.pvpPointer.SetVisibility(false);
gm.StartCoroutine(DestroyPointer());
}
@@ -130,8 +131,7 @@ public class PositioningState : IState
float targetY = gm.startY;
Vector2 targetPosition = new Vector2(targetX, targetY);
- //float speed = gm.chipXSpeed;
- float speed = DEFAULT_SPEED;//вот тут скорость занулялась, и иногда фишки не падали
+ float speed = DEFAULT_SPEED;
//УКАЗАТЕЛЬ
float pointerY = gm.slotLeftTop.transform.position.y - gm.stepY * GameManager.fieldModel.getHeight(position);
@@ -142,7 +142,14 @@ public class PositioningState : IState
- if (gm.gameMode == GameMode.pvp) targetPosition += Vector2.up*5;//повыше
+ if (gm.gameMode == GameMode.pvp)
+ {
+ gm.pvpPointer.SetColor(gm.currentPlayer);
+ gm.pvpPointer.SetVisibility(true);
+ gm.pvpPointer.MoveTo(targetPosition);
+
+ targetPosition += Vector2.up*5;//повыше
+ }
chip.transform.position = Vector2.MoveTowards(chip.transform.position, targetPosition, speed * Time.deltaTime);
diff --git a/Assets/Scripts/GameManager.cs b/Assets/Scripts/GameManager.cs
index 19840f7..d3760a3 100644
--- a/Assets/Scripts/GameManager.cs
+++ b/Assets/Scripts/GameManager.cs
@@ -419,6 +419,9 @@ public class GameManager : MonoBehaviour
public GameObject checkQrPanel;
public DualAvatarController avatarController;
+ public PvpPointer pvpPointer;
+ public MovesAndTimeCounter movesAndTimeCounter;
+
void Awake()
{
Cursor.lockState = CursorLockMode.Locked;
diff --git a/Assets/Scripts/Inputs/ComSystem/ComWrapper.cs b/Assets/Scripts/Inputs/ComSystem/ComWrapper.cs
index 4399ca0..e010109 100644
--- a/Assets/Scripts/Inputs/ComSystem/ComWrapper.cs
+++ b/Assets/Scripts/Inputs/ComSystem/ComWrapper.cs
@@ -4,16 +4,10 @@ using System.Text;
using UnityEngine;
using UnityEngine.Events;
-//async
using System.Threading.Tasks;
using System.Threading;
-
-///
-/// Основной класс-обертка для работы с COM-портом и периферийной платой.
-/// Управляет всей коммуникацией с аппаратным обеспечением: прием монет, чтение кнопок, управление подсветкой, отправка сигналов.
-///
public class ComWrapper : MonoBehaviour
{
//Настраиваем из инспектора
@@ -26,13 +20,10 @@ public class ComWrapper : MonoBehaviour
public static UnityEvent onCoinRemoved;
public static UnityEvent onInputRecieved;
- #region Приватные поля
- private const string REQUEST_INPUT = "91";
- private const string DEFAULT_INPUT = "INPUT1111111111111111";
+ private const string REQUEST_INPUT = "91";
private static int h;//идентификатор хэндла
private static byte[] buf = new byte[1024]; //Байт-буфер куда будут приходить данные с порта
-
public static int Balance;
bool boardEncrypted = false;
@@ -42,29 +33,13 @@ public class ComWrapper : MonoBehaviour
//async
private CancellationTokenSource pollCancellationTokenSource;
- private bool isPolling = false;
-
-
- //сделать запрос инпутов. а если его нет то просим ребут? делаем если по другим факторам не пройдёт.
-
- //private string inputString = DEFAULT_INPUT;
- #endregion
//===========================start: PUBLIC API===========================//
- ///
- /// Инициализирует систему работы с COM-портом.
- /// Открывает соединение, настраивает события и запускает периодические запросы состояния.
- ///
- ///
- /// Обязателен к вызову при старте приложения. Выполняет:
- /// - Создание UnityEvent'ов для уведомлений
- /// - Загрузку количества кредитов из PlayerPrefs
- /// - Открытие COM-порта
- /// - Запуск периодического опроса пинов (если включена проверка призов)
- ///
public void Initialize()
{
+ //добавить проверку флага инициализации
+
//Создаем ивенты
onCoinAdded = new UnityEvent();
onCoinRemoved = new UnityEvent();
@@ -78,17 +53,14 @@ public class ComWrapper : MonoBehaviour
onInputRecieved?.AddListener(InputRecievedCather);
StartCoroutine(SetupBoard());
+
+ }
+
+ private void send_port_pin_message(int pin)
+ {
}
- ///
- /// Добавляет один кредит в систему и сохраняет обновленное количество.
- /// Вызывается автоматически событием при получении сигнала "COIN" из COM-порта.
- ///
- ///
- /// Увеличивает счетчик кредитов и вызывает событие onCoinAdded для уведомления подписчиков.
- /// Автоматически сохраняет состояние в PlayerPrefs.
- ///
public static void AddCredit()
{
int recieved = PlayerPrefs.GetInt("ValutaPerImpulse", 10);
@@ -100,7 +72,7 @@ public class ComWrapper : MonoBehaviour
PlayerPrefs.SetInt(PrizeSystem.key_starts, PlayerPrefs.GetInt(PrizeSystem.key_starts) + recieved);
PlayerPrefs.SetInt(PrizeSystem.key_startsNul, PlayerPrefs.GetInt(PrizeSystem.key_startsNul) + recieved);
- if(SettingsManager.GetString("BaseBotDifficulty", "Фиксированная") == "Повышенная")
+ if (SettingsManager.GetString("BaseBotDifficulty", "Фиксированная") == "Повышенная")
{
int nowPulses = PlayerPrefs.GetInt("PulsesCounter", 0) + 1;
PlayerPrefs.SetInt("PulsesCounter", nowPulses);
@@ -111,15 +83,6 @@ public class ComWrapper : MonoBehaviour
onCoinAdded?.Invoke(Balance);
}
- ///
- /// Отправляет произвольную строковую команду на периферийную плату через COM-порт.
- ///
- /// Команда для отправки
- ///
- /// Используется для отправки пользовательских команд на плату.
- /// Команда должна быть в формате, ожидаемом прошивкой платы.
- /// В случае ошибки отправки выводит предупреждение в DebugWindow.
- ///
public static void Send(string message)
{
try
@@ -131,14 +94,6 @@ public class ComWrapper : MonoBehaviour
catch { Debug.LogError("Ошибка отправки строкового сигнала."); }
}
- ///
- /// Отправляет команду управления подсветкой на периферийную плату.
- ///
- /// Режим подсветки из перечисления LightMode
- ///
- /// Формирует команду вида "80XXX" где XXX - код режима подсветки.
- /// Для добавления новых режимов необходимо обновить вложенный метод getLightString + добавить режим в перечисление.
- ///
public static void Send(LightMode lightMode)
{
try
@@ -149,21 +104,7 @@ public class ComWrapper : MonoBehaviour
catch { Debug.LogError("Ошибка отправки светового сигнала."); }
}
- ///
- /// Выполняет списание платы за запуск игры.
- /// Проверяет наличие доступных кредитов или режим бесплатной игры.
- /// При успешном списании увеличивает счетчики запусков.
- ///
- ///
- /// true - если списание прошло успешно (бесплатный режим или есть кредиты),
- /// false - если кредитов недостаточно и платный режим
- ///
- ///
- /// В случае успеха:
- /// - Увеличивает общие счетчики запусков (key_starts и key_startsNul)
- /// - При платном режиме уменьшает количество кредитов на 1
- /// - Вызывает событие onCoinRemoved при списании кредита
- ///
+
public static bool Pay(int amount)
{
//блок проверки оплаты
@@ -183,23 +124,19 @@ public class ComWrapper : MonoBehaviour
return false;
}
-
-
-
//===========================end: PUBLIC API===========================//
- //private void Update() => pollPort(); //async пока выключил это
private void OnDisable()
{
- StopAsyncPolling();//async
+ StopAsyncPolling();
ClosePort();
}
private void OnApplicationQuit()
{
- StopAsyncPolling();//async
+ StopAsyncPolling();
ClosePort();
}
@@ -246,37 +183,11 @@ public class ComWrapper : MonoBehaviour
if (comInput.StartsWith("ENC:")) encString = comInput;
if (comInput.StartsWith("ACTIVATED:")) confirmString = comInput;
}
- private IEnumerator KeepPortAliveProcess()
- {
- Logger.Instance.Log("Подключаю проверку порта.");
+ private void ToggleInputRecieved(int value) => PlayerPrefs.SetInt("inputToggle", value);
+ private int GetInputToggle() => PlayerPrefs.GetInt("inputToggle", 0);
- while (true)
- {
- requestInputs();
- yield return new WaitForSeconds(2f);
-
- //нет инпута
- if (GetInputToggle() == 0)
- {
- Logger.Instance.Log("Плата отвалилась. Запускаю переподключение.");
- initPort();
- }
- //есть инпут
- else
- {
- ToggleInputRecieved(0);
- }
-
- yield return new WaitForSeconds(10f);
- }
-
- }
-
- void ToggleInputRecieved(int value) => PlayerPrefs.SetInt("inputToggle", value);
- int GetInputToggle() => PlayerPrefs.GetInt("inputToggle", 0);
-
- void InputRecievedCather(string input)
+ private void InputRecievedCather(string input)
{
if (!string.IsNullOrEmpty(input))
{
@@ -287,8 +198,6 @@ public class ComWrapper : MonoBehaviour
}
#region Приватные методы
- //Ну тут по дебаг логам все должно быть понятно
- //Если интересно, то h - это хэндл. Что то на плюсовом, типа ID соединения или чтото. Если 0 то нету соед. если меньше то ошибка, больше 0 - норм.
private void initPort()
{
Logger.Instance.Log("Инициализация порта");
@@ -301,11 +210,6 @@ public class ComWrapper : MonoBehaviour
string port = ports[^1];
Logger.Instance.Log("Открываю порт: " + port);
-
- //вот эти настройки лучше не ковырять, но если очень хочется можно поменять readTimeoutMs и writeTimeoutMs
- //Если read поставить слишком маленьким оно проебует кредиты когда они идут большой пачкой например при оплате через вендисту.
- //Там в порт спамит "COIN" в больших количествах и процентов 10 из этих строк не успевают прочитаться при таймауте 1мс, соотв. монеты проебуются.
- //Слишком большой таймаут будет тормозить игру потому что оно все выполняется синхронно и каждый кадр забирает столько мс сколько в переменной указано.
h = ComNativeWrapper.Serial_Open(port, 115200, 8, 0, 1, 4, 10);
@@ -331,8 +235,6 @@ public class ComWrapper : MonoBehaviour
}
}
-
- //Тут чтение, не трогаем(опционально)
private static string ReadBufferLine()
{
@@ -350,7 +252,6 @@ public class ComWrapper : MonoBehaviour
return "";
}
- //async
private static async Task ReadBufferLineAsync(CancellationToken cancellationToken = default)
{
try
@@ -381,8 +282,6 @@ public class ComWrapper : MonoBehaviour
}
}
-
- //просим прислать состояние цифровых входов. Приходит что то вроде "INPUT111111101"
private void requestInputs() => Send(REQUEST_INPUT);
private void pollPort()
@@ -492,8 +391,8 @@ public class ComWrapper : MonoBehaviour
//async
//Каждые 5 сек запрашиваем инпуты у платы. Надо потому что при заходе в игру с пинов еще не пришла инфа
-/* if (keepAlive)
- keepAliveCoroutine = StartCoroutine(KeepPortAliveProcess());*/
+ /* if (keepAlive)
+ keepAliveCoroutine = StartCoroutine(KeepPortAliveProcess());*/
//async
pollCancellationTokenSource = new CancellationTokenSource();
@@ -566,7 +465,7 @@ public class ComWrapper : MonoBehaviour
await Task.Run(() => initPort(), cancellationToken);
}
- public static string ExtractData(string input)
+ private static string ExtractData(string input)
{
const string encPrefix = "ENC:";
diff --git a/Assets/Scripts/Inputs/ComSystem/UnityMainThreadDispatcher.cs b/Assets/Scripts/Inputs/ComSystem/UnityMainThreadDispatcher.cs
index a45f3ba..a3788f3 100644
--- a/Assets/Scripts/Inputs/ComSystem/UnityMainThreadDispatcher.cs
+++ b/Assets/Scripts/Inputs/ComSystem/UnityMainThreadDispatcher.cs
@@ -1,12 +1,12 @@
-using System;
-using System.Collections.Generic;
+using System.Collections.Concurrent;
+using System.Threading.Tasks;
using UnityEngine;
+using System;
-//async
public class UnityMainThreadDispatcher : MonoBehaviour
{
private static UnityMainThreadDispatcher instance;
- private readonly Queue actions = new Queue();
+ private readonly ConcurrentQueue actionQueue = new ConcurrentQueue();
public static UnityMainThreadDispatcher Instance
{
@@ -14,30 +14,46 @@ public class UnityMainThreadDispatcher : MonoBehaviour
{
if (instance == null)
{
- var go = new GameObject("MainThreadDispatcher");
- instance = go.AddComponent();
+ var go = new GameObject("UnityMainThreadDispatcher");
DontDestroyOnLoad(go);
+ instance = go.AddComponent();
}
return instance;
}
}
+ // Для синхронного выполнения
public void Enqueue(Action action)
{
- lock (actions)
+ actionQueue.Enqueue(action);
+ }
+
+ // Для асинхронного выполнения с ожиданием
+ public Task EnqueueAsync(Action action)
+ {
+ var tcs = new TaskCompletionSource();
+
+ actionQueue.Enqueue(() =>
{
- actions.Enqueue(action);
- }
+ try
+ {
+ action();
+ tcs.SetResult(true);
+ }
+ catch (Exception e)
+ {
+ tcs.SetException(e);
+ }
+ });
+
+ return tcs.Task;
}
private void Update()
{
- lock (actions)
+ while (actionQueue.TryDequeue(out var action))
{
- while (actions.Count > 0)
- {
- actions.Dequeue()?.Invoke();
- }
+ action();
}
}
}
\ No newline at end of file
diff --git a/Assets/Scripts/MovesAndTimeCounter.cs b/Assets/Scripts/MovesAndTimeCounter.cs
new file mode 100644
index 0000000..141eed3
--- /dev/null
+++ b/Assets/Scripts/MovesAndTimeCounter.cs
@@ -0,0 +1,54 @@
+using System.Collections;
+using System.Collections.Generic;
+using TMPro;
+using UnityEngine;
+
+public class MovesAndTimeCounter : MonoBehaviour
+{
+
+ [SerializeField] TextMeshProUGUI movesLabel;
+ [SerializeField] string movesPrefix = "Ходы: ";
+
+ [SerializeField] TextMeshProUGUI timeLabel;
+ [SerializeField] string timePrefix = "Время: ";
+
+ [SerializeField] int digitsAfterComma = 2;
+
+ private bool visible = false;
+ private GameManager gm;
+ public void SetVisibility(bool visible)
+ {
+ this.visible = visible;
+
+ movesLabel.enabled = visible;
+ timeLabel.enabled = visible;
+ }
+
+ private void Start()
+ {
+ SetVisibility(false);
+ gm = GameManager.instance;
+ }
+
+ void Update()
+ {
+ if (!visible) return;
+
+ UpdateTime();
+ UpdateMoves();
+
+ }
+
+ private void UpdateTime()
+ {
+ float time = gm.vsBotThinkTime;
+ time = (int)(time*Mathf.Pow(10, digitsAfterComma));
+ time = time / Mathf.Pow(10, digitsAfterComma);
+ timeLabel.text = timePrefix + time;
+ }
+ private void UpdateMoves()
+ {
+ movesLabel.text = movesPrefix + gm.vsBotMoves;
+ }
+
+}
diff --git a/Assets/Scripts/MovesAndTimeCounter.cs.meta b/Assets/Scripts/MovesAndTimeCounter.cs.meta
new file mode 100644
index 0000000..b821f03
--- /dev/null
+++ b/Assets/Scripts/MovesAndTimeCounter.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: fe2d117b08365f74188f302445e7d79c
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scripts/PvpPointer.cs b/Assets/Scripts/PvpPointer.cs
new file mode 100644
index 0000000..0dbb7f5
--- /dev/null
+++ b/Assets/Scripts/PvpPointer.cs
@@ -0,0 +1,15 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+public class PvpPointer : MonoBehaviour
+{
+ [SerializeField] SpriteRenderer _renderer;
+ [SerializeField] List sprites;//0 - первый, 1 - второй игрок.
+ [SerializeField] Vector3 offset;
+
+ public void SetColor(CellState player) => _renderer.sprite = player == CellState.Player1 ? sprites[0] : sprites[1];
+ public void SetVisibility(bool visible) => _renderer.enabled = visible;
+ public void MoveTo(Vector3 targetPosition) => _renderer.transform.position = targetPosition + offset;
+
+}
diff --git a/Assets/Scripts/PvpPointer.cs.meta b/Assets/Scripts/PvpPointer.cs.meta
new file mode 100644
index 0000000..2d721bd
--- /dev/null
+++ b/Assets/Scripts/PvpPointer.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 21c0a89ccac34ae4f91d75a6908682c2
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Sprites/УказательОранжевый.png b/Assets/Sprites/УказательОранжевый.png
new file mode 100644
index 0000000..8367a74
Binary files /dev/null and b/Assets/Sprites/УказательОранжевый.png differ
diff --git a/Assets/Sprites/УказательОранжевый.png.meta b/Assets/Sprites/УказательОранжевый.png.meta
new file mode 100644
index 0000000..5f7c2bc
--- /dev/null
+++ b/Assets/Sprites/УказательОранжевый.png.meta
@@ -0,0 +1,127 @@
+fileFormatVersion: 2
+guid: abbe07a8e65cdae4fa70f648e92c727b
+TextureImporter:
+ internalIDToNameTable: []
+ externalObjects: {}
+ serializedVersion: 13
+ 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: 35
+ 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: Android
+ 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:
diff --git a/Assets/Sprites/УказательСиний.png b/Assets/Sprites/УказательСиний.png
new file mode 100644
index 0000000..57b05d4
Binary files /dev/null and b/Assets/Sprites/УказательСиний.png differ
diff --git a/Assets/Sprites/УказательСиний.png.meta b/Assets/Sprites/УказательСиний.png.meta
new file mode 100644
index 0000000..3385fa3
--- /dev/null
+++ b/Assets/Sprites/УказательСиний.png.meta
@@ -0,0 +1,127 @@
+fileFormatVersion: 2
+guid: dc58521a76ffa524291e7e43262efbf3
+TextureImporter:
+ internalIDToNameTable: []
+ externalObjects: {}
+ serializedVersion: 13
+ 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: 35
+ 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: Android
+ 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: