DO-8 마무리 커밋
This commit is contained in:
parent
ab1c18827c
commit
c0d6640bea
File diff suppressed because it is too large
Load Diff
8
Assets/Script/Game/GameLogic.cs
Normal file
8
Assets/Script/Game/GameLogic.cs
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class GameLogic : MonoBehaviour
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
11
Assets/Script/Game/GameLogic.cs.meta
Normal file
11
Assets/Script/Game/GameLogic.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: f34cbc5640f70db43b2be504a612ed83
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -20,12 +20,7 @@ public class Stone : MonoBehaviour
|
|||||||
_spriteRenderer = GetComponent<SpriteRenderer>();
|
_spriteRenderer = GetComponent<SpriteRenderer>();
|
||||||
}
|
}
|
||||||
|
|
||||||
// private void Start()
|
//Stone 초기화 함수
|
||||||
// {
|
|
||||||
// SetStone(Enums.StoneType.Black);
|
|
||||||
// SetState(Enums.StoneState.Selected);
|
|
||||||
// }
|
|
||||||
|
|
||||||
public void InitStone(int stoneIndex, OnStoneClicked onStoneClicked)
|
public void InitStone(int stoneIndex, OnStoneClicked onStoneClicked)
|
||||||
{
|
{
|
||||||
_index = stoneIndex;
|
_index = stoneIndex;
|
||||||
@ -34,6 +29,7 @@ public class Stone : MonoBehaviour
|
|||||||
_onStoneClicked = onStoneClicked;
|
_onStoneClicked = onStoneClicked;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Stone 이미지 설정 함수(0: 없음, 1:흑, 2: 백)
|
||||||
public void SetStone(Enums.StoneType stoneType)
|
public void SetStone(Enums.StoneType stoneType)
|
||||||
{
|
{
|
||||||
switch (stoneType)
|
switch (stoneType)
|
||||||
@ -50,6 +46,7 @@ public class Stone : MonoBehaviour
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Stone 상태 이미지 설정 함수 (0: 없음, 1: 선택된, 2: 금수, 3: 마지막 배치된)
|
||||||
public void SetState(Enums.StoneState stoneState)
|
public void SetState(Enums.StoneState stoneState)
|
||||||
{
|
{
|
||||||
switch (stoneState)
|
switch (stoneState)
|
||||||
|
@ -6,18 +6,26 @@ using UnityEngine;
|
|||||||
public class StoneController : MonoBehaviour
|
public class StoneController : MonoBehaviour
|
||||||
{
|
{
|
||||||
[SerializeField] private Stone[] stone;
|
[SerializeField] private Stone[] stone;
|
||||||
|
private delegate void OnStoneClicked(int row, int col);
|
||||||
|
private OnStoneClicked _onStoneClickedDelegate;
|
||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
InitStones();
|
InitStones();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Stone 객체들 초기화 함수 호출
|
||||||
private void InitStones()
|
private void InitStones()
|
||||||
{
|
{
|
||||||
for (int i = 0; i < stone.Length; i++)
|
for (int i = 0; i < stone.Length; i++)
|
||||||
{
|
{
|
||||||
stone[i].InitStone(i, (index) =>
|
stone[i].InitStone(i, (index) =>
|
||||||
{
|
{
|
||||||
|
var rowIndex = index / 15;
|
||||||
|
var colIndex = index % 15;
|
||||||
|
_onStoneClickedDelegate?.Invoke(rowIndex, colIndex);
|
||||||
|
|
||||||
|
//임시 확인 코드
|
||||||
stone[index].SetStone(Enums.StoneType.White);
|
stone[index].SetStone(Enums.StoneType.White);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
"com.unity.feature.2d": "2.0.1",
|
"com.unity.feature.2d": "2.0.1",
|
||||||
"com.unity.ide.rider": "3.0.34",
|
"com.unity.ide.rider": "3.0.34",
|
||||||
"com.unity.ide.visualstudio": "2.0.22",
|
"com.unity.ide.visualstudio": "2.0.22",
|
||||||
|
"com.unity.recorder": "4.0.3",
|
||||||
"com.unity.test-framework": "1.1.33",
|
"com.unity.test-framework": "1.1.33",
|
||||||
"com.unity.textmeshpro": "3.0.7",
|
"com.unity.textmeshpro": "3.0.7",
|
||||||
"com.unity.timeline": "1.7.6",
|
"com.unity.timeline": "1.7.6",
|
||||||
|
@ -168,6 +168,15 @@
|
|||||||
"dependencies": {},
|
"dependencies": {},
|
||||||
"url": "https://packages.unity.com"
|
"url": "https://packages.unity.com"
|
||||||
},
|
},
|
||||||
|
"com.unity.recorder": {
|
||||||
|
"version": "4.0.3",
|
||||||
|
"depth": 0,
|
||||||
|
"source": "registry",
|
||||||
|
"dependencies": {
|
||||||
|
"com.unity.timeline": "1.0.0"
|
||||||
|
},
|
||||||
|
"url": "https://packages.unity.com"
|
||||||
|
},
|
||||||
"com.unity.test-framework": {
|
"com.unity.test-framework": {
|
||||||
"version": "1.1.33",
|
"version": "1.1.33",
|
||||||
"depth": 0,
|
"depth": 0,
|
||||||
|
@ -3,14 +3,16 @@
|
|||||||
--- !u!159 &1
|
--- !u!159 &1
|
||||||
EditorSettings:
|
EditorSettings:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
serializedVersion: 11
|
serializedVersion: 12
|
||||||
m_SerializationMode: 2
|
m_SerializationMode: 2
|
||||||
m_LineEndingsForNewScripts: 0
|
m_LineEndingsForNewScripts: 0
|
||||||
m_DefaultBehaviorMode: 1
|
m_DefaultBehaviorMode: 1
|
||||||
m_PrefabRegularEnvironment: {fileID: 0}
|
m_PrefabRegularEnvironment: {fileID: 0}
|
||||||
m_PrefabUIEnvironment: {fileID: 0}
|
m_PrefabUIEnvironment: {fileID: 0}
|
||||||
m_SpritePackerMode: 5
|
m_SpritePackerMode: 5
|
||||||
|
m_SpritePackerCacheSize: 10
|
||||||
m_SpritePackerPaddingPower: 1
|
m_SpritePackerPaddingPower: 1
|
||||||
|
m_Bc7TextureCompressor: 0
|
||||||
m_EtcTextureCompressorBehavior: 1
|
m_EtcTextureCompressorBehavior: 1
|
||||||
m_EtcTextureFastCompressor: 1
|
m_EtcTextureFastCompressor: 1
|
||||||
m_EtcTextureNormalCompressor: 2
|
m_EtcTextureNormalCompressor: 2
|
||||||
@ -19,18 +21,20 @@ EditorSettings:
|
|||||||
m_ProjectGenerationRootNamespace:
|
m_ProjectGenerationRootNamespace:
|
||||||
m_EnableTextureStreamingInEditMode: 1
|
m_EnableTextureStreamingInEditMode: 1
|
||||||
m_EnableTextureStreamingInPlayMode: 1
|
m_EnableTextureStreamingInPlayMode: 1
|
||||||
|
m_EnableEditorAsyncCPUTextureLoading: 0
|
||||||
m_AsyncShaderCompilation: 1
|
m_AsyncShaderCompilation: 1
|
||||||
m_CachingShaderPreprocessor: 1
|
|
||||||
m_PrefabModeAllowAutoSave: 1
|
m_PrefabModeAllowAutoSave: 1
|
||||||
m_EnterPlayModeOptionsEnabled: 0
|
m_EnterPlayModeOptionsEnabled: 0
|
||||||
m_EnterPlayModeOptions: 3
|
m_EnterPlayModeOptions: 3
|
||||||
m_GameObjectNamingDigits: 1
|
m_GameObjectNamingDigits: 1
|
||||||
m_GameObjectNamingScheme: 0
|
m_GameObjectNamingScheme: 0
|
||||||
m_AssetNamingUsesSpace: 1
|
m_AssetNamingUsesSpace: 1
|
||||||
|
m_InspectorUseIMGUIDefaultInspector: 0
|
||||||
m_UseLegacyProbeSampleCount: 0
|
m_UseLegacyProbeSampleCount: 0
|
||||||
m_SerializeInlineMappingsOnOneLine: 1
|
m_SerializeInlineMappingsOnOneLine: 1
|
||||||
m_DisableCookiesInLightmapper: 1
|
m_DisableCookiesInLightmapper: 1
|
||||||
m_AssetPipelineMode: 1
|
m_AssetPipelineMode: 1
|
||||||
|
m_RefreshImportMode: 0
|
||||||
m_CacheServerMode: 0
|
m_CacheServerMode: 0
|
||||||
m_CacheServerEndpoint:
|
m_CacheServerEndpoint:
|
||||||
m_CacheServerNamespacePrefix: default
|
m_CacheServerNamespacePrefix: default
|
||||||
@ -38,3 +42,6 @@ EditorSettings:
|
|||||||
m_CacheServerEnableUpload: 1
|
m_CacheServerEnableUpload: 1
|
||||||
m_CacheServerEnableAuth: 0
|
m_CacheServerEnableAuth: 0
|
||||||
m_CacheServerEnableTls: 0
|
m_CacheServerEnableTls: 0
|
||||||
|
m_CacheServerValidationMode: 2
|
||||||
|
m_CacheServerDownloadBatchSize: 128
|
||||||
|
m_EnableEnlightenBakedGI: 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user