Как вот это вот описать...
Было очень много экстренных ситуаций. И по мне стреляли, и я упал в лужу нахуй блять, и лежал нахуй
This commit is contained in:
parent
9ad7ee6dbb
commit
f32d7dd69b
4725
Assets/BoardDots.shadergraph
Normal file
4725
Assets/BoardDots.shadergraph
Normal file
File diff suppressed because it is too large
Load Diff
18
Assets/BoardDots.shadergraph.meta
Normal file
18
Assets/BoardDots.shadergraph.meta
Normal file
@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e2f1bb842dcf2f34bbf29dc9e0846318
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}
|
||||
useAsTemplate: 0
|
||||
exposeTemplateAsShader: 0
|
||||
template:
|
||||
name:
|
||||
category:
|
||||
description:
|
||||
icon: {instanceID: 0}
|
||||
thumbnail: {instanceID: 0}
|
||||
72
Assets/BoardDotsMAt.mat
Normal file
72
Assets/BoardDotsMAt.mat
Normal file
@ -0,0 +1,72 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-177328017564555484
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion
|
||||
version: 10
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: BoardDotsMAt
|
||||
m_Shader: {fileID: -6465566751694194690, guid: e2f1bb842dcf2f34bbf29dc9e0846318, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: e2e62195d0338f2489f389664ec84938, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MaskTexture:
|
||||
m_Texture: {fileID: 2800000, guid: 39ce5a75885e64d4fb9e9f6ffb57a290, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _Texture:
|
||||
m_Texture: {fileID: 2800000, guid: 6a7354b3351498946bfa42dd5ff4e348, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _Alpha: 0.5
|
||||
- _Tiling: 50
|
||||
m_Colors:
|
||||
- White: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _BackgroundColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _DotsColor: {r: 0.7568628, g: 0.6666667, b: 0.76470596, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
@ -1,8 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f49b74ce8f8822a4e9dccbb4147a52c2
|
||||
guid: 79daae113478bab4f8a42a21594a1646
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Circle 1.png
Normal file
BIN
Assets/Circle 1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.9 KiB |
@ -1,7 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a293183981bba6a42951496f015b2671
|
||||
guid: f53dbac82ca6398489e90ff262e9d5b3
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
internalIDToNameTable:
|
||||
- first:
|
||||
213: -2413806693520163455
|
||||
second: Circle_0
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
@ -48,7 +51,7 @@ TextureImporter:
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spritePixelsToUnits: 256
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
@ -84,19 +87,6 @@ TextureImporter:
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 12
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
@ -108,7 +98,29 @@ TextureImporter:
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
sprites:
|
||||
- serializedVersion: 2
|
||||
name: Circle_0
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 256
|
||||
height: 256
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: 18d3544e99f608ed0800000000000000
|
||||
internalID: -2413806693520163455
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
@ -122,7 +134,8 @@ TextureImporter:
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
nameFileIdTable:
|
||||
Circle_0: -2413806693520163455
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
File diff suppressed because one or more lines are too long
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bb30b85b342a1cc4da78f7679c21aee0
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because one or more lines are too long
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 403859e7044f1fc47be9ca106c64ff20
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fe488aff7ee5c8e42a51bbaecca8043a
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@ -1,21 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f5b3a8d23d96a2b478b3a27e0058626b
|
||||
TrueTypeFontImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 4
|
||||
fontSize: 16
|
||||
forceTextureCase: -2
|
||||
characterSpacing: 0
|
||||
characterPadding: 1
|
||||
includeFontData: 1
|
||||
fontNames:
|
||||
- MOSCOW2024
|
||||
fallbackFontReferences: []
|
||||
customCharacters:
|
||||
fontRenderingMode: 0
|
||||
ascentCalculationMode: 1
|
||||
useLegacyBoundsCalculation: 0
|
||||
shouldRoundAdvanceValue: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because one or more lines are too long
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ff45acf3c92edf441bbb02b9a8aab75b
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@ -1,21 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 657840251ed79e543a56840f2f0c6d4a
|
||||
TrueTypeFontImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 4
|
||||
fontSize: 16
|
||||
forceTextureCase: -2
|
||||
characterSpacing: 0
|
||||
characterPadding: 1
|
||||
includeFontData: 1
|
||||
fontNames:
|
||||
- DS-Digital
|
||||
fallbackFontReferences: []
|
||||
customCharacters:
|
||||
fontRenderingMode: 0
|
||||
ascentCalculationMode: 1
|
||||
useLegacyBoundsCalculation: 0
|
||||
shouldRoundAdvanceValue: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1ee9f3e03c52c304b8c831dc7aed5fa0
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because one or more lines are too long
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 09e15f8649d146548b15eff3c742ec2b
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@ -1,21 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 79cb3cd9a30ef68468b0f490f91e4c52
|
||||
TrueTypeFontImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 4
|
||||
fontSize: 16
|
||||
forceTextureCase: -2
|
||||
characterSpacing: 0
|
||||
characterPadding: 1
|
||||
includeFontData: 1
|
||||
fontNames:
|
||||
- NexaText
|
||||
fallbackFontReferences: []
|
||||
customCharacters:
|
||||
fontRenderingMode: 0
|
||||
ascentCalculationMode: 1
|
||||
useLegacyBoundsCalculation: 0
|
||||
shouldRoundAdvanceValue: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because one or more lines are too long
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6eadce2d7083d384dbcb7e2f40fc590d
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@ -1,21 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 14026adfa78489b4e9910da2c7a8db68
|
||||
TrueTypeFontImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 4
|
||||
fontSize: 16
|
||||
forceTextureCase: -2
|
||||
characterSpacing: 0
|
||||
characterPadding: 1
|
||||
includeFontData: 1
|
||||
fontNames:
|
||||
- NexaText
|
||||
fallbackFontReferences: []
|
||||
customCharacters:
|
||||
fontRenderingMode: 0
|
||||
ascentCalculationMode: 1
|
||||
useLegacyBoundsCalculation: 0
|
||||
shouldRoundAdvanceValue: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because one or more lines are too long
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c3585cf04b400e940a31d5275124d102
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@ -1,21 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3b42c3f1b050426449caa4089cc2ce7d
|
||||
TrueTypeFontImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 4
|
||||
fontSize: 16
|
||||
forceTextureCase: -2
|
||||
characterSpacing: 0
|
||||
characterPadding: 1
|
||||
includeFontData: 1
|
||||
fontNames:
|
||||
- NexaText
|
||||
fallbackFontReferences: []
|
||||
customCharacters:
|
||||
fontRenderingMode: 0
|
||||
ascentCalculationMode: 1
|
||||
useLegacyBoundsCalculation: 0
|
||||
shouldRoundAdvanceValue: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because one or more lines are too long
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3f10bbcf486189d4f95b8de6dc2e2177
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@ -1,21 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9282a8614e95b3747b093f73c8eeb7a9
|
||||
TrueTypeFontImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 4
|
||||
fontSize: 16
|
||||
forceTextureCase: -2
|
||||
characterSpacing: 0
|
||||
characterPadding: 1
|
||||
includeFontData: 1
|
||||
fontNames:
|
||||
- NexaText
|
||||
fallbackFontReferences: []
|
||||
customCharacters:
|
||||
fontRenderingMode: 0
|
||||
ascentCalculationMode: 1
|
||||
useLegacyBoundsCalculation: 0
|
||||
shouldRoundAdvanceValue: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because one or more lines are too long
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d89cc8769d56fbc4a89d46968d7b69eb
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because one or more lines are too long
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c21abe60f4e591340846f01fa37ceb04
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@ -1,21 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 552ddc8b4c0448e41a5167ba99b48edd
|
||||
TrueTypeFontImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 4
|
||||
fontSize: 16
|
||||
forceTextureCase: -2
|
||||
characterSpacing: 0
|
||||
characterPadding: 1
|
||||
includeFontData: 1
|
||||
fontNames:
|
||||
- Rubik Spray Paint
|
||||
fallbackFontReferences: []
|
||||
customCharacters:
|
||||
fontRenderingMode: 0
|
||||
ascentCalculationMode: 1
|
||||
useLegacyBoundsCalculation: 0
|
||||
shouldRoundAdvanceValue: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because one or more lines are too long
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2401391e7a2a4b044a8c6a06de4b50bd
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because one or more lines are too long
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 35b718fbf5ec82f419b79f397b779d7d
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because one or more lines are too long
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 394a8a8df8af8704a80a6eb46237d7d1
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@ -1,21 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0b295ab67e11cef4c9382afe2948e910
|
||||
TrueTypeFontImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 4
|
||||
fontSize: 16
|
||||
forceTextureCase: -2
|
||||
characterSpacing: 0
|
||||
characterPadding: 1
|
||||
includeFontData: 1
|
||||
fontNames:
|
||||
- Russo One
|
||||
fallbackFontReferences: []
|
||||
customCharacters:
|
||||
fontRenderingMode: 0
|
||||
ascentCalculationMode: 1
|
||||
useLegacyBoundsCalculation: 0
|
||||
shouldRoundAdvanceValue: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because one or more lines are too long
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 83c1de2a4920b75478f3707457764774
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because one or more lines are too long
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ec350211bba63504387243cafea1fa5f
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because one or more lines are too long
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7ddaaf9ca7516144fa3d2348b24d8cef
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because one or more lines are too long
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: aabfd183ee14caf4ca7a3f6f315c222b
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
185
Assets/Prefabs/BoardCell.prefab
Normal file
185
Assets/Prefabs/BoardCell.prefab
Normal file
@ -0,0 +1,185 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &1732722988636188523
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1232563996862300906}
|
||||
- component: {fileID: 2293002692480638144}
|
||||
m_Layer: 0
|
||||
m_Name: BoardCell
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1232563996862300906
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1732722988636188523}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0.7324994, y: -1.1227453, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 974239977226264528}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!331 &2293002692480638144
|
||||
SpriteMask:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1732722988636188523}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 0
|
||||
m_RayTraceProcedural: 0
|
||||
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
m_ForceMeshLod: -1
|
||||
m_MeshLodSelectionBias: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: 15d0c3709176029428a0da2f8cecf0b5, type: 2}
|
||||
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: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_GlobalIlluminationMeshLod: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_MaskInteraction: 0
|
||||
m_Sprite: {fileID: 21300000, guid: f53dbac82ca6398489e90ff262e9d5b3, type: 3}
|
||||
m_MaskAlphaCutoff: 0.2
|
||||
m_FrontSortingLayerID: 0
|
||||
m_BackSortingLayerID: 0
|
||||
m_FrontSortingLayer: 0
|
||||
m_BackSortingLayer: 0
|
||||
m_FrontSortingOrder: 0
|
||||
m_BackSortingOrder: 0
|
||||
m_IsCustomRangeActive: 0
|
||||
m_SpriteSortPoint: 0
|
||||
m_MaskSource: 0
|
||||
--- !u!1 &9031954938553053343
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 974239977226264528}
|
||||
- component: {fileID: 4179962035302736964}
|
||||
m_Layer: 0
|
||||
m_Name: circle_0
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &974239977226264528
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9031954938553053343}
|
||||
serializedVersion: 2
|
||||
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: 1232563996862300906}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!212 &4179962035302736964
|
||||
SpriteRenderer:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9031954938553053343}
|
||||
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_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
m_ForceMeshLod: -1
|
||||
m_MeshLodSelectionBias: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2}
|
||||
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_GlobalIlluminationMeshLod: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_MaskInteraction: 0
|
||||
m_Sprite: {fileID: -6231044458718751821, guid: 110d360d78ebb634aa6752456b5801b1, 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.58, y: 1.58}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_SpriteSortPoint: 0
|
||||
@ -1,7 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e8d32baa3551f9447957db9f7bb05623
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
guid: 9fdcd0c9de8ec614a9d2bd2ba63c3006
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8239d7c546e392049b05507ecf82e3e6
|
||||
guid: f412a1d78fe9794429f136c60d775f2c
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
2490
Assets/Prefabs/Gameplay/Board.prefab
Normal file
2490
Assets/Prefabs/Gameplay/Board.prefab
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3a2a32ab1d5a50a40919dab9e28c420f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
guid: e02b6d701d1d2164e9d5782870583b5e
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
305
Assets/Prefabs/Gameplay/levelbar cell.prefab
Normal file
305
Assets/Prefabs/Gameplay/levelbar cell.prefab
Normal file
@ -0,0 +1,305 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &2112185026095414869
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 5099311422004014918}
|
||||
- component: {fileID: 8206085602993513823}
|
||||
- component: {fileID: 4027478242578972090}
|
||||
m_Layer: 5
|
||||
m_Name: frame
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!224 &5099311422004014918
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2112185026095414869}
|
||||
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: 1909234588782507268}
|
||||
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 &8206085602993513823
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2112185026095414869}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &4027478242578972090
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2112185026095414869}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 0.92549026, 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: -7122446845845794132, guid: dc142ba18b2f32e46b05e49345242b5a, 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!1 &2844448063283312442
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3643794106403791811}
|
||||
- component: {fileID: 5286460581223042197}
|
||||
- component: {fileID: 9085446024378714943}
|
||||
m_Layer: 5
|
||||
m_Name: fill
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!224 &3643794106403791811
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2844448063283312442}
|
||||
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: 1909234588782507268}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0.000045776367, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &5286460581223042197
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2844448063283312442}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &9085446024378714943
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2844448063283312442}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 0.92549026, 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: 4699614374132475465, guid: dc142ba18b2f32e46b05e49345242b5a, 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!1 &5739653273790000795
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1909234588782507268}
|
||||
- component: {fileID: 4924402218340474461}
|
||||
- component: {fileID: 8571071986540176960}
|
||||
m_Layer: 5
|
||||
m_Name: levelbar cell
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1909234588782507268
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5739653273790000795}
|
||||
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: 5099311422004014918}
|
||||
- {fileID: 4455418791575280805}
|
||||
- {fileID: 3643794106403791811}
|
||||
m_Father: {fileID: 0}
|
||||
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: 78.340004, y: 45.91}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &4924402218340474461
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5739653273790000795}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &8571071986540176960
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5739653273790000795}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.3019608, g: 0.3019608, b: 0.3019608, 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: 4699614374132475465, guid: dc142ba18b2f32e46b05e49345242b5a, 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!1 &8857851165114916971
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4455418791575280805}
|
||||
- component: {fileID: 7802666089778078125}
|
||||
- component: {fileID: 9071556075731536861}
|
||||
m_Layer: 5
|
||||
m_Name: gift
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!224 &4455418791575280805
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8857851165114916971}
|
||||
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: 1909234588782507268}
|
||||
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 &7802666089778078125
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8857851165114916971}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &9071556075731536861
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8857851165114916971}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.6, g: 0.6, b: 0.6, 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: -1379242253812482952, guid: dc142ba18b2f32e46b05e49345242b5a, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 1
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
@ -1,7 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d025318e1769b7c4e832740ddd13aaa0
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
guid: e45c4d0b012452f40ad1dc153ae38811
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
@ -163,8 +163,8 @@ RectTransform:
|
||||
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: -5.4975, y: 0}
|
||||
m_SizeDelta: {x: 744.39, y: 70.65}
|
||||
m_AnchoredPosition: {x: 207.99, y: 0}
|
||||
m_SizeDelta: {x: 317.41, y: 70.65}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &212586424511360269
|
||||
MonoBehaviour:
|
||||
|
||||
@ -1,80 +1,5 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &1255775458925796345
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2398971302946387949}
|
||||
- component: {fileID: 7505223404011705605}
|
||||
- component: {fileID: 1977085099474755120}
|
||||
m_Layer: 5
|
||||
m_Name: Title
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2398971302946387949
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1255775458925796345}
|
||||
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: 3994272294263330828}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 1, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: -94.52994, y: -5}
|
||||
m_SizeDelta: {x: 709.6, y: 177.66003}
|
||||
m_Pivot: {x: 1, y: 1}
|
||||
--- !u!222 &7505223404011705605
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1255775458925796345}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &1977085099474755120
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1255775458925796345}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
|
||||
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: 198a4e08ee71235458ca026159c855d8, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 1
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &2687921798980558187
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -241,7 +166,6 @@ RectTransform:
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 2398971302946387949}
|
||||
- {fileID: 5121529098333695791}
|
||||
- {fileID: 6485827085938151420}
|
||||
- {fileID: 3881694415663419860}
|
||||
@ -478,6 +402,10 @@ PrefabInstance:
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7906017121606248565, guid: 148df6817f74c934db0b476a88e85208, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 8.044983
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
128
Assets/Scripts/Bootstrap.cs
Normal file
128
Assets/Scripts/Bootstrap.cs
Normal file
@ -0,0 +1,128 @@
|
||||
using PrizeSystem;
|
||||
using System.Text;
|
||||
using UnityEngine;
|
||||
using static UnityEngine.Rendering.DebugUI.Table;
|
||||
|
||||
public class Bootstrap : MonoBehaviour
|
||||
{
|
||||
private const int DEFAULT_FRAME_RATE = 60;
|
||||
[SerializeField] private SoundManager soundManager;
|
||||
[SerializeField] private Board board;
|
||||
[SerializeField] private NotificationSystem notificationSystem;
|
||||
[SerializeField] private In inputSystem;
|
||||
[SerializeField] private PrizeSystemManager prizeSystem;
|
||||
[SerializeField] private VideoUtility videoUtility;
|
||||
[SerializeField] private VitrinaCatcher vitrinaCatcher;
|
||||
[SerializeField] private DualAvatarController avatarController;
|
||||
[SerializeField] private GameManager gameManager;
|
||||
|
||||
private void Awake() => Initialize();
|
||||
|
||||
private void Initialize()
|
||||
{
|
||||
Application.targetFrameRate = DEFAULT_FRAME_RATE;
|
||||
Cursor.lockState = CursorLockMode.Locked;
|
||||
Cursor.visible = false;
|
||||
|
||||
SettingsManager.Initialize();
|
||||
|
||||
soundManager.Initialize();
|
||||
|
||||
|
||||
|
||||
ConfigManager.Initialize();
|
||||
UnityMainThreadDispatcher.Initialize();
|
||||
|
||||
InitializePrefs();
|
||||
InitializeDevices();
|
||||
PaymentSystem.Initialize();
|
||||
|
||||
notificationSystem.Initialize();
|
||||
vitrinaCatcher.Initialize();
|
||||
|
||||
inputSystem.Initialize();
|
||||
prizeSystem.Initialize();
|
||||
videoUtility.Initialize();
|
||||
|
||||
|
||||
#if !UNITY_EDITOR
|
||||
Defender.Instance.StartCoroutine(Defender.Instance.CheckLicenseCoroutine());
|
||||
#endif
|
||||
DifficultyManager.Instance.dummyBots = false;
|
||||
|
||||
//todo: сагрегировать эти объекты
|
||||
avatarController.GetComponent<AvatarEventBus>().Initialize();
|
||||
avatarController.Initialize();
|
||||
|
||||
gameManager.Initialize();
|
||||
board.Init();
|
||||
|
||||
Destroy(gameObject);
|
||||
}
|
||||
|
||||
private static void InitializePrefs()
|
||||
{
|
||||
PlayerPrefs.SetString("Serial", ConfigManager.Config.Serial);
|
||||
|
||||
if (!PlayerPrefs.HasKey("Number")) PlayerPrefs.SetString("Number", "70000000000");
|
||||
if (!PlayerPrefs.HasKey("NumberTech")) PlayerPrefs.SetString("NumberTech", "<Не указано>");
|
||||
}
|
||||
|
||||
private void InitializeDevices()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
//ИНИЦИАЛИЗАЦИЯ УСТРОЙСТВ
|
||||
var devices = ComPortScanner.ScanPorts();
|
||||
|
||||
sb.AppendLine($"Найдено устройств: {devices.Count}");
|
||||
foreach (var device in devices)
|
||||
{
|
||||
sb.Append($"{device.Key} : {device.Value}");
|
||||
}
|
||||
Debug.Log(sb.ToString());
|
||||
|
||||
|
||||
bool controllerFound = false;
|
||||
string vitrinaPort = null;
|
||||
foreach (var device in devices)
|
||||
{
|
||||
//Витрина
|
||||
if (device.Value == ComPortScanner.DeviceType.PrizeShowcase)
|
||||
{
|
||||
vitrinaPort = device.Key;
|
||||
Debug.Log($"нашел витрину на порту, {vitrinaPort}");
|
||||
}
|
||||
else if (device.Value == ComPortScanner.DeviceType.ControllerV1)
|
||||
{
|
||||
if (!controllerFound)
|
||||
{
|
||||
Debug.Log("Нашел периферийник1 открываю.");
|
||||
ComWrapper.Initialize(device.Key, boardVersion: 1);
|
||||
controllerFound = true;
|
||||
}
|
||||
}
|
||||
else if (device.Value == ComPortScanner.DeviceType.ControllerV2)
|
||||
{
|
||||
if (!controllerFound)
|
||||
{
|
||||
Debug.Log("Нашел периферийник2 открываю.");
|
||||
ComWrapper.Initialize(device.Key, boardVersion: 2);
|
||||
controllerFound = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log($"неизвестный тип {device.Key}:{device.Value}");
|
||||
}
|
||||
}
|
||||
|
||||
if (vitrinaPort != null)
|
||||
{
|
||||
Debug.Log($"Витрину открываем (порт {vitrinaPort}");
|
||||
int h = ComNativeWrapper.Serial_Open(vitrinaPort, 115200, 8, 0, 1, 4, 10);
|
||||
if (h > 0) Debug.Log("Открыл");
|
||||
else Debug.Log("Не Открыл");
|
||||
PrizeStandController.Initialize(h, 5);
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/Bootstrap.cs.meta
Normal file
2
Assets/Scripts/Bootstrap.cs.meta
Normal file
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6cd497be51996b446a3834be6fc0d0c1
|
||||
@ -39,7 +39,7 @@ public class BotThinkingState : IState
|
||||
}
|
||||
|
||||
|
||||
int movesMade = GameManager.instance.board.MovesCount;
|
||||
int movesMade = Board.Instance.MovesCount;
|
||||
currentPreset = currentPreset.GetPreset(movesMade);
|
||||
Solver.SetPreset(currentPreset);
|
||||
|
||||
@ -91,7 +91,7 @@ public class BotThinkingState : IState
|
||||
if (animationStarted && Time.time - startAnimTime > animLength)
|
||||
{
|
||||
//ставим фишку в расчитанную колонку (подготовка к следующему состоянию)
|
||||
Vector2 targetPosition = GameManager.instance.board.GetStickedPosition(calculatedColumn);
|
||||
Vector2 targetPosition = Board.Instance.GetStickedPosition(calculatedColumn);
|
||||
targetPosition += Vector2.up * 5;
|
||||
|
||||
GameManager.instance.currentChip.transform.position = targetPosition;
|
||||
@ -111,11 +111,11 @@ public class BotThinkingState : IState
|
||||
bool NeedSuperPreset = OnBossByScore && (IsHardCommonDifficulty || IsUpperCashDifficulty);
|
||||
if (NeedSuperPreset)
|
||||
{
|
||||
calculatedColumn = SolverV2.FindBestMove(gm.board.GridToTeam(), GameManager.instance.currentPlayer);
|
||||
calculatedColumn = SolverV2.FindBestMove(Board.Instance.GridToTeam(), GameManager.instance.currentPlayer);
|
||||
}
|
||||
else
|
||||
{
|
||||
calculatedColumn = Solver.FindBestMove(gm.board.GridToTeam(), GameManager.instance.currentPlayer);
|
||||
calculatedColumn = Solver.FindBestMove(Board.Instance.GridToTeam(), GameManager.instance.currentPlayer);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -18,7 +18,7 @@ public class ChipFallingState : IState
|
||||
chip = gm.currentChip;
|
||||
this.startDelay = startDelay;
|
||||
this.targetColumn = column;
|
||||
this.targetRow = gm.board.GetLowestEmptyRow(column);
|
||||
this.targetRow = Board.Instance.GetLowestEmptyRow(column);
|
||||
|
||||
}
|
||||
|
||||
@ -26,7 +26,7 @@ public class ChipFallingState : IState
|
||||
{
|
||||
gm.StartCoroutine(DelayedEnter(startDelay));
|
||||
chip.SetRandomRotationSpeed();
|
||||
targetPosition = gm.board.GetTargetPosition(targetColumn);
|
||||
targetPosition = Board.Instance.GetTargetPosition(targetColumn);
|
||||
}
|
||||
|
||||
private void PrepareForFalling()
|
||||
@ -52,7 +52,7 @@ public class ChipFallingState : IState
|
||||
|
||||
private void CompleteChipLanding()
|
||||
{
|
||||
GameManager.instance.board.AttachChipToGrid(chip, targetColumn, targetRow);
|
||||
Board.Instance.AttachChipToGrid(chip, targetColumn, targetRow);
|
||||
StateRouter.RouteAfterTurn();
|
||||
}
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@ public class LeaderboardState : IState
|
||||
|
||||
if (In.GetButtonDownAnyPlayer(PlayerAction.left) && In.GetButtonDownAnyPlayer(PlayerAction.right))
|
||||
{
|
||||
GameManager.instance.board.MakeClearField();
|
||||
Board.Instance.MakeClearField();
|
||||
GameManager.instance.stateMachine.ChangeState(new MenuState());
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
public class MenuState : IState
|
||||
{
|
||||
private GameManager gm;
|
||||
private UiManager ui;
|
||||
private HoldTimer promoTimer;
|
||||
private HoldTimer settingsTimer;
|
||||
private MenuSubStates subState;
|
||||
@ -11,8 +10,6 @@
|
||||
gm = GameManager.instance;
|
||||
gm.ResetGameSession();
|
||||
|
||||
ui = gm.menuUi;
|
||||
ui.OpenMenu();
|
||||
subState = MenuSubStates.InputPolling;
|
||||
|
||||
promoTimer = new(180f);
|
||||
@ -37,7 +34,7 @@
|
||||
|
||||
private void InputPolling()//основное состояние(выбор)
|
||||
{
|
||||
if (ui.AnimationInProcess) return;
|
||||
//if (ui.AnimationInProcess) return;
|
||||
|
||||
if (HandleSettings()) return;
|
||||
if (HandleGameStart()) return;
|
||||
@ -111,7 +108,7 @@
|
||||
|
||||
gm.SetMode(mode);
|
||||
gm.timerManager.SetTimersActivity(gm.gameMode);
|
||||
ui.CloseMenu();
|
||||
//ui.CloseMenu();
|
||||
gm.InitVictoryScales();
|
||||
|
||||
subState = MenuSubStates.WaitAnimation;
|
||||
@ -120,7 +117,7 @@
|
||||
|
||||
private void WaitAnimation()
|
||||
{
|
||||
if (ui.AnimationInProcess) return;
|
||||
//if (ui.AnimationInProcess) return;
|
||||
|
||||
CharacterController.ResetState();
|
||||
SoundManager.instance.playChoose();
|
||||
|
||||
@ -18,7 +18,7 @@ public class PositioningState : IState
|
||||
public void enter()
|
||||
{
|
||||
gm = GameManager.instance;
|
||||
board = gm.board;
|
||||
board = Board.Instance;
|
||||
pointer = gm.chipPointer;
|
||||
|
||||
validPositions = board.GetNonFullColumns();
|
||||
@ -78,8 +78,8 @@ public class PositioningState : IState
|
||||
|
||||
columnIndex = validPositions[indexValidArr];
|
||||
|
||||
stickedPosition = gm.board.GetStickedPosition(columnIndex);
|
||||
targetPosition = gm.board.GetTargetPosition(columnIndex);
|
||||
stickedPosition = board.GetStickedPosition(columnIndex);
|
||||
targetPosition = board.GetTargetPosition(columnIndex);
|
||||
|
||||
//перемещение указателей
|
||||
pointer.SetPosition(targetPosition);
|
||||
@ -94,7 +94,7 @@ public class PositioningState : IState
|
||||
bool exitPressed = In.GetButtonDown(ButtonPinMapping.startOnePlayer) || In.GetButtonDown(ButtonPinMapping.startTwoPlayers);
|
||||
if (exitPressed && gm.canReturnToMenu)
|
||||
{
|
||||
gm.board.MakeClearField();
|
||||
board.MakeClearField();
|
||||
PaymentSystem.ReturnCredits(gm.gameMode);
|
||||
GameManager.instance.timerManager.StopAllTimers();
|
||||
GameManager.instance.stateMachine.ChangeState(new MenuState());
|
||||
|
||||
@ -29,9 +29,6 @@ public class ShowWinnerState : IState
|
||||
|
||||
Color orange = new Color(1, 0.537794f, 0, 1f);
|
||||
|
||||
|
||||
TextMeshProUGUI TimerLabel;
|
||||
TextMeshProUGUI ToMenuLabel;
|
||||
float TimeRest = 60;
|
||||
|
||||
bool NeedToPay => !result.Draw;
|
||||
@ -43,7 +40,6 @@ public class ShowWinnerState : IState
|
||||
{
|
||||
this.result = gm.lastResult;
|
||||
subState = ShowWinnerSubstates.PanelFalling;
|
||||
GameManager.instance.ToMenuLabel.gameObject.SetActive(true);
|
||||
}
|
||||
public ShowWinnerState(float timeToExit)
|
||||
{
|
||||
@ -54,21 +50,9 @@ public class ShowWinnerState : IState
|
||||
public void enter()
|
||||
{
|
||||
coinCounter = GameObject.FindAnyObjectByType<CoinCounter>();
|
||||
ToMenuLabel = gm.ToMenuLabel;
|
||||
TimerLabel = gm.TimerLabel;
|
||||
|
||||
//таймер
|
||||
gm.timerManager.StopAllTimers();
|
||||
|
||||
panel = gm.EngamePanel;
|
||||
left = gm.ReplayButton;
|
||||
right = gm.MenuButton;
|
||||
InitPanel();
|
||||
|
||||
if (result.Draw)
|
||||
{
|
||||
gm.DrawVisual.Show();
|
||||
}
|
||||
if (gm.gameMode == GameMode.pvp)
|
||||
{
|
||||
if (!result.Draw)
|
||||
@ -119,10 +103,8 @@ public class ShowWinnerState : IState
|
||||
public void exit()
|
||||
{
|
||||
|
||||
ToMenuLabel.gameObject.SetActive(false);
|
||||
if (result.Draw)
|
||||
{
|
||||
gm.DrawVisual.Hide();
|
||||
return;
|
||||
}
|
||||
//вернуть альфу фишкам
|
||||
@ -172,7 +154,7 @@ public class ShowWinnerState : IState
|
||||
//чистимся и топаем дальше в след раунд
|
||||
|
||||
|
||||
gm.board.MakeClearField();
|
||||
Board.Instance.MakeClearField();
|
||||
|
||||
//Фишка ходит первой если ее не побеждали сегодня еще
|
||||
//текущий бот - последний
|
||||
@ -203,22 +185,6 @@ public class ShowWinnerState : IState
|
||||
subState = ShowWinnerSubstates.PanelRising;
|
||||
}
|
||||
|
||||
|
||||
TimerLabel.text = getTimeText();
|
||||
|
||||
}
|
||||
|
||||
string getTimeText()
|
||||
{
|
||||
string minutes = ((int)(TimeRest / 60)).ToString();
|
||||
string seconds = ((int)(TimeRest % 60)).ToString();
|
||||
|
||||
if (minutes.Length < 2) minutes = "0" + minutes;
|
||||
if (seconds.Length < 2) seconds = "0" + seconds;
|
||||
|
||||
string result = minutes + ":" + seconds;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private void RaisePanel()
|
||||
@ -241,7 +207,7 @@ public class ShowWinnerState : IState
|
||||
{
|
||||
case EndOption.Restart://чистим поле и перезапуск. Меняем игрока
|
||||
AvatarEventBus.Instance.OnNewRoundStarted?.Invoke(gm.currentPlayer);
|
||||
gm.board.MakeClearField();
|
||||
Board.Instance.MakeClearField();
|
||||
|
||||
CellState nextPlayer = gm.currentPlayer == CellState.Player1 ? CellState.Player2 : CellState.Player1;
|
||||
gm.PrepareRound(nextPlayer);
|
||||
@ -249,7 +215,7 @@ public class ShowWinnerState : IState
|
||||
case EndOption.Menu://чистим поле и переходим в меню с параметром чтобы панельки съехались обратно
|
||||
CharacterController.HideCharacter();
|
||||
DualAvatarController.Instance.HideCharacters();
|
||||
gm.board.MakeClearField();
|
||||
Board.Instance.MakeClearField();
|
||||
//GameManager.instance.stateMachine.ChangeState(new MenuState(fromGameplay: true));
|
||||
GameManager.instance.stateMachine.ChangeState(new MenuState());
|
||||
break;
|
||||
@ -331,14 +297,10 @@ public class ShowWinnerState : IState
|
||||
option = EndOption.Restart;
|
||||
left.transform.GetChild(0).GetComponent<Image>().color = orange;
|
||||
right.transform.GetChild(0).GetComponent<Image>().color = empty;
|
||||
|
||||
|
||||
gm.RestartButton.text = NeedToPay ? "Еще раз!" : "Продолжить!";
|
||||
}
|
||||
|
||||
private void DropPanel()
|
||||
{
|
||||
panel = gm.EngamePanel;
|
||||
panel.transform.localPosition = Vector3.MoveTowards(panel.transform.localPosition, targetDownPosition, speedY * Time.deltaTime);
|
||||
speedY += acceleration * Time.deltaTime;
|
||||
|
||||
@ -355,10 +317,11 @@ public class ShowWinnerState : IState
|
||||
|
||||
foreach (var index in result.WinningIndexes)
|
||||
{
|
||||
gm.chipTransforms[index.row, index.col].rotation = Quaternion.identity;
|
||||
var renderer = gm.chipTransforms[index.row, index.col].GetChild(0).GetComponent<SpriteRenderer>();
|
||||
winningChips.Add(renderer);
|
||||
renderer.gameObject.AddComponent<SinRotator>().speed = 8;
|
||||
//todo: разобраться че это я тут закомментил чтобы избавиться от ошибки
|
||||
//gm.chipTransforms[index.row, index.col].rotation = Quaternion.identity;
|
||||
//var renderer = gm.chipTransforms[index.row, index.col].GetChild(0).GetComponent<SpriteRenderer>();
|
||||
//winningChips.Add(renderer);
|
||||
//renderer.gameObject.AddComponent<SinRotator>().speed = 8;
|
||||
}
|
||||
}
|
||||
void BlinkChips()
|
||||
|
||||
@ -149,7 +149,7 @@ public static class StateRouter
|
||||
|
||||
public static IState ToMenu()
|
||||
{
|
||||
gm.board.MakeClearField();
|
||||
Board.Instance.MakeClearField();
|
||||
return new MenuState();
|
||||
}
|
||||
|
||||
|
||||
@ -20,10 +20,6 @@ public class VictoryState : IState
|
||||
gameManager = GameManager.instance;
|
||||
gameManager.timerManager.StopAllTimers();
|
||||
|
||||
ToMenuLabel = gameManager.ToMenuLabel;
|
||||
//ToMenuLabel.text = "До перехода";
|
||||
|
||||
TimerLabel = gameManager.TimerLabel;
|
||||
|
||||
ToMenuLabel.gameObject.SetActive(true);
|
||||
|
||||
@ -35,20 +31,16 @@ public class VictoryState : IState
|
||||
if (gameManager.currentPlayer == CellState.Player1)
|
||||
{
|
||||
scale = gameManager.Player1Scale;
|
||||
gameManager.winPanel.ShowWin(CellState.Player1);
|
||||
}
|
||||
else
|
||||
{
|
||||
scale = gameManager.Player2Scale;
|
||||
gameManager.winPanel.ShowWin(CellState.Player2);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//победили ботов
|
||||
scale = gameManager.botScale;
|
||||
gameManager.winPanel.ShowWin(CellState.Empty);
|
||||
|
||||
nextState = new VictoryVideoState(new EnterNameState());
|
||||
}
|
||||
|
||||
@ -62,7 +54,6 @@ public class VictoryState : IState
|
||||
//выкл анимацию приза
|
||||
scale.SetIdleState();
|
||||
scale.winParticles.Stop();
|
||||
gameManager.winPanel.CloseWin();
|
||||
ToMenuLabel.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
@ -92,7 +83,7 @@ public class VictoryState : IState
|
||||
TimerLabel.text = getTimeText();
|
||||
|
||||
}
|
||||
private string getTimeText()//в утилити бы это вынести
|
||||
private string getTimeText()//todo: в утилити бы это вынести
|
||||
{
|
||||
string minutes = ((int)(TimeRest / 60)).ToString();
|
||||
string seconds = ((int)(TimeRest % 60)).ToString();
|
||||
|
||||
@ -1,13 +1,12 @@
|
||||
using PrizeSystem;
|
||||
using System.Collections;
|
||||
using System.Text;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
public enum GameMode { pve, pvp }
|
||||
public class GameManager : MonoBehaviour
|
||||
{
|
||||
private const int DEFAULT_FRAME_RATE = 60;
|
||||
|
||||
public int Rows = 7, Cols = 7;
|
||||
public PlayerStatsService StatsService;
|
||||
|
||||
@ -15,7 +14,7 @@ public class GameManager : MonoBehaviour
|
||||
|
||||
[Header("General")]
|
||||
public GameStateMachine stateMachine;
|
||||
public Board board;
|
||||
|
||||
public static GameManager instance;
|
||||
public GameObject AdminPanel, NumberPanel;
|
||||
public TimerManager timerManager;
|
||||
@ -28,8 +27,6 @@ public class GameManager : MonoBehaviour
|
||||
public Transform
|
||||
boardTransform,
|
||||
noPrizeLabel;
|
||||
public UiManager menuUi;
|
||||
|
||||
|
||||
[Header("Scores")]
|
||||
public int player1score = 0, player2score = 0, vsBotScore = 0;
|
||||
@ -51,24 +48,11 @@ public class GameManager : MonoBehaviour
|
||||
public Chip chipPrefab;
|
||||
[HideInInspector] public Chip currentChip;
|
||||
|
||||
public RectTransform EngamePanel;
|
||||
public RectTransform smallPrizesOut;
|
||||
public Image ReplayButton, MenuButton;
|
||||
public DrawVisual DrawVisual;
|
||||
public TextMeshProUGUI RestartButton;
|
||||
|
||||
public TextMeshProUGUI TimerLabel; //до выхода в меню..
|
||||
public TextMeshProUGUI ToMenuLabel; //это же
|
||||
|
||||
public WinPanel winPanel;
|
||||
|
||||
[HideInInspector] public CellState currentPlayer = CellState.Player2;
|
||||
|
||||
|
||||
public bool canReturnToMenu = false; //todo: разобраться нафига эта переменная
|
||||
|
||||
public Transform[,] chipTransforms;
|
||||
|
||||
// Кешированные компоненты для избежания GetComponent в DrawAnimation
|
||||
[Header("Панели ввода")]
|
||||
public TextInput nameInput;
|
||||
@ -83,7 +67,7 @@ public class GameManager : MonoBehaviour
|
||||
public Leaderboard leaderboard;
|
||||
public GameObject CharactersConfigurator;
|
||||
|
||||
public DualAvatarController avatarController;
|
||||
|
||||
|
||||
public PvpPointer pvpPointer;
|
||||
public MovesAndTimeCounter movesAndTimeCounter;
|
||||
@ -91,145 +75,30 @@ public class GameManager : MonoBehaviour
|
||||
public GameObject setPasswordPanel;
|
||||
public EnterPasswordPanel enterPasswordPanel;
|
||||
|
||||
public SoundManager soundManager;
|
||||
|
||||
|
||||
public VitrinaPanel vitrinaPanel;
|
||||
public QrPanel qrPanel;
|
||||
|
||||
public VitrinaCatcher vitrinaCatcher;
|
||||
|
||||
public TakeOrRiskPanel takeOrRiskPanel;
|
||||
|
||||
void Awake()
|
||||
public void Initialize()
|
||||
{
|
||||
Cursor.lockState = CursorLockMode.Locked;
|
||||
Cursor.visible = false;
|
||||
soundManager.Initialize();
|
||||
if (instance == null)
|
||||
{
|
||||
Application.targetFrameRate = DEFAULT_FRAME_RATE;
|
||||
|
||||
instance = this;
|
||||
board.Init(Cols, Rows);
|
||||
chipTransforms = new Transform[Rows, Cols];
|
||||
}
|
||||
|
||||
ConfigManager.Initialize();
|
||||
UnityMainThreadDispatcher.Initialize();
|
||||
|
||||
InitializePrefs();
|
||||
|
||||
SettingsManager.Initialize();
|
||||
|
||||
InitializeDevices();
|
||||
|
||||
|
||||
|
||||
PaymentSystem.Initialize();
|
||||
ComWrapper.PaymentReceived += ProcessDifficultyCounter;
|
||||
SettingsManager.OnSettingsChanged.AddListener(ProcessDifficultyCounter);
|
||||
|
||||
GetComponent<NotificationSystem>().Initialize();
|
||||
|
||||
|
||||
vitrinaCatcher.Initialize();
|
||||
|
||||
ProcessDifficultyCounter();
|
||||
SettingsManager.OnSettingsChanged.AddListener(ProcessDifficultyCounter);
|
||||
|
||||
GetComponent<In>().Initialize();
|
||||
GetComponent<PrizeSystemManager>().Initialize();
|
||||
GetComponent<VideoUtility>().Initialize();
|
||||
StatsService = new();
|
||||
StatsService.Initialize();
|
||||
|
||||
#if !UNITY_EDITOR
|
||||
Defender.Instance.StartCoroutine(Defender.Instance.CheckLicenseCoroutine());
|
||||
#endif
|
||||
DifficultyManager.Instance.dummyBots = false;
|
||||
|
||||
StartCoroutine(AddBotRecordEvery2Days());// добавлять каждые 2 дня запись
|
||||
|
||||
avatarController.GetComponent<AvatarEventBus>().Initialize();
|
||||
avatarController.Initialize();
|
||||
|
||||
}
|
||||
|
||||
private void InitializeDevices()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
//ИНИЦИАЛИЗАЦИЯ УСТРОЙСТВ
|
||||
var devices = ComPortScanner.ScanPorts();
|
||||
|
||||
sb.AppendLine($"Найдено устройств: {devices.Count}");
|
||||
foreach (var device in devices)
|
||||
{
|
||||
sb.Append($"{device.Key} : {device.Value}");
|
||||
}
|
||||
Debug.Log(sb.ToString());
|
||||
|
||||
|
||||
bool controllerFound = false;
|
||||
string vitrinaPort = null;
|
||||
PrizeStandController.InitializationComplete += PrizeStandController_InitializationComplete;
|
||||
foreach (var device in devices)
|
||||
{
|
||||
//Витрина
|
||||
if (device.Value == ComPortScanner.DeviceType.PrizeShowcase)
|
||||
{
|
||||
vitrinaPort = device.Key;
|
||||
Debug.Log($"нашел витрину на порту, {vitrinaPort}");
|
||||
}
|
||||
else if (device.Value == ComPortScanner.DeviceType.ControllerV1)
|
||||
{
|
||||
if (!controllerFound)
|
||||
{
|
||||
Debug.Log("Нашел периферийник1 открываю.");
|
||||
ComWrapper.Initialize(device.Key, boardVersion: 1);
|
||||
controllerFound = true;
|
||||
}
|
||||
}
|
||||
else if (device.Value == ComPortScanner.DeviceType.ControllerV2)
|
||||
{
|
||||
if (!controllerFound)
|
||||
{
|
||||
Debug.Log("Нашел периферийник2 открываю.");
|
||||
ComWrapper.Initialize(device.Key, boardVersion: 2);
|
||||
controllerFound = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log($"неизвестный тип {device.Key}:{device.Value}");
|
||||
}
|
||||
}
|
||||
|
||||
if (vitrinaPort != null)
|
||||
{
|
||||
Debug.Log($"Витрину открываем (порт {vitrinaPort}");
|
||||
int h = ComNativeWrapper.Serial_Open(vitrinaPort, 115200, 8, 0, 1, 4, 10);
|
||||
if (h > 0) Debug.Log("Открыл");
|
||||
else Debug.Log("Не Открыл");
|
||||
PrizeStandController.Initialize(h, 5);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnApplicationQuit()
|
||||
{
|
||||
ComNativeWrapper.Serial_CloseAll();
|
||||
}
|
||||
|
||||
private void PrizeStandController_InitializationComplete(bool arg1, string arg2)
|
||||
{
|
||||
Debug.Log($"Инициализация витрины: {arg1} : {arg2}");
|
||||
}
|
||||
|
||||
private static void InitializePrefs()
|
||||
{
|
||||
PlayerPrefs.SetString("Serial", ConfigManager.Config.Serial);
|
||||
|
||||
if (!PlayerPrefs.HasKey("Number")) PlayerPrefs.SetString("Number", "70000000000");
|
||||
if (!PlayerPrefs.HasKey("NumberTech")) PlayerPrefs.SetString("NumberTech", "<Не указано>");
|
||||
}
|
||||
private void OnApplicationQuit() => ComNativeWrapper.Serial_CloseAll();
|
||||
|
||||
private void Start()
|
||||
{
|
||||
@ -269,10 +138,7 @@ public class GameManager : MonoBehaviour
|
||||
if (currentPlayer == CellState.Player2)
|
||||
currentChip.GetComponentInChildren<SpriteRenderer>().sprite = CharacterController.CurrentChipImage;
|
||||
}
|
||||
public void setChipTransformToArray(int row, int col, Transform entryTransform)
|
||||
{
|
||||
chipTransforms[row, col] = entryTransform;
|
||||
}
|
||||
|
||||
|
||||
public void SwitchPlayer()
|
||||
{
|
||||
|
||||
@ -2,61 +2,66 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
[RequireComponent(typeof(BoardFitter))]
|
||||
public class Board : MonoBehaviour
|
||||
{
|
||||
//визуал
|
||||
[SerializeField] Transform topLeftCell;
|
||||
[SerializeField] ChipPointer pointer;
|
||||
[SerializeField] Vector2 cellOffset = new(1.444f, 1.48f);
|
||||
[SerializeField] float stickedY = 5f;
|
||||
[SerializeField] private ChipPointer pointer;
|
||||
|
||||
private BoardFitter fitter;
|
||||
private BoardConfiguration config;
|
||||
|
||||
//состояние
|
||||
public int columns;
|
||||
public int rows;
|
||||
public Chip[,] grid;
|
||||
public static Board Instance { get; private set; }
|
||||
public Chip[,] Grid { get; private set; }
|
||||
public int Columns { get; private set; }
|
||||
public int Rows { get; private set; }
|
||||
public int MovesCount { get; private set; }
|
||||
|
||||
public int MovesCount => GetMovesCount();
|
||||
|
||||
public void Init(int columns, int rows)
|
||||
public void Init()
|
||||
{
|
||||
this.columns = columns;
|
||||
this.rows = rows;
|
||||
if (TryGetComponent(out BoardFitter fitter))
|
||||
this.fitter = fitter;
|
||||
else
|
||||
throw new InvalidOperationException("Не найден fitter на доске");
|
||||
|
||||
MakeClearField();
|
||||
Instance = this;
|
||||
ApplySettings();
|
||||
SettingsManager.OnSettingsChanged.AddListener(ApplySettings);
|
||||
}
|
||||
|
||||
public Vector2 GetStickedPosition(int column) => new Vector2(GetXPosition(column), stickedY);
|
||||
public Vector2 GetStickedPosition(int column) => new Vector2(GetXPosition(column), config.stickedY);
|
||||
|
||||
public Vector2 GetTargetPosition(int column) => new Vector2(GetXPosition(column), GetYPosition(column));
|
||||
|
||||
public void MakeClearField()
|
||||
{
|
||||
PerformClear();
|
||||
grid = new Chip[columns, rows];
|
||||
PerformChipsClear();
|
||||
MovesCount = 0;
|
||||
Grid = new Chip[Columns, Rows];
|
||||
}
|
||||
|
||||
public bool CanDrop(int column) => grid[column, 0] == null;
|
||||
public bool CanDrop(int column) => Grid[column, 0] == null;
|
||||
|
||||
public void AttachChipToGrid(Chip chip, int column, int row)
|
||||
{
|
||||
if (column < 0 || column >= columns)
|
||||
if (column < 0 || column >= Columns)
|
||||
{
|
||||
Debug.LogError($"Попытка поставить фишку в колонку {column}. Колонок: {columns}");
|
||||
Debug.LogError($"Попытка поставить фишку в колонку {column}. Колонок: {Columns}");
|
||||
return;
|
||||
}
|
||||
if (row < 0 || row >= rows)
|
||||
if (row < 0 || row >= Rows)
|
||||
{
|
||||
Debug.LogError($"Попытка поставить фишку в ряд {row}. Рядов: {rows}");
|
||||
Debug.LogError($"Попытка поставить фишку в ряд {row}. Рядов: {Rows}");
|
||||
return;
|
||||
}
|
||||
|
||||
grid[column, row] = chip;
|
||||
Grid[column, row] = chip;
|
||||
MovesCount++;
|
||||
}
|
||||
|
||||
public int[] GetNonFullColumns()
|
||||
{
|
||||
List<int> temp = new();
|
||||
for (int column = 0; column < columns; column++)
|
||||
for (int column = 0; column < Columns; column++)
|
||||
if (CanDrop(column))
|
||||
temp.Add(column);
|
||||
return temp.ToArray();
|
||||
@ -64,51 +69,60 @@ public class Board : MonoBehaviour
|
||||
|
||||
public int GetLowestEmptyRow(int colIndex)
|
||||
{
|
||||
if (colIndex < 0 || colIndex >= columns)
|
||||
throw new ArgumentOutOfRangeException($"Попытка проверить колонку {colIndex}. Колонок: {columns}");
|
||||
if (colIndex < 0 || colIndex >= Columns)
|
||||
throw new ArgumentOutOfRangeException($"Попытка проверить колонку {colIndex}. Колонок: {Columns}");
|
||||
|
||||
for (int row = rows - 1; row >= 0; row--)
|
||||
if (grid[colIndex, row] == null)
|
||||
for (int row = Rows - 1; row >= 0; row--)
|
||||
if (Grid[colIndex, row] == null)
|
||||
return row;
|
||||
return -1;
|
||||
}
|
||||
|
||||
private float GetXPosition(int column) => topLeftCell.position.x + cellOffset.x * column;
|
||||
|
||||
private float GetYPosition(int column) => topLeftCell.position.y - GetLowestEmptyRow(column) * cellOffset.y;
|
||||
|
||||
|
||||
private void PerformClear()
|
||||
{
|
||||
SoundManager.instance.playExplosion();
|
||||
GameManager.instance.currentChip?.RemoveFromField();
|
||||
if (grid == null) return;
|
||||
|
||||
foreach (Chip chip in grid)
|
||||
chip?.RemoveFromField();
|
||||
}
|
||||
|
||||
private int GetMovesCount()
|
||||
{
|
||||
if (grid == null) return 0;
|
||||
int count = 0;
|
||||
foreach (Chip chip in grid)
|
||||
if (chip != null) count++;
|
||||
return count;
|
||||
}
|
||||
|
||||
public CellState[,] GridToTeam()
|
||||
{
|
||||
CellState[,] res = new CellState[columns, rows];
|
||||
for (int col = 0; col < columns; col++)
|
||||
CellState[,] res = new CellState[Columns, Rows];
|
||||
for (int col = 0; col < Columns; col++)
|
||||
{
|
||||
for (int row = 0; row < rows; row++)
|
||||
for (int row = 0; row < Rows; row++)
|
||||
{
|
||||
var chip = grid[col, row];
|
||||
var chip = Grid[col, row];
|
||||
if (chip == null) res[col, row] = CellState.Empty;
|
||||
else res[col, row] = chip.Team;
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
private float GetXPosition(int column) => config.topLeft.x + config.cellOffset.x * column;
|
||||
|
||||
private float GetYPosition(int column) => config.topLeft.y - GetLowestEmptyRow(column) * config.cellOffset.y;
|
||||
|
||||
private void PerformChipsClear()
|
||||
{
|
||||
SoundManager.instance.playExplosion();
|
||||
GameManager.instance.currentChip?.RemoveFromField();
|
||||
if (Grid == null) return;
|
||||
|
||||
foreach (Chip chip in Grid)
|
||||
chip?.RemoveFromField();
|
||||
}
|
||||
|
||||
//todo: реализовать
|
||||
private void ApplySettings()
|
||||
{
|
||||
int columns = SettingsManager.GetInt("", 6);
|
||||
int rows = SettingsManager.GetInt("", 5);
|
||||
RebuildBoard(columns, rows);
|
||||
}
|
||||
|
||||
private void RebuildBoard(int columns, int rows)
|
||||
{
|
||||
Columns = columns;
|
||||
Rows = rows;
|
||||
|
||||
fitter.FitBoard(columns, rows);
|
||||
config = fitter.GetConfiguration();
|
||||
|
||||
MakeClearField();
|
||||
}
|
||||
}
|
||||
17
Assets/Scripts/Gameplay/BoardConfiguration.cs
Normal file
17
Assets/Scripts/Gameplay/BoardConfiguration.cs
Normal file
@ -0,0 +1,17 @@
|
||||
using UnityEngine;
|
||||
|
||||
public struct BoardConfiguration
|
||||
{
|
||||
public readonly Vector2 topLeft;
|
||||
public readonly Vector2 bottomRight;
|
||||
public readonly Vector2 cellOffset;
|
||||
public readonly float stickedY;
|
||||
|
||||
public BoardConfiguration(Vector2 topLeft, Vector2 bottomRight, Vector2 cellOffset, float stickedY)
|
||||
{
|
||||
this.topLeft = topLeft;
|
||||
this.bottomRight = bottomRight;
|
||||
this.cellOffset = cellOffset;
|
||||
this.stickedY = stickedY;
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/Gameplay/BoardConfiguration.cs.meta
Normal file
2
Assets/Scripts/Gameplay/BoardConfiguration.cs.meta
Normal file
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f1d85fce0545e3b418e2c65617c61de2
|
||||
99
Assets/Scripts/Gameplay/BoardFitter.cs
Normal file
99
Assets/Scripts/Gameplay/BoardFitter.cs
Normal file
@ -0,0 +1,99 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class BoardFitter : MonoBehaviour
|
||||
{
|
||||
[Header("Рамка")]
|
||||
[SerializeField] private SpriteRenderer boardRenderer;
|
||||
|
||||
[Header("Задний фон")]
|
||||
[SerializeField] private SpriteRenderer backgroundRenderer;
|
||||
[SerializeField] private float bgHorizontalPadding = 0.78f; //лево+право
|
||||
[SerializeField] private float bgVerticalPadding = 0.68f; //верх+низ
|
||||
|
||||
[Header("Ячейки")]
|
||||
[SerializeField] private GameObject cellPrefab;
|
||||
[SerializeField] private Transform cellsRoot;
|
||||
[SerializeField] private float cellScale = 1;
|
||||
[SerializeField] private float cellOffset = 0.1f;
|
||||
[SerializeField] private float cellGroupPadding = 3f;//2 стороны сразу
|
||||
private List<GameObject> cells;
|
||||
|
||||
[Header("Подготовленная позциця")]
|
||||
[SerializeField] private float stickedOffset = 2;
|
||||
|
||||
public BoardConfiguration GetConfiguration()
|
||||
{
|
||||
if (cells == null)
|
||||
throw new System.NullReferenceException($"Объект не инициализирован {this}");
|
||||
|
||||
Vector3 topLeftCellPosition = cells[0].transform.position;
|
||||
Vector3 bottomRightCellPosition = cells[^1].transform.position;
|
||||
Vector2 offset = new Vector2(cellScale + cellOffset, -(cellScale + cellOffset));
|
||||
|
||||
return new BoardConfiguration(topLeft: topLeftCellPosition,
|
||||
bottomRight: bottomRightCellPosition,
|
||||
cellOffset: offset,
|
||||
stickedY: topLeftCellPosition.y + stickedOffset);
|
||||
}
|
||||
|
||||
public void FitBoard(int columns, int rows)
|
||||
{
|
||||
columns = Mathf.Clamp(columns, 4, 8);
|
||||
rows = Mathf.Clamp(rows, 4, 8);
|
||||
|
||||
ClearCells();
|
||||
GenerateCells(columns, rows);
|
||||
|
||||
float groupWidth = (cellScale + cellOffset) * columns;
|
||||
float groupHeight = (cellScale + cellOffset) * rows;
|
||||
|
||||
FitFrame(groupWidth, groupHeight);
|
||||
FitCellsRoot(groupWidth, groupHeight);
|
||||
}
|
||||
|
||||
private void FitCellsRoot(float groupWidth, float groupHeight)
|
||||
{
|
||||
float rootX = -groupWidth / 2;
|
||||
float rootY = (groupHeight + boardRenderer.size.y - cellScale) / 2;
|
||||
cellsRoot.localPosition = new Vector3(rootX, rootY, 0);
|
||||
}
|
||||
|
||||
private void FitFrame(float groupWidth, float groupHeight)
|
||||
{
|
||||
boardRenderer.size = new Vector2(groupWidth + cellGroupPadding, groupHeight + cellGroupPadding);
|
||||
backgroundRenderer.transform.localScale = new Vector3(boardRenderer.size.x - bgHorizontalPadding,
|
||||
boardRenderer.size.y - bgVerticalPadding,
|
||||
0);
|
||||
}
|
||||
|
||||
private void GenerateCells(int columns, int rows)
|
||||
{
|
||||
cells = new List<GameObject>();
|
||||
for (int row = 0; row < rows; row++)
|
||||
{
|
||||
for (int column = 0; column < columns; column++)
|
||||
{
|
||||
var cellGO = Instantiate(cellPrefab, cellsRoot);
|
||||
var cell = cellGO.transform;
|
||||
|
||||
cell.localScale = new Vector3(cellScale, cellScale, 1);
|
||||
|
||||
float x = column * (cellScale + cellOffset) + cellScale / 2;
|
||||
float y = -row * (cellScale + cellOffset) - cellScale / 2;
|
||||
cell.localPosition = new Vector3(x, y, 0);
|
||||
|
||||
cells.Add(cellGO);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ClearCells()
|
||||
{
|
||||
for (int i = cellsRoot.childCount - 1; i >= 0; i--)
|
||||
{
|
||||
var cell = cellsRoot.GetChild(i).gameObject;
|
||||
Destroy(cell);
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/Gameplay/BoardFitter.cs.meta
Normal file
2
Assets/Scripts/Gameplay/BoardFitter.cs.meta
Normal file
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f6824ca19912f0a46a9e394ca3b08b14
|
||||
@ -8,9 +8,9 @@ public enum CellState
|
||||
public static class FieldChecker
|
||||
{
|
||||
static GameManager gm => GameManager.instance;
|
||||
public static Chip[,] FieldArray => gm.board.grid;
|
||||
public static int Height => gm.board.rows;
|
||||
public static int Width => gm.board.columns;
|
||||
public static Chip[,] FieldArray => Board.Instance.Grid;
|
||||
public static int Height => Board.Instance.Rows;
|
||||
public static int Width => Board.Instance.Columns;
|
||||
public static int TargetLineLength = 4;
|
||||
|
||||
public static CheckResult Check(CellState lastPlayer)
|
||||
@ -190,7 +190,7 @@ public static class FieldChecker
|
||||
{
|
||||
for (int col = 0; col < Width; col++)
|
||||
{
|
||||
if (gm.board.GetLowestEmptyRow(col) != -1) return false;
|
||||
if (Board.Instance.GetLowestEmptyRow(col) != -1) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -13,7 +13,6 @@ public class MenuLayoutController : MonoBehaviour
|
||||
panel.Disable(0);
|
||||
}
|
||||
panels[panelIndex].Enable(0, 0);
|
||||
|
||||
}
|
||||
|
||||
private void Update()
|
||||
@ -32,7 +31,6 @@ public class MenuLayoutController : MonoBehaviour
|
||||
|
||||
panelIndex = newPanelIndex;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static int GetDirection()
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user