Merge branch 'main' into DO-33-오목-룰-적용하기
This commit is contained in:
commit
1e3af84ff6
8
Assets/KSH.meta
Normal file
8
Assets/KSH.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: d652b2a2f29c0c541983b529f66a5169
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
1641
Assets/KSH/AITestScene.unity
Normal file
1641
Assets/KSH/AITestScene.unity
Normal file
File diff suppressed because it is too large
Load Diff
7
Assets/KSH/AITestScene.unity.meta
Normal file
7
Assets/KSH/AITestScene.unity.meta
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: e200b684d5479a643aa06e6361c430c9
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
8
Assets/LIN.meta
Normal file
8
Assets/LIN.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 1de536bf9c2072f4e832669ddfde2130
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
8
Assets/LIN/Prefabs.meta
Normal file
8
Assets/LIN/Prefabs.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: a32ea44d9addfc64eb23fc4796ccec5f
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
2095
Assets/LIN/Prefabs/Main Panel Test LIN.prefab
Normal file
2095
Assets/LIN/Prefabs/Main Panel Test LIN.prefab
Normal file
File diff suppressed because it is too large
Load Diff
7
Assets/LIN/Prefabs/Main Panel Test LIN.prefab.meta
Normal file
7
Assets/LIN/Prefabs/Main Panel Test LIN.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 6f42a47846f21b044b1cda32a9516609
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
8
Assets/LIN/Scenes.meta
Normal file
8
Assets/LIN/Scenes.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 271f64b271659a94f87a32dcc75daee5
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
18564
Assets/LIN/Scenes/GameCopyTestLIN.unity
Normal file
18564
Assets/LIN/Scenes/GameCopyTestLIN.unity
Normal file
File diff suppressed because it is too large
Load Diff
7
Assets/LIN/Scenes/GameCopyTestLIN.unity.meta
Normal file
7
Assets/LIN/Scenes/GameCopyTestLIN.unity.meta
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 88b1093ef5e1f3b4db329a67d13e8920
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
290
Assets/LIN/Scenes/GameTestLIN.unity
Normal file
290
Assets/LIN/Scenes/GameTestLIN.unity
Normal file
@ -0,0 +1,290 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!29 &1
|
||||||
|
OcclusionCullingSettings:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
m_OcclusionBakeSettings:
|
||||||
|
smallestOccluder: 5
|
||||||
|
smallestHole: 0.25
|
||||||
|
backfaceThreshold: 100
|
||||||
|
m_SceneGUID: 00000000000000000000000000000000
|
||||||
|
m_OcclusionCullingData: {fileID: 0}
|
||||||
|
--- !u!104 &2
|
||||||
|
RenderSettings:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 9
|
||||||
|
m_Fog: 0
|
||||||
|
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||||
|
m_FogMode: 3
|
||||||
|
m_FogDensity: 0.01
|
||||||
|
m_LinearFogStart: 0
|
||||||
|
m_LinearFogEnd: 300
|
||||||
|
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||||
|
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||||
|
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||||
|
m_AmbientIntensity: 1
|
||||||
|
m_AmbientMode: 3
|
||||||
|
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||||
|
m_SkyboxMaterial: {fileID: 0}
|
||||||
|
m_HaloStrength: 0.5
|
||||||
|
m_FlareStrength: 1
|
||||||
|
m_FlareFadeSpeed: 3
|
||||||
|
m_HaloTexture: {fileID: 0}
|
||||||
|
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
m_DefaultReflectionMode: 0
|
||||||
|
m_DefaultReflectionResolution: 128
|
||||||
|
m_ReflectionBounces: 1
|
||||||
|
m_ReflectionIntensity: 1
|
||||||
|
m_CustomReflection: {fileID: 0}
|
||||||
|
m_Sun: {fileID: 0}
|
||||||
|
m_UseRadianceAmbientProbe: 0
|
||||||
|
--- !u!157 &3
|
||||||
|
LightmapSettings:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 12
|
||||||
|
m_GIWorkflowMode: 1
|
||||||
|
m_GISettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_BounceScale: 1
|
||||||
|
m_IndirectOutputScale: 1
|
||||||
|
m_AlbedoBoost: 1
|
||||||
|
m_EnvironmentLightingMode: 0
|
||||||
|
m_EnableBakedLightmaps: 0
|
||||||
|
m_EnableRealtimeLightmaps: 0
|
||||||
|
m_LightmapEditorSettings:
|
||||||
|
serializedVersion: 12
|
||||||
|
m_Resolution: 2
|
||||||
|
m_BakeResolution: 40
|
||||||
|
m_AtlasSize: 1024
|
||||||
|
m_AO: 0
|
||||||
|
m_AOMaxDistance: 1
|
||||||
|
m_CompAOExponent: 1
|
||||||
|
m_CompAOExponentDirect: 0
|
||||||
|
m_ExtractAmbientOcclusion: 0
|
||||||
|
m_Padding: 2
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_LightmapsBakeMode: 1
|
||||||
|
m_TextureCompression: 1
|
||||||
|
m_FinalGather: 0
|
||||||
|
m_FinalGatherFiltering: 1
|
||||||
|
m_FinalGatherRayCount: 256
|
||||||
|
m_ReflectionCompression: 2
|
||||||
|
m_MixedBakeMode: 2
|
||||||
|
m_BakeBackend: 1
|
||||||
|
m_PVRSampling: 1
|
||||||
|
m_PVRDirectSampleCount: 32
|
||||||
|
m_PVRSampleCount: 512
|
||||||
|
m_PVRBounces: 2
|
||||||
|
m_PVREnvironmentSampleCount: 256
|
||||||
|
m_PVREnvironmentReferencePointCount: 2048
|
||||||
|
m_PVRFilteringMode: 1
|
||||||
|
m_PVRDenoiserTypeDirect: 1
|
||||||
|
m_PVRDenoiserTypeIndirect: 1
|
||||||
|
m_PVRDenoiserTypeAO: 1
|
||||||
|
m_PVRFilterTypeDirect: 0
|
||||||
|
m_PVRFilterTypeIndirect: 0
|
||||||
|
m_PVRFilterTypeAO: 0
|
||||||
|
m_PVREnvironmentMIS: 1
|
||||||
|
m_PVRCulling: 1
|
||||||
|
m_PVRFilteringGaussRadiusDirect: 1
|
||||||
|
m_PVRFilteringGaussRadiusIndirect: 5
|
||||||
|
m_PVRFilteringGaussRadiusAO: 2
|
||||||
|
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||||
|
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||||
|
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||||
|
m_ExportTrainingData: 0
|
||||||
|
m_TrainingDataDestination: TrainingData
|
||||||
|
m_LightProbeSampleCountMultiplier: 4
|
||||||
|
m_LightingDataAsset: {fileID: 0}
|
||||||
|
m_LightingSettings: {fileID: 0}
|
||||||
|
--- !u!196 &4
|
||||||
|
NavMeshSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_BuildSettings:
|
||||||
|
serializedVersion: 3
|
||||||
|
agentTypeID: 0
|
||||||
|
agentRadius: 0.5
|
||||||
|
agentHeight: 2
|
||||||
|
agentSlope: 45
|
||||||
|
agentClimb: 0.4
|
||||||
|
ledgeDropHeight: 0
|
||||||
|
maxJumpAcrossDistance: 0
|
||||||
|
minRegionArea: 2
|
||||||
|
manualCellSize: 0
|
||||||
|
cellSize: 0.16666667
|
||||||
|
manualTileSize: 0
|
||||||
|
tileSize: 256
|
||||||
|
buildHeightMesh: 0
|
||||||
|
maxJobWorkers: 0
|
||||||
|
preserveTilesOutsideBounds: 0
|
||||||
|
debug:
|
||||||
|
m_Flags: 0
|
||||||
|
m_NavMeshData: {fileID: 0}
|
||||||
|
--- !u!1 &1100315178
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1100315181}
|
||||||
|
- component: {fileID: 1100315180}
|
||||||
|
- component: {fileID: 1100315179}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: EventSystem
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!114 &1100315179
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1100315178}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_SendPointerHoverToParent: 1
|
||||||
|
m_HorizontalAxis: Horizontal
|
||||||
|
m_VerticalAxis: Vertical
|
||||||
|
m_SubmitButton: Submit
|
||||||
|
m_CancelButton: Cancel
|
||||||
|
m_InputActionsPerSecond: 10
|
||||||
|
m_RepeatDelay: 0.5
|
||||||
|
m_ForceModuleActive: 0
|
||||||
|
--- !u!114 &1100315180
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1100315178}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_FirstSelected: {fileID: 0}
|
||||||
|
m_sendNavigationEvents: 1
|
||||||
|
m_DragThreshold: 10
|
||||||
|
--- !u!4 &1100315181
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1100315178}
|
||||||
|
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: 0}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1 &1603784401
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1603784404}
|
||||||
|
- component: {fileID: 1603784403}
|
||||||
|
- component: {fileID: 1603784402}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Main Camera
|
||||||
|
m_TagString: MainCamera
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!81 &1603784402
|
||||||
|
AudioListener:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1603784401}
|
||||||
|
m_Enabled: 1
|
||||||
|
--- !u!20 &1603784403
|
||||||
|
Camera:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1603784401}
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 2
|
||||||
|
m_ClearFlags: 1
|
||||||
|
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||||
|
m_projectionMatrixMode: 1
|
||||||
|
m_GateFitMode: 2
|
||||||
|
m_FOVAxisMode: 0
|
||||||
|
m_Iso: 200
|
||||||
|
m_ShutterSpeed: 0.005
|
||||||
|
m_Aperture: 16
|
||||||
|
m_FocusDistance: 10
|
||||||
|
m_FocalLength: 50
|
||||||
|
m_BladeCount: 5
|
||||||
|
m_Curvature: {x: 2, y: 11}
|
||||||
|
m_BarrelClipping: 0.25
|
||||||
|
m_Anamorphism: 0
|
||||||
|
m_SensorSize: {x: 36, y: 24}
|
||||||
|
m_LensShift: {x: 0, y: 0}
|
||||||
|
m_NormalizedViewPortRect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 0
|
||||||
|
y: 0
|
||||||
|
width: 1
|
||||||
|
height: 1
|
||||||
|
near clip plane: 0.3
|
||||||
|
far clip plane: 1000
|
||||||
|
field of view: 60
|
||||||
|
orthographic: 1
|
||||||
|
orthographic size: 5
|
||||||
|
m_Depth: -1
|
||||||
|
m_CullingMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
m_RenderingPath: -1
|
||||||
|
m_TargetTexture: {fileID: 0}
|
||||||
|
m_TargetDisplay: 0
|
||||||
|
m_TargetEye: 3
|
||||||
|
m_HDR: 1
|
||||||
|
m_AllowMSAA: 1
|
||||||
|
m_AllowDynamicResolution: 0
|
||||||
|
m_ForceIntoRT: 0
|
||||||
|
m_OcclusionCulling: 1
|
||||||
|
m_StereoConvergence: 10
|
||||||
|
m_StereoSeparation: 0.022
|
||||||
|
--- !u!4 &1603784404
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1603784401}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: -10}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1660057539 &9223372036854775807
|
||||||
|
SceneRoots:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_Roots:
|
||||||
|
- {fileID: 1603784404}
|
||||||
|
- {fileID: 1100315181}
|
7
Assets/LIN/Scenes/GameTestLIN.unity.meta
Normal file
7
Assets/LIN/Scenes/GameTestLIN.unity.meta
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 3f72acd812737e54da767a0a48b4a60d
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
632
Assets/LIN/Scenes/MainTestLIN.unity
Normal file
632
Assets/LIN/Scenes/MainTestLIN.unity
Normal file
@ -0,0 +1,632 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!29 &1
|
||||||
|
OcclusionCullingSettings:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
m_OcclusionBakeSettings:
|
||||||
|
smallestOccluder: 5
|
||||||
|
smallestHole: 0.25
|
||||||
|
backfaceThreshold: 100
|
||||||
|
m_SceneGUID: 00000000000000000000000000000000
|
||||||
|
m_OcclusionCullingData: {fileID: 0}
|
||||||
|
--- !u!104 &2
|
||||||
|
RenderSettings:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 9
|
||||||
|
m_Fog: 0
|
||||||
|
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||||
|
m_FogMode: 3
|
||||||
|
m_FogDensity: 0.01
|
||||||
|
m_LinearFogStart: 0
|
||||||
|
m_LinearFogEnd: 300
|
||||||
|
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||||
|
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||||
|
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||||
|
m_AmbientIntensity: 1
|
||||||
|
m_AmbientMode: 3
|
||||||
|
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||||
|
m_SkyboxMaterial: {fileID: 0}
|
||||||
|
m_HaloStrength: 0.5
|
||||||
|
m_FlareStrength: 1
|
||||||
|
m_FlareFadeSpeed: 3
|
||||||
|
m_HaloTexture: {fileID: 0}
|
||||||
|
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
m_DefaultReflectionMode: 0
|
||||||
|
m_DefaultReflectionResolution: 128
|
||||||
|
m_ReflectionBounces: 1
|
||||||
|
m_ReflectionIntensity: 1
|
||||||
|
m_CustomReflection: {fileID: 0}
|
||||||
|
m_Sun: {fileID: 0}
|
||||||
|
m_UseRadianceAmbientProbe: 0
|
||||||
|
--- !u!157 &3
|
||||||
|
LightmapSettings:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 12
|
||||||
|
m_GIWorkflowMode: 1
|
||||||
|
m_GISettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_BounceScale: 1
|
||||||
|
m_IndirectOutputScale: 1
|
||||||
|
m_AlbedoBoost: 1
|
||||||
|
m_EnvironmentLightingMode: 0
|
||||||
|
m_EnableBakedLightmaps: 0
|
||||||
|
m_EnableRealtimeLightmaps: 0
|
||||||
|
m_LightmapEditorSettings:
|
||||||
|
serializedVersion: 12
|
||||||
|
m_Resolution: 2
|
||||||
|
m_BakeResolution: 40
|
||||||
|
m_AtlasSize: 1024
|
||||||
|
m_AO: 0
|
||||||
|
m_AOMaxDistance: 1
|
||||||
|
m_CompAOExponent: 1
|
||||||
|
m_CompAOExponentDirect: 0
|
||||||
|
m_ExtractAmbientOcclusion: 0
|
||||||
|
m_Padding: 2
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_LightmapsBakeMode: 1
|
||||||
|
m_TextureCompression: 1
|
||||||
|
m_FinalGather: 0
|
||||||
|
m_FinalGatherFiltering: 1
|
||||||
|
m_FinalGatherRayCount: 256
|
||||||
|
m_ReflectionCompression: 2
|
||||||
|
m_MixedBakeMode: 2
|
||||||
|
m_BakeBackend: 0
|
||||||
|
m_PVRSampling: 1
|
||||||
|
m_PVRDirectSampleCount: 32
|
||||||
|
m_PVRSampleCount: 500
|
||||||
|
m_PVRBounces: 2
|
||||||
|
m_PVREnvironmentSampleCount: 500
|
||||||
|
m_PVREnvironmentReferencePointCount: 2048
|
||||||
|
m_PVRFilteringMode: 2
|
||||||
|
m_PVRDenoiserTypeDirect: 0
|
||||||
|
m_PVRDenoiserTypeIndirect: 0
|
||||||
|
m_PVRDenoiserTypeAO: 0
|
||||||
|
m_PVRFilterTypeDirect: 0
|
||||||
|
m_PVRFilterTypeIndirect: 0
|
||||||
|
m_PVRFilterTypeAO: 0
|
||||||
|
m_PVREnvironmentMIS: 0
|
||||||
|
m_PVRCulling: 1
|
||||||
|
m_PVRFilteringGaussRadiusDirect: 1
|
||||||
|
m_PVRFilteringGaussRadiusIndirect: 5
|
||||||
|
m_PVRFilteringGaussRadiusAO: 2
|
||||||
|
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||||
|
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||||
|
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||||
|
m_ExportTrainingData: 0
|
||||||
|
m_TrainingDataDestination: TrainingData
|
||||||
|
m_LightProbeSampleCountMultiplier: 4
|
||||||
|
m_LightingDataAsset: {fileID: 0}
|
||||||
|
m_LightingSettings: {fileID: 0}
|
||||||
|
--- !u!196 &4
|
||||||
|
NavMeshSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_BuildSettings:
|
||||||
|
serializedVersion: 3
|
||||||
|
agentTypeID: 0
|
||||||
|
agentRadius: 0.5
|
||||||
|
agentHeight: 2
|
||||||
|
agentSlope: 45
|
||||||
|
agentClimb: 0.4
|
||||||
|
ledgeDropHeight: 0
|
||||||
|
maxJumpAcrossDistance: 0
|
||||||
|
minRegionArea: 2
|
||||||
|
manualCellSize: 0
|
||||||
|
cellSize: 0.16666667
|
||||||
|
manualTileSize: 0
|
||||||
|
tileSize: 256
|
||||||
|
buildHeightMesh: 0
|
||||||
|
maxJobWorkers: 0
|
||||||
|
preserveTilesOutsideBounds: 0
|
||||||
|
debug:
|
||||||
|
m_Flags: 0
|
||||||
|
m_NavMeshData: {fileID: 0}
|
||||||
|
--- !u!1001 &150251232
|
||||||
|
PrefabInstance:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Modification:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TransformParent: {fileID: 759297939}
|
||||||
|
m_Modifications:
|
||||||
|
- target: {fileID: 180756268084732627, guid: 6f42a47846f21b044b1cda32a9516609, type: 3}
|
||||||
|
propertyPath: m_AnchorMax.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 180756268084732627, guid: 6f42a47846f21b044b1cda32a9516609, type: 3}
|
||||||
|
propertyPath: m_AnchorMin.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 180756268084732627, guid: 6f42a47846f21b044b1cda32a9516609, type: 3}
|
||||||
|
propertyPath: m_AnchoredPosition.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 180756268084732627, guid: 6f42a47846f21b044b1cda32a9516609, type: 3}
|
||||||
|
propertyPath: m_AnchoredPosition.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 837160915965981132, guid: 6f42a47846f21b044b1cda32a9516609, type: 3}
|
||||||
|
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
|
||||||
|
value: OnclickRecordButton
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4282069284025755619, guid: 6f42a47846f21b044b1cda32a9516609, type: 3}
|
||||||
|
propertyPath: m_SizeDelta.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4733773333797619672, guid: 6f42a47846f21b044b1cda32a9516609, type: 3}
|
||||||
|
propertyPath: m_AnchorMax.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4733773333797619672, guid: 6f42a47846f21b044b1cda32a9516609, type: 3}
|
||||||
|
propertyPath: m_AnchorMin.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4733773333797619672, guid: 6f42a47846f21b044b1cda32a9516609, type: 3}
|
||||||
|
propertyPath: m_AnchoredPosition.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4733773333797619672, guid: 6f42a47846f21b044b1cda32a9516609, type: 3}
|
||||||
|
propertyPath: m_AnchoredPosition.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5033979732381400892, guid: 6f42a47846f21b044b1cda32a9516609, type: 3}
|
||||||
|
propertyPath: m_AnchorMax.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5033979732381400892, guid: 6f42a47846f21b044b1cda32a9516609, type: 3}
|
||||||
|
propertyPath: m_AnchorMin.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5033979732381400892, guid: 6f42a47846f21b044b1cda32a9516609, type: 3}
|
||||||
|
propertyPath: m_AnchoredPosition.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5033979732381400892, guid: 6f42a47846f21b044b1cda32a9516609, type: 3}
|
||||||
|
propertyPath: m_AnchoredPosition.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6110152713294678410, guid: 6f42a47846f21b044b1cda32a9516609, type: 3}
|
||||||
|
propertyPath: m_Pivot.x
|
||||||
|
value: 0.5
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6110152713294678410, guid: 6f42a47846f21b044b1cda32a9516609, type: 3}
|
||||||
|
propertyPath: m_Pivot.y
|
||||||
|
value: 0.5
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6110152713294678410, guid: 6f42a47846f21b044b1cda32a9516609, type: 3}
|
||||||
|
propertyPath: m_AnchorMax.x
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6110152713294678410, guid: 6f42a47846f21b044b1cda32a9516609, type: 3}
|
||||||
|
propertyPath: m_AnchorMax.y
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6110152713294678410, guid: 6f42a47846f21b044b1cda32a9516609, type: 3}
|
||||||
|
propertyPath: m_AnchorMin.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6110152713294678410, guid: 6f42a47846f21b044b1cda32a9516609, type: 3}
|
||||||
|
propertyPath: m_AnchorMin.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6110152713294678410, guid: 6f42a47846f21b044b1cda32a9516609, type: 3}
|
||||||
|
propertyPath: m_SizeDelta.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6110152713294678410, guid: 6f42a47846f21b044b1cda32a9516609, type: 3}
|
||||||
|
propertyPath: m_SizeDelta.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6110152713294678410, guid: 6f42a47846f21b044b1cda32a9516609, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6110152713294678410, guid: 6f42a47846f21b044b1cda32a9516609, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6110152713294678410, guid: 6f42a47846f21b044b1cda32a9516609, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6110152713294678410, guid: 6f42a47846f21b044b1cda32a9516609, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.w
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6110152713294678410, guid: 6f42a47846f21b044b1cda32a9516609, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6110152713294678410, guid: 6f42a47846f21b044b1cda32a9516609, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6110152713294678410, guid: 6f42a47846f21b044b1cda32a9516609, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6110152713294678410, guid: 6f42a47846f21b044b1cda32a9516609, type: 3}
|
||||||
|
propertyPath: m_AnchoredPosition.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6110152713294678410, guid: 6f42a47846f21b044b1cda32a9516609, type: 3}
|
||||||
|
propertyPath: m_AnchoredPosition.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6110152713294678410, guid: 6f42a47846f21b044b1cda32a9516609, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6110152713294678410, guid: 6f42a47846f21b044b1cda32a9516609, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6110152713294678410, guid: 6f42a47846f21b044b1cda32a9516609, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 8446481687955831510, guid: 6f42a47846f21b044b1cda32a9516609, type: 3}
|
||||||
|
propertyPath: m_AnchorMax.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 8446481687955831510, guid: 6f42a47846f21b044b1cda32a9516609, type: 3}
|
||||||
|
propertyPath: m_AnchorMin.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 8446481687955831510, guid: 6f42a47846f21b044b1cda32a9516609, type: 3}
|
||||||
|
propertyPath: m_AnchoredPosition.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 8446481687955831510, guid: 6f42a47846f21b044b1cda32a9516609, type: 3}
|
||||||
|
propertyPath: m_AnchoredPosition.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 8564394481744056992, guid: 6f42a47846f21b044b1cda32a9516609, type: 3}
|
||||||
|
propertyPath: m_Name
|
||||||
|
value: Main Panel Test LIN
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 8768541925252566370, guid: 6f42a47846f21b044b1cda32a9516609, type: 3}
|
||||||
|
propertyPath: m_AnchorMax.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 8768541925252566370, guid: 6f42a47846f21b044b1cda32a9516609, type: 3}
|
||||||
|
propertyPath: m_AnchorMin.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 8768541925252566370, guid: 6f42a47846f21b044b1cda32a9516609, type: 3}
|
||||||
|
propertyPath: m_AnchoredPosition.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 8768541925252566370, guid: 6f42a47846f21b044b1cda32a9516609, type: 3}
|
||||||
|
propertyPath: m_AnchoredPosition.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
m_RemovedComponents: []
|
||||||
|
m_RemovedGameObjects: []
|
||||||
|
m_AddedGameObjects: []
|
||||||
|
m_AddedComponents: []
|
||||||
|
m_SourcePrefab: {fileID: 100100000, guid: 6f42a47846f21b044b1cda32a9516609, type: 3}
|
||||||
|
--- !u!1 &519420028
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 519420032}
|
||||||
|
- component: {fileID: 519420031}
|
||||||
|
- component: {fileID: 519420029}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Main Camera
|
||||||
|
m_TagString: MainCamera
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!81 &519420029
|
||||||
|
AudioListener:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 519420028}
|
||||||
|
m_Enabled: 1
|
||||||
|
--- !u!20 &519420031
|
||||||
|
Camera:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 519420028}
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 2
|
||||||
|
m_ClearFlags: 2
|
||||||
|
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||||
|
m_projectionMatrixMode: 1
|
||||||
|
m_GateFitMode: 2
|
||||||
|
m_FOVAxisMode: 0
|
||||||
|
m_Iso: 200
|
||||||
|
m_ShutterSpeed: 0.005
|
||||||
|
m_Aperture: 16
|
||||||
|
m_FocusDistance: 10
|
||||||
|
m_FocalLength: 50
|
||||||
|
m_BladeCount: 5
|
||||||
|
m_Curvature: {x: 2, y: 11}
|
||||||
|
m_BarrelClipping: 0.25
|
||||||
|
m_Anamorphism: 0
|
||||||
|
m_SensorSize: {x: 36, y: 24}
|
||||||
|
m_LensShift: {x: 0, y: 0}
|
||||||
|
m_NormalizedViewPortRect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 0
|
||||||
|
y: 0
|
||||||
|
width: 1
|
||||||
|
height: 1
|
||||||
|
near clip plane: 0.3
|
||||||
|
far clip plane: 1000
|
||||||
|
field of view: 60
|
||||||
|
orthographic: 1
|
||||||
|
orthographic size: 5
|
||||||
|
m_Depth: -1
|
||||||
|
m_CullingMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
m_RenderingPath: -1
|
||||||
|
m_TargetTexture: {fileID: 0}
|
||||||
|
m_TargetDisplay: 0
|
||||||
|
m_TargetEye: 0
|
||||||
|
m_HDR: 1
|
||||||
|
m_AllowMSAA: 0
|
||||||
|
m_AllowDynamicResolution: 0
|
||||||
|
m_ForceIntoRT: 0
|
||||||
|
m_OcclusionCulling: 0
|
||||||
|
m_StereoConvergence: 10
|
||||||
|
m_StereoSeparation: 0.022
|
||||||
|
--- !u!4 &519420032
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 519420028}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: -10}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1 &759297935
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 759297939}
|
||||||
|
- component: {fileID: 759297938}
|
||||||
|
- component: {fileID: 759297937}
|
||||||
|
- component: {fileID: 759297936}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: Canvas
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!114 &759297936
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 759297935}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_IgnoreReversedGraphics: 1
|
||||||
|
m_BlockingObjects: 0
|
||||||
|
m_BlockingMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
--- !u!114 &759297937
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 759297935}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_UiScaleMode: 0
|
||||||
|
m_ReferencePixelsPerUnit: 100
|
||||||
|
m_ScaleFactor: 1
|
||||||
|
m_ReferenceResolution: {x: 800, y: 600}
|
||||||
|
m_ScreenMatchMode: 0
|
||||||
|
m_MatchWidthOrHeight: 0
|
||||||
|
m_PhysicalUnit: 3
|
||||||
|
m_FallbackScreenDPI: 96
|
||||||
|
m_DefaultSpriteDPI: 96
|
||||||
|
m_DynamicPixelsPerUnit: 1
|
||||||
|
m_PresetInfoIsWorld: 0
|
||||||
|
--- !u!223 &759297938
|
||||||
|
Canvas:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 759297935}
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 3
|
||||||
|
m_RenderMode: 0
|
||||||
|
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: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_TargetDisplay: 0
|
||||||
|
--- !u!224 &759297939
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 759297935}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 0, y: 0, z: 0}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 972014384}
|
||||||
|
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: 0, y: 0}
|
||||||
|
m_Pivot: {x: 0, y: 0}
|
||||||
|
--- !u!224 &972014384 stripped
|
||||||
|
RectTransform:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 6110152713294678410, guid: 6f42a47846f21b044b1cda32a9516609, type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 150251232}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!1 &1017982169
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1017982171}
|
||||||
|
- component: {fileID: 1017982172}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: GameManager
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &1017982171
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1017982169}
|
||||||
|
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: 0}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!114 &1017982172
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1017982169}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: da4e7b6c90ef1dd49a95d0f1716dedc7, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
signinPanel: {fileID: 925522282249935710, guid: e14c9b2925f0ddb4192af743e5cc166a, type: 3}
|
||||||
|
signupPanel: {fileID: 3181524094944658765, guid: 8827fe7caa3145e40b1369cc42f8697d, type: 3}
|
||||||
|
canvas: {fileID: 759297938}
|
||||||
|
profileSprites: []
|
||||||
|
--- !u!1 &1231053598
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1231053601}
|
||||||
|
- component: {fileID: 1231053600}
|
||||||
|
- component: {fileID: 1231053599}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: EventSystem
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!114 &1231053599
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1231053598}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_SendPointerHoverToParent: 1
|
||||||
|
m_HorizontalAxis: Horizontal
|
||||||
|
m_VerticalAxis: Vertical
|
||||||
|
m_SubmitButton: Submit
|
||||||
|
m_CancelButton: Cancel
|
||||||
|
m_InputActionsPerSecond: 10
|
||||||
|
m_RepeatDelay: 0.5
|
||||||
|
m_ForceModuleActive: 0
|
||||||
|
--- !u!114 &1231053600
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1231053598}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_FirstSelected: {fileID: 0}
|
||||||
|
m_sendNavigationEvents: 1
|
||||||
|
m_DragThreshold: 10
|
||||||
|
--- !u!4 &1231053601
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1231053598}
|
||||||
|
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: 0}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1660057539 &9223372036854775807
|
||||||
|
SceneRoots:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_Roots:
|
||||||
|
- {fileID: 519420032}
|
||||||
|
- {fileID: 1017982171}
|
||||||
|
- {fileID: 759297939}
|
||||||
|
- {fileID: 1231053601}
|
7
Assets/LIN/Scenes/MainTestLIN.unity.meta
Normal file
7
Assets/LIN/Scenes/MainTestLIN.unity.meta
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: e949607640ea834428ceb6b9157aff2e
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
8
Assets/LIN/Scripts.meta
Normal file
8
Assets/LIN/Scripts.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 62464d6fc96bc9940a83a9d7322bbee3
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
146
Assets/LIN/Scripts/GameManagerTestLIN.cs
Normal file
146
Assets/LIN/Scripts/GameManagerTestLIN.cs
Normal file
@ -0,0 +1,146 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.SceneManagement;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
public class GameManagerTestLIN : Singleton<GameManagerTestLIN>
|
||||||
|
{
|
||||||
|
[SerializeField] private GameObject signinPanel;
|
||||||
|
[SerializeField] private GameObject signupPanel;
|
||||||
|
|
||||||
|
[SerializeField] private Canvas canvas;
|
||||||
|
private UserManager _userManager; // UserManager 인스턴스 관리
|
||||||
|
|
||||||
|
private Enums.GameType _gameType;
|
||||||
|
private GameLogic _gameLogic;
|
||||||
|
private StoneController _stoneController;
|
||||||
|
private Canvas _canvas;
|
||||||
|
|
||||||
|
public Sprite[] profileSprites; //패널에서 사용할 테스트 배열
|
||||||
|
|
||||||
|
private void Awake()
|
||||||
|
{
|
||||||
|
// UserManager가 없으면 생성
|
||||||
|
if (UserManager.Instance == null)
|
||||||
|
{
|
||||||
|
GameObject userManagerObj = new GameObject("UserManager");
|
||||||
|
_userManager = userManagerObj.AddComponent<UserManager>();
|
||||||
|
|
||||||
|
//TODO: 게임 내에서 기보 타입 적용하기
|
||||||
|
_gameType = Enums.GameType.Replay;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
//TODO: 기보 타입으로 들어왔을 때 데이터 로드 테스트 수정할것
|
||||||
|
ReplayManager.Instance.InitReplayBoard(ReplayManager.Instance.LoadReplayDatas()[9]);
|
||||||
|
|
||||||
|
|
||||||
|
//게임 씬에서 확인하기 위한 임시 코드
|
||||||
|
_stoneController = GameObject.FindObjectOfType<StoneController>();
|
||||||
|
_stoneController.InitStones();
|
||||||
|
_gameLogic = new GameLogic(_stoneController, _gameType);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void TryAutoSignin()
|
||||||
|
{
|
||||||
|
NetworkManager.Instance.GetInfo((userInfo) =>
|
||||||
|
{
|
||||||
|
Debug.Log("자동 로그인 성공");
|
||||||
|
|
||||||
|
UpdateMainPanelUI();
|
||||||
|
// ScoreData.SetScore(userInfo.score);
|
||||||
|
// OpenConfirmPanel(userInfo.nickname + "님 로그인 성공하였습니다.", () => { });
|
||||||
|
}, () =>
|
||||||
|
{
|
||||||
|
Debug.Log("자동 로그인 실패");
|
||||||
|
// 로그인 화면
|
||||||
|
OpenSigninPanel();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UpdateMainPanelUI()
|
||||||
|
{
|
||||||
|
MainPanelController mainPanel = FindObjectOfType<MainPanelController>();
|
||||||
|
if (mainPanel != null)
|
||||||
|
{
|
||||||
|
mainPanel.UpdateUserInfo();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OpenSigninPanel()
|
||||||
|
{
|
||||||
|
if (canvas != null)
|
||||||
|
{
|
||||||
|
var signinPanelObject = Instantiate(signinPanel, canvas.transform);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OpenSignupPanel()
|
||||||
|
{
|
||||||
|
if (canvas != null)
|
||||||
|
{
|
||||||
|
var signupPanelObject = Instantiate(signupPanel, canvas.transform);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnClickConfirmButton()
|
||||||
|
{
|
||||||
|
_gameLogic.SetNewBoardValue(_gameLogic.currentTurn, _gameLogic.selectedRow,_gameLogic.selectedCol);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnClickReplayNextButton()
|
||||||
|
{
|
||||||
|
Move nextMove = ReplayManager.Instance.GetNextMove();
|
||||||
|
if (nextMove != null)
|
||||||
|
{
|
||||||
|
if (nextMove.stoneType.Equals(Enums.StoneType.Black.ToString()))
|
||||||
|
{
|
||||||
|
_gameLogic.SetNewBoardValue(Enums.PlayerType.PlayerA, nextMove.columnIndex, nextMove.rowIndex);
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (nextMove.stoneType.Equals(Enums.StoneType.White.ToString()))
|
||||||
|
{
|
||||||
|
_gameLogic.SetNewBoardValue(Enums.PlayerType.PlayerB, nextMove.columnIndex, nextMove.rowIndex);
|
||||||
|
}
|
||||||
|
ReplayManager.Instance.PushMove(nextMove);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnClickReplayUndoButton()
|
||||||
|
{
|
||||||
|
Move targetMove = ReplayManager.Instance.PopMove();
|
||||||
|
if (targetMove != null)
|
||||||
|
{
|
||||||
|
if (targetMove.stoneType.Equals(Enums.StoneType.Black.ToString()))
|
||||||
|
{
|
||||||
|
_gameLogic.SetNewBoardValue(Enums.PlayerType.PlayerA, targetMove.columnIndex, targetMove.rowIndex);
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (targetMove.stoneType.Equals(Enums.StoneType.White.ToString()))
|
||||||
|
{
|
||||||
|
_gameLogic.SetNewBoardValue(Enums.PlayerType.PlayerB, targetMove.columnIndex, targetMove.rowIndex);
|
||||||
|
}
|
||||||
|
ReplayManager.Instance.PushUndoMove(targetMove);
|
||||||
|
//TODO: 화면상에서 돌 치우기
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void ChangeToGameScene(Enums.GameType gameType)
|
||||||
|
{
|
||||||
|
_gameType = gameType;
|
||||||
|
SceneManager.LoadScene("Game");
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnSceneLoaded(Scene scene, LoadSceneMode mode)
|
||||||
|
{
|
||||||
|
if (scene.name == "Game")
|
||||||
|
{
|
||||||
|
_stoneController = GameObject.FindObjectOfType<StoneController>();
|
||||||
|
_stoneController.InitStones();
|
||||||
|
_gameLogic = new GameLogic(_stoneController, _gameType);
|
||||||
|
}
|
||||||
|
_canvas = GameObject.Find("Canvas").GetComponent<Canvas>();
|
||||||
|
}
|
||||||
|
}
|
11
Assets/LIN/Scripts/GameManagerTestLIN.cs.meta
Normal file
11
Assets/LIN/Scripts/GameManagerTestLIN.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: da4e7b6c90ef1dd49a95d0f1716dedc7
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
40
Assets/LIN/Scripts/MainPanelControllerTestLIN.cs
Normal file
40
Assets/LIN/Scripts/MainPanelControllerTestLIN.cs
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
using System;
|
||||||
|
using TMPro;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
|
||||||
|
public class MainPanelControllerTestLIN : MonoBehaviour
|
||||||
|
{
|
||||||
|
[SerializeField] private TextMeshProUGUI nicknameText;
|
||||||
|
[SerializeField] private TextMeshProUGUI ratingText;
|
||||||
|
[SerializeField] private Button signOutButton;
|
||||||
|
[SerializeField] private GameObject replayPanel;
|
||||||
|
|
||||||
|
public void UpdateUserInfo()
|
||||||
|
{
|
||||||
|
if (UserManager.Instance == null) return;
|
||||||
|
|
||||||
|
nicknameText.text = UserManager.Instance.Nickname;
|
||||||
|
ratingText.text = $"{UserManager.Instance.Rating}급";
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnSignOutClick()
|
||||||
|
{
|
||||||
|
NetworkManager.Instance.SignOut(() =>
|
||||||
|
{
|
||||||
|
Debug.Log("로그아웃 성공");
|
||||||
|
|
||||||
|
// 로그인 화면
|
||||||
|
GameManager.Instance.OpenSigninPanel();
|
||||||
|
}, () =>
|
||||||
|
{
|
||||||
|
Debug.Log("로그아웃 실패");
|
||||||
|
// OpenConfirmPanel("로그아웃 되었습니다.", () => { });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnclickRecordButton()
|
||||||
|
{
|
||||||
|
Instantiate(replayPanel, GetComponent<Transform>());
|
||||||
|
}
|
||||||
|
}
|
3
Assets/LIN/Scripts/MainPanelControllerTestLIN.cs.meta
Normal file
3
Assets/LIN/Scripts/MainPanelControllerTestLIN.cs.meta
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 67ce17de423b0644bb099f5272a48faf
|
||||||
|
timeCreated: 1741848912
|
8
Assets/Script/AI.meta
Normal file
8
Assets/Script/AI.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 2b0c3d8290ac86441b7db8c07a6d21a6
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
340
Assets/Script/AI/MiniMaxAIController.cs
Normal file
340
Assets/Script/AI/MiniMaxAIController.cs
Normal file
@ -0,0 +1,340 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public static class MiniMaxAIController
|
||||||
|
{
|
||||||
|
// To-Do List
|
||||||
|
// 탐색 시간 개선: 캐싱(_stoneInfoCache), 좋은 수부터 탐색(Move Ordering)
|
||||||
|
// AI 난이도 개선
|
||||||
|
|
||||||
|
private const int SEARCH_DEPTH = 3; // 탐색 깊이 제한 (3 = 빠른 응답, 4 = 좀 더 강한 AI 그러나 느린)
|
||||||
|
private const int WIN_COUNT = 5;
|
||||||
|
|
||||||
|
private static int[][] _directions = new int[][]
|
||||||
|
{
|
||||||
|
new int[] {1, 0}, // 수직
|
||||||
|
new int[] {0, 1}, // 수평
|
||||||
|
new int[] {1, 1}, // 대각선 ↘ ↖
|
||||||
|
new int[] {1, -1} // 대각선 ↙ ↗
|
||||||
|
};
|
||||||
|
|
||||||
|
private static int _playerLevel = 1; // 급수 설정
|
||||||
|
private static float _mistakeMove;
|
||||||
|
private static Enums.PlayerType _AIPlayerType = Enums.PlayerType.PlayerB;
|
||||||
|
|
||||||
|
// 중복 계산을 방지하기 위한 캐싱 데이터. 위치(row, col) 와 방향(dirX, dirY) 중복 계산 방지
|
||||||
|
private static Dictionary<(int, int, int, int), (int count, int openEnds)> _stoneInfoCache
|
||||||
|
= new Dictionary<(int, int, int, int), (int count, int openEnds)>();
|
||||||
|
|
||||||
|
// 급수 설정 -> 실수 넣을 때 계산
|
||||||
|
public static void SetLevel(int level)
|
||||||
|
{
|
||||||
|
_playerLevel = level;
|
||||||
|
|
||||||
|
_mistakeMove = GetMistakeProbability(_playerLevel);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 실수 확률 계산 함수
|
||||||
|
private static float GetMistakeProbability(int level)
|
||||||
|
{
|
||||||
|
// 레벨이 1일 때 실수 확률 0%, 레벨이 18일 때 실수 확률 50%
|
||||||
|
return (level - 1) / 17f * 0.5f;
|
||||||
|
}
|
||||||
|
|
||||||
|
// return 값이 null 일 경우 == 보드에 칸 꽉 참
|
||||||
|
public static (int row, int col)? GetBestMove(Enums.PlayerType[,] board)
|
||||||
|
{
|
||||||
|
// 캐시 초기화
|
||||||
|
ClearCache();
|
||||||
|
|
||||||
|
float bestScore = float.MinValue;
|
||||||
|
(int row, int col)? bestMove = null;
|
||||||
|
(int row, int col)? secondBestMove = null;
|
||||||
|
List<(int row, int col, float score)> validMoves = GetValidMoves(board);
|
||||||
|
|
||||||
|
// 보드에 놓을 수 있는 자리가 있는지 확인
|
||||||
|
if (validMoves.Count == 0)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 5연승 가능한 자리를 먼저 찾아서 우선적으로 설정
|
||||||
|
List<(int row, int col)> fiveInARowMoves = GetFiveInARowCandidateMoves(board);
|
||||||
|
if (fiveInARowMoves.Count > 0)
|
||||||
|
{
|
||||||
|
bestMove = fiveInARowMoves[0];
|
||||||
|
return bestMove;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var (row, col, _) in validMoves)
|
||||||
|
{
|
||||||
|
board[row, col] = _AIPlayerType;
|
||||||
|
float score = DoMinimax(board, SEARCH_DEPTH, false, -1000, 1000, row, col);
|
||||||
|
board[row, col] = Enums.PlayerType.None;
|
||||||
|
|
||||||
|
if (score > bestScore)
|
||||||
|
{
|
||||||
|
bestScore = score;
|
||||||
|
|
||||||
|
if (bestMove != null)
|
||||||
|
{
|
||||||
|
secondBestMove = bestMove;
|
||||||
|
}
|
||||||
|
|
||||||
|
bestMove = (row, col);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 랜덤 실수
|
||||||
|
if (secondBestMove != null && UnityEngine.Random.value < _mistakeMove) // UnityEngine.Random.value == 0~1 사이 반환
|
||||||
|
{
|
||||||
|
Debug.Log("AI Mistake");
|
||||||
|
return secondBestMove;
|
||||||
|
}
|
||||||
|
|
||||||
|
return bestMove;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static float DoMinimax(Enums.PlayerType[,] board, int depth, bool isMaximizing, float alpha, float beta,
|
||||||
|
int recentRow, int recentCol)
|
||||||
|
{
|
||||||
|
if (CheckGameWin(Enums.PlayerType.PlayerA, board, recentRow, recentCol)) return -100 + depth;
|
||||||
|
if (CheckGameWin(Enums.PlayerType.PlayerB, board, recentRow, recentCol)) return 100 - depth;
|
||||||
|
if (depth == 0) return EvaluateBoard(board);
|
||||||
|
|
||||||
|
float bestScore = isMaximizing ? float.MinValue : float.MaxValue;
|
||||||
|
List<(int row, int col, float score)> validMoves = GetValidMoves(board); // 현재 놓을 수 있는 자리 리스트
|
||||||
|
|
||||||
|
foreach (var (row, col, _) in validMoves)
|
||||||
|
{
|
||||||
|
board[row, col] = isMaximizing ? Enums.PlayerType.PlayerB : Enums.PlayerType.PlayerA;
|
||||||
|
ClearCachePartial(row, col); // 부분 초기화
|
||||||
|
// ClearCache();
|
||||||
|
|
||||||
|
float minimaxScore = DoMinimax(board, depth - 1, !isMaximizing, alpha, beta, row, col);
|
||||||
|
|
||||||
|
board[row, col] = Enums.PlayerType.None;
|
||||||
|
ClearCachePartial(row, col);
|
||||||
|
// ClearCache();
|
||||||
|
|
||||||
|
if (isMaximizing)
|
||||||
|
{
|
||||||
|
bestScore = Math.Max(bestScore, minimaxScore);
|
||||||
|
alpha = Math.Max(alpha, bestScore);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
bestScore = Math.Min(bestScore, minimaxScore);
|
||||||
|
beta = Math.Min(beta, bestScore);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (beta <= alpha) break;
|
||||||
|
}
|
||||||
|
return bestScore;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 이동 가능 + 주변에 돌 있는 위치 탐색
|
||||||
|
private static List<(int row, int col, float score)> GetValidMoves(Enums.PlayerType[,] board)
|
||||||
|
{
|
||||||
|
List<(int, int, float)> validMoves = new List<(int, int, float)>();
|
||||||
|
int size = board.GetLength(0);
|
||||||
|
|
||||||
|
for (int row = 0; row < size; row++)
|
||||||
|
{
|
||||||
|
for (int col = 0; col < size; col++)
|
||||||
|
{
|
||||||
|
if (board[row, col] == Enums.PlayerType.None && HasNearbyStones(board, row, col))
|
||||||
|
{
|
||||||
|
float score = EvaluateBoard(board);
|
||||||
|
validMoves.Add((row, col, score));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
validMoves.Sort((a, b) => b.Item3.CompareTo(a.Item3));
|
||||||
|
return validMoves;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static bool HasNearbyStones(Enums.PlayerType[,] board, int row, int col, int distance = 3)
|
||||||
|
{
|
||||||
|
// 9칸 기준으로 현재 위치를 중앙으로 상정한 후 나머지 8방향
|
||||||
|
int[] dr = { -1, -1, -1, 0, 0, 1, 1, 1 };
|
||||||
|
int[] dc = { -1, 0, 1, -1, 1, -1, 0, 1 };
|
||||||
|
int size = board.GetLength(0);
|
||||||
|
|
||||||
|
for(int i = 0; i < dr.Length; i++)
|
||||||
|
{
|
||||||
|
int nr = row + dr[i], nc = col + dc[i];
|
||||||
|
if (nr >= 0 && nr < size && nc >= 0 && nc < size && board[nr, nc] != Enums.PlayerType.None)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 특정 방향으로 같은 돌 개수와 열린 끝 개수를 계산하는 함수
|
||||||
|
private static (int count, int openEnds) CountStones(
|
||||||
|
Enums.PlayerType[,] board, int row, int col, int[] direction, Enums.PlayerType player)
|
||||||
|
{
|
||||||
|
int dirX = direction[0], dirY = direction[1];
|
||||||
|
var key = (row, col, dirX, dirY);
|
||||||
|
|
||||||
|
// 캐시에 존재하면 바로 반환 (탐색 시간 감소)
|
||||||
|
if (_stoneInfoCache.TryGetValue(key, out var cachedResult))
|
||||||
|
{
|
||||||
|
return cachedResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
int size = board.GetLength(0);
|
||||||
|
int count = 0;
|
||||||
|
int openEnds = 0;
|
||||||
|
|
||||||
|
// 정방향 탐색
|
||||||
|
int r = row + direction[0], c = col + direction[1];
|
||||||
|
while (r >= 0 && r < size && c >= 0 && c < size && board[r, c] == player)
|
||||||
|
{
|
||||||
|
count++;
|
||||||
|
r += direction[0]; // row값 옮기기
|
||||||
|
c += direction[1]; // col값 옮기기
|
||||||
|
}
|
||||||
|
|
||||||
|
if (r >= 0 && r < size && c >= 0 && c < size && board[r, c] == Enums.PlayerType.None)
|
||||||
|
{
|
||||||
|
openEnds++;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 역방향 탐색
|
||||||
|
r = row - direction[0];
|
||||||
|
c = col - direction[1];
|
||||||
|
while (r >= 0 && r < size && c >= 0 && c < size && board[r, c] == player)
|
||||||
|
{
|
||||||
|
count++;
|
||||||
|
r -= direction[0];
|
||||||
|
c -= direction[1];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (r >= 0 && r < size && c >= 0 && c < size && board[r, c] == Enums.PlayerType.None)
|
||||||
|
{
|
||||||
|
openEnds++;
|
||||||
|
}
|
||||||
|
|
||||||
|
var resultValue = (count, openEnds);
|
||||||
|
_stoneInfoCache[key] = resultValue; // 결과 저장
|
||||||
|
return resultValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 캐시 초기화, 새로운 돌이 놓일 시 실행
|
||||||
|
private static void ClearCache()
|
||||||
|
{
|
||||||
|
_stoneInfoCache.Clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 캐시 부분 초기화 (현재 변경된 위치 N에서 반경 5칸만 초기화)
|
||||||
|
private static void ClearCachePartial(int centerRow, int centerCol, int radius = 5)
|
||||||
|
{
|
||||||
|
// 캐시가 비어있으면 아무 작업도 하지 않음
|
||||||
|
if (_stoneInfoCache.Count == 0) return;
|
||||||
|
|
||||||
|
// 제거할 키 목록
|
||||||
|
List<(int, int, int, int)> keysToRemove = new List<(int, int, int, int)>();
|
||||||
|
|
||||||
|
// 모든 캐시 항목을 검사
|
||||||
|
foreach (var key in _stoneInfoCache.Keys)
|
||||||
|
{
|
||||||
|
var (row, col, _, _) = key;
|
||||||
|
|
||||||
|
// 거리 계산
|
||||||
|
int distance = Math.Max(Math.Abs(row - centerRow), Math.Abs(col - centerCol));
|
||||||
|
|
||||||
|
// 지정된 반경 내에 있는 캐시 항목을 삭제 목록에 추가
|
||||||
|
if (distance <= radius)
|
||||||
|
{
|
||||||
|
keysToRemove.Add(key);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 반경 내의 키 제거
|
||||||
|
foreach (var key in keysToRemove)
|
||||||
|
{
|
||||||
|
_stoneInfoCache.Remove(key);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 최근에 둔 돌 위치 기반으로 게임 승리를 판별하는 함수
|
||||||
|
public static bool CheckGameWin(Enums.PlayerType player, Enums.PlayerType[,] board, int row, int col)
|
||||||
|
{
|
||||||
|
foreach (var dir in _directions)
|
||||||
|
{
|
||||||
|
var (count, _) = CountStones(board, row, col, dir, player);
|
||||||
|
|
||||||
|
// 자기 자신 포함하여 5개 이상일 시 true 반환
|
||||||
|
if (count + 1 >= WIN_COUNT)
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 5목이 될 수 있는 위치 찾기
|
||||||
|
private static List<(int row, int col)> GetFiveInARowCandidateMoves(Enums.PlayerType[,] board)
|
||||||
|
{
|
||||||
|
List<(int row, int col)> fiveInARowMoves = new List<(int, int)>();
|
||||||
|
int size = board.GetLength(0);
|
||||||
|
|
||||||
|
for (int row = 0; row < size; row++)
|
||||||
|
{
|
||||||
|
for (int col = 0; col < size; col++)
|
||||||
|
{
|
||||||
|
if (board[row, col] != Enums.PlayerType.None) continue;
|
||||||
|
|
||||||
|
foreach (var dir in _directions)
|
||||||
|
{
|
||||||
|
var (count, openEnds) = CountStones(board, row, col, dir, _AIPlayerType);
|
||||||
|
|
||||||
|
if (count == 4 && openEnds > 0)
|
||||||
|
{
|
||||||
|
fiveInARowMoves.Add((row, col));
|
||||||
|
break; // 하나 나오면 바로 break (시간 단축)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return fiveInARowMoves;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 현재 보드 평가 함수
|
||||||
|
private static float EvaluateBoard(Enums.PlayerType[,] board)
|
||||||
|
{
|
||||||
|
float score = 0;
|
||||||
|
int size = board.GetLength(0);
|
||||||
|
|
||||||
|
for (int row = 0; row < size; row++)
|
||||||
|
{
|
||||||
|
for (int col = 0; col < size; col++)
|
||||||
|
{
|
||||||
|
if (board[row, col] == Enums.PlayerType.None) continue;
|
||||||
|
|
||||||
|
Enums.PlayerType player = board[row, col];
|
||||||
|
int playerScore = (player == _AIPlayerType) ? 1 : -1; // AI는 양수, 플레이어는 음수
|
||||||
|
|
||||||
|
foreach (var dir in _directions)
|
||||||
|
{
|
||||||
|
var (count, openEnds) = CountStones(board, row, col, dir, player);
|
||||||
|
|
||||||
|
// 점수 계산
|
||||||
|
if (count == 4)
|
||||||
|
score += playerScore * (openEnds == 2 ? 10000 : 1000);
|
||||||
|
else if (count == 3)
|
||||||
|
score += playerScore * (openEnds == 2 ? 1000 : 100);
|
||||||
|
else if (count == 2)
|
||||||
|
score += playerScore * (openEnds == 2 ? 100 : 10);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return score;
|
||||||
|
}
|
||||||
|
}
|
11
Assets/Script/AI/MiniMaxAIController.cs.meta
Normal file
11
Assets/Script/AI/MiniMaxAIController.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 0cabba9cae3792747bd277ecdc12196d
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
84
Assets/Script/AI/TestGameManager.cs
Normal file
84
Assets/Script/AI/TestGameManager.cs
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using TMPro;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.Serialization;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
|
||||||
|
public class TestGameManager : MonoBehaviour
|
||||||
|
{
|
||||||
|
[SerializeField] private TMP_InputField rowText;
|
||||||
|
[SerializeField] private TMP_InputField colText;
|
||||||
|
[SerializeField] private TMP_Text boardText;
|
||||||
|
|
||||||
|
private Enums.PlayerType[,] _board;
|
||||||
|
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
_board = new Enums.PlayerType[15, 15];
|
||||||
|
MiniMaxAIController.SetLevel(1); // 급수 설정 테스트
|
||||||
|
ResultBoard();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnClickGoButton()
|
||||||
|
{
|
||||||
|
int row = int.Parse(rowText.text);
|
||||||
|
int col = int.Parse(colText.text);
|
||||||
|
|
||||||
|
if (_board[row, col] != Enums.PlayerType.None)
|
||||||
|
{
|
||||||
|
Debug.Log("중복 위치");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
_board[row, col] = Enums.PlayerType.PlayerA;
|
||||||
|
Debug.Log($"Player's row: {row} col: {col}");
|
||||||
|
|
||||||
|
// var isEnded = MiniMaxAIController.CheckGameWin(Enums.PlayerType.PlayerA, _board, row, col);
|
||||||
|
// Debug.Log("PlayerA is Win: " + isEnded);
|
||||||
|
|
||||||
|
// 인공지능 호출
|
||||||
|
var result = MiniMaxAIController.GetBestMove(_board);
|
||||||
|
|
||||||
|
if (result.HasValue)
|
||||||
|
{
|
||||||
|
Debug.Log($"AI's row: {result.Value.row} col: {result.Value.col}");
|
||||||
|
_board[result.Value.row, result.Value.col] = Enums.PlayerType.PlayerB;
|
||||||
|
|
||||||
|
// isEnded = MiniMaxAIController.CheckGameWin(Enums.PlayerType.PlayerB, _board, result.Value.row, result.Value.col);
|
||||||
|
// Debug.Log("PlayerB is Win: " + isEnded);
|
||||||
|
}
|
||||||
|
|
||||||
|
ResultBoard();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ResultBoard()
|
||||||
|
{
|
||||||
|
boardText.text = "";
|
||||||
|
|
||||||
|
// player 타입에 따라 입력받는 건 무조건 A로 해서 A, AI는 B로 나타내고 None은 _
|
||||||
|
for (int i = 0; i < 15; i++)
|
||||||
|
{
|
||||||
|
for (int j = 0; j < 15; j++)
|
||||||
|
{
|
||||||
|
if (_board[i, j] == Enums.PlayerType.PlayerA)
|
||||||
|
{
|
||||||
|
boardText.text += 'A';
|
||||||
|
}
|
||||||
|
else if (_board[i, j] == Enums.PlayerType.PlayerB)
|
||||||
|
{
|
||||||
|
boardText.text += 'B';
|
||||||
|
}
|
||||||
|
else if (_board[i, j] == Enums.PlayerType.None)
|
||||||
|
{
|
||||||
|
boardText.text += '_';
|
||||||
|
}
|
||||||
|
|
||||||
|
boardText.text += ' ';
|
||||||
|
}
|
||||||
|
|
||||||
|
boardText.text += '\n';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
11
Assets/Script/AI/TestGameManager.cs.meta
Normal file
11
Assets/Script/AI/TestGameManager.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: facc79abb6042e846bb0a2b099b58e9c
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -8,5 +8,6 @@ public class Enums
|
|||||||
|
|
||||||
public enum StoneState{ None, Selected, Blocked, LastPositioned }
|
public enum StoneState{ None, Selected, Blocked, LastPositioned }
|
||||||
|
|
||||||
public enum GameType{ None, SinglePlay, MultiPlay, RePlay}
|
public enum GameType{ None, SinglePlay, MultiPlay, Replay }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -160,6 +160,7 @@ public class GameLogic : MonoBehaviour
|
|||||||
|
|
||||||
selectedRow = -1;
|
selectedRow = -1;
|
||||||
selectedCol = -1;
|
selectedCol = -1;
|
||||||
|
|
||||||
_lastRow = -1;
|
_lastRow = -1;
|
||||||
_lastCol = -1;
|
_lastCol = -1;
|
||||||
//timer 초기화
|
//timer 초기화
|
||||||
@ -170,15 +171,17 @@ public class GameLogic : MonoBehaviour
|
|||||||
{
|
{
|
||||||
if (currentTurn == Enums.PlayerType.PlayerA)
|
if (currentTurn == Enums.PlayerType.PlayerA)
|
||||||
{
|
{
|
||||||
GameManager.Instance.OpenConfirmPanel($"Game Over: {PlayerType.PlayerB} Win",() =>{});
|
GameManager.Instance.OpenConfirmPanel($"Game Over: {Enums.PlayerType.PlayerB} Win",() =>{});
|
||||||
EndGame();
|
EndGame();
|
||||||
}
|
}
|
||||||
else if (currentTurn == Enums.PlayerType.PlayerB)
|
else if (currentTurn == Enums.PlayerType.PlayerB)
|
||||||
{
|
{
|
||||||
GameManager.Instance.OpenConfirmPanel($"Game Over: {PlayerType.PlayerA} Win",() =>{});
|
GameManager.Instance.OpenConfirmPanel($"Game Over: {Enums.PlayerType.PlayerA} Win",() =>{});
|
||||||
EndGame();
|
EndGame();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
//TODO: 기보 매니저에게 플레이어 닉네임 넘겨주기
|
||||||
|
ReplayManager.Instance.InitReplayData("PlayerA","nicknameB");
|
||||||
|
|
||||||
switch (gameType)
|
switch (gameType)
|
||||||
{
|
{
|
||||||
@ -243,12 +246,16 @@ public class GameLogic : MonoBehaviour
|
|||||||
stoneController.SetStoneState(Enums.StoneState.LastPositioned, row, col);
|
stoneController.SetStoneState(Enums.StoneState.LastPositioned, row, col);
|
||||||
_board[row, col] = Enums.PlayerType.PlayerA;
|
_board[row, col] = Enums.PlayerType.PlayerA;
|
||||||
LastNSelectedSetting(row, col);
|
LastNSelectedSetting(row, col);
|
||||||
|
|
||||||
|
ReplayManager.Instance.RecordStonePlaced(Enums.StoneType.Black, row, col); //기보 데이터 저장
|
||||||
break;
|
break;
|
||||||
case Enums.PlayerType.PlayerB:
|
case Enums.PlayerType.PlayerB:
|
||||||
stoneController.SetStoneType(Enums.StoneType.White, row, col);
|
stoneController.SetStoneType(Enums.StoneType.White, row, col);
|
||||||
stoneController.SetStoneState(Enums.StoneState.LastPositioned, row, col);
|
stoneController.SetStoneState(Enums.StoneState.LastPositioned, row, col);
|
||||||
_board[row, col] = Enums.PlayerType.PlayerB;
|
_board[row, col] = Enums.PlayerType.PlayerB;
|
||||||
LastNSelectedSetting(row, col);
|
LastNSelectedSetting(row, col);
|
||||||
|
|
||||||
|
ReplayManager.Instance.RecordStonePlaced(Enums.StoneType.White, row, col);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ public class ReplayCell : MonoBehaviour
|
|||||||
[SerializeField] private TMP_Text recordDateText;
|
[SerializeField] private TMP_Text recordDateText;
|
||||||
|
|
||||||
private ReplayRecord _storedReplayRecord;
|
private ReplayRecord _storedReplayRecord;
|
||||||
private PlayerType _myPlayerType;
|
private Enums.PlayerType _myPlayerType;
|
||||||
private string _opponentNickname;
|
private string _opponentNickname;
|
||||||
|
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ public class ReplayCell : MonoBehaviour
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetMyPlayerType(PlayerType myPlayerType)
|
public void SetMyPlayerType(Enums.PlayerType myPlayerType)
|
||||||
{
|
{
|
||||||
_myPlayerType = myPlayerType;
|
_myPlayerType = myPlayerType;
|
||||||
}
|
}
|
||||||
|
@ -5,12 +5,6 @@ using System.IO;
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.SceneManagement;
|
using UnityEngine.SceneManagement;
|
||||||
|
|
||||||
|
|
||||||
//TODO: 테스트용, 게임로직과 머지시 삭제
|
|
||||||
public enum PlayerType{None, PlayerA, PlayerB}
|
|
||||||
public enum StoneType{None, White, Black}
|
|
||||||
|
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class ReplayRecord
|
public class ReplayRecord
|
||||||
{
|
{
|
||||||
@ -39,7 +33,59 @@ public class ReplayManager : Singleton<ReplayManager>
|
|||||||
{
|
{
|
||||||
private ReplayRecord _recordingReplayData;
|
private ReplayRecord _recordingReplayData;
|
||||||
|
|
||||||
|
#region 기보 시작 후 데이터를 컨트롤하기
|
||||||
|
|
||||||
|
private ReplayRecord _replayRecord;
|
||||||
|
|
||||||
|
//DO, Undo를 위한 스택
|
||||||
|
private Stack<Move> _placedStoneStack;
|
||||||
|
private Stack<Move> _undoStack;
|
||||||
|
private int _moveIndex;
|
||||||
|
|
||||||
|
|
||||||
|
public void InitReplayBoard(ReplayRecord replayRecord)
|
||||||
|
{
|
||||||
|
_replayRecord = replayRecord;
|
||||||
|
_moveIndex = 0;
|
||||||
|
|
||||||
|
_placedStoneStack = new Stack<Move>();
|
||||||
|
_undoStack = new Stack<Move>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Move GetNextMove()
|
||||||
|
{
|
||||||
|
if (_undoStack.Count > 0)
|
||||||
|
return _undoStack.Pop();
|
||||||
|
|
||||||
|
if(_moveIndex >= _replayRecord.moves.Count)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
Move move = _replayRecord.moves[_moveIndex];
|
||||||
|
_moveIndex++;
|
||||||
|
return move;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void PushMove(Move storedMove)
|
||||||
|
{
|
||||||
|
_placedStoneStack.Push(storedMove);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Move PopMove()
|
||||||
|
{
|
||||||
|
if (_placedStoneStack.Count == 0)
|
||||||
|
return null;
|
||||||
|
Move move = _placedStoneStack.Pop();
|
||||||
|
return move;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void PushUndoMove(Move storedMove)
|
||||||
|
{
|
||||||
|
_undoStack.Push(storedMove);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 게임 플레이중 기보 데이터 저장
|
||||||
///<summary>
|
///<summary>
|
||||||
/// 게임 시작에 호출해서 기보 데이터 초기화
|
/// 게임 시작에 호출해서 기보 데이터 초기화
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -53,7 +99,7 @@ public class ReplayManager : Singleton<ReplayManager>
|
|||||||
///<summary>
|
///<summary>
|
||||||
/// 게임 씬에서 착수를 할 때마다 호출해서 기록
|
/// 게임 씬에서 착수를 할 때마다 호출해서 기록
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void RecordStonePlaced(StoneType stoneType,int row, int col)
|
public void RecordStonePlaced(Enums.StoneType stoneType,int row, int col)
|
||||||
{
|
{
|
||||||
string stoneColor = stoneType.ToString();
|
string stoneColor = stoneType.ToString();
|
||||||
_recordingReplayData.moves.Add(new Move(stoneColor, row, col));
|
_recordingReplayData.moves.Add(new Move(stoneColor, row, col));
|
||||||
@ -63,7 +109,7 @@ public class ReplayManager : Singleton<ReplayManager>
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 게임 종료 후 호출하여 리플레이 데이터를 저장합니다.
|
/// 게임 종료 후 호출하여 리플레이 데이터를 저장합니다.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void SaveReplayData(PlayerType winnerPlayerType)
|
public void SaveReplayData(Enums.PlayerType winnerPlayerType)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -87,6 +133,7 @@ public class ReplayManager : Singleton<ReplayManager>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
//폴더내 기보 파일을 전부 읽어옵니다.
|
//폴더내 기보 파일을 전부 읽어옵니다.
|
||||||
public List<ReplayRecord> LoadReplayDatas()
|
public List<ReplayRecord> LoadReplayDatas()
|
||||||
@ -139,4 +186,18 @@ public class ReplayManager : Singleton<ReplayManager>
|
|||||||
protected override void OnSceneLoaded(Scene scene, LoadSceneMode mode)
|
protected override void OnSceneLoaded(Scene scene, LoadSceneMode mode)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region for tests
|
||||||
|
|
||||||
|
public void OnClickSaveButton(string winnerPlayerType = "PlayerA")
|
||||||
|
{
|
||||||
|
if(winnerPlayerType == Enums.PlayerType.PlayerA.ToString())
|
||||||
|
SaveReplayData(Enums.PlayerType.PlayerA);
|
||||||
|
else
|
||||||
|
SaveReplayData(Enums.PlayerType.PlayerB);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
|
@ -33,8 +33,8 @@ public class ReplayPanelController : MonoBehaviour
|
|||||||
var replayCellButtonObject = Instantiate(replayCellPrefab, contentTransform);
|
var replayCellButtonObject = Instantiate(replayCellPrefab, contentTransform);
|
||||||
ReplayCell replayCell = replayCellButtonObject.GetComponent<ReplayCell>();
|
ReplayCell replayCell = replayCellButtonObject.GetComponent<ReplayCell>();
|
||||||
|
|
||||||
PlayerType myPlayerType = _myNickname.Equals(replayRecord.playerA) ? PlayerType.PlayerA : PlayerType.PlayerB;
|
Enums.PlayerType myPlayerType = _myNickname.Equals(replayRecord.playerA) ? Enums.PlayerType.PlayerA : Enums.PlayerType.PlayerB;
|
||||||
string opponentNickname = myPlayerType==PlayerType.PlayerA ? replayRecord.playerB : replayRecord.playerA;
|
string opponentNickname = myPlayerType==Enums.PlayerType.PlayerA ? replayRecord.playerB : replayRecord.playerA;
|
||||||
|
|
||||||
replayCell.SetMyPlayerType(myPlayerType);
|
replayCell.SetMyPlayerType(myPlayerType);
|
||||||
replayCell.SetWinImage(myPlayerType.ToString().Equals(replayRecord.winnerPlayerType));
|
replayCell.SetWinImage(myPlayerType.ToString().Equals(replayRecord.winnerPlayerType));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user