Commit 6a181d66 authored by 16도재형's avatar 16도재형

Merge branch 'UI'

# Conflicts:
#	Assets/Prefabs/TetrisMap/TetriminoSpawner.prefab
#	Assets/Scenes/PlayScene.unity
#	Assets/Sprites.meta
parents 76f84d6b 5b4574a7
fileFormatVersion: 2
guid: 0d3757246f1cccb4e9f1e795dd10407c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
...@@ -9,45 +9,74 @@ Prefab: ...@@ -9,45 +9,74 @@ Prefab:
m_Modifications: [] m_Modifications: []
m_RemovedComponents: [] m_RemovedComponents: []
m_SourcePrefab: {fileID: 0} m_SourcePrefab: {fileID: 0}
m_RootGameObject: {fileID: 1375209437806044} m_RootGameObject: {fileID: 1322655041097828}
m_IsPrefabAsset: 1 m_IsPrefabAsset: 1
--- !u!1 &1375209437806044 --- !u!1 &1322655041097828
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000} m_PrefabInternal: {fileID: 100100000}
serializedVersion: 6 serializedVersion: 6
m_Component: m_Component:
- component: {fileID: 4731340437899790} - component: {fileID: 224014778143931040}
- component: {fileID: 114904264432509340} - component: {fileID: 222104465596639276}
m_Layer: 0 - component: {fileID: 114742953498515424}
m_Name: LifeCrystalUI m_Layer: 5
m_Name: LC
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 1 m_IsActive: 1
--- !u!4 &4731340437899790 --- !u!114 &114742953498515424
Transform: MonoBehaviour:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1322655041097828}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: 137b0e8d2160bab45893f33e02df312a, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
--- !u!222 &222104465596639276
CanvasRenderer:
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000} m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1375209437806044} m_GameObject: {fileID: 1322655041097828}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_CullTransparentMesh: 0
--- !u!224 &224014778143931040
RectTransform:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1322655041097828}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &114904264432509340 m_AnchorMin: {x: 0, y: 0}
MonoBehaviour: m_AnchorMax: {x: 0, y: 0}
m_ObjectHideFlags: 1 m_AnchoredPosition: {x: 0, y: 0}
m_CorrespondingSourceObject: {fileID: 0} m_SizeDelta: {x: 24, y: 24}
m_PrefabInternal: {fileID: 100100000} m_Pivot: {x: 0, y: 0}
m_GameObject: {fileID: 1375209437806044}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3a9b430bb1c39ea4e9820b5c6510da1f, type: 3}
m_Name:
m_EditorClassIdentifier:
fileFormatVersion: 2
guid: a413c94742056eb42a0fb2896e81d287
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_SourcePrefab: {fileID: 0}
m_RootGameObject: {fileID: 1702490942761452}
m_IsPrefabAsset: 1
--- !u!1 &1702490942761452
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 6
m_Component:
- component: {fileID: 4314497980557940}
- component: {fileID: 212836983556063948}
m_Layer: 0
m_Name: LC01
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4314497980557940
Transform:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1702490942761452}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 10, y: 10, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &212836983556063948
SpriteRenderer:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1702490942761452}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 4294967295
m_Materials:
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: 137b0e8d2160bab45893f33e02df312a, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 0.12, y: 0.12}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
fileFormatVersion: 2
guid: 65aea5b3c412c3443abb6931a7a0acf4
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
fileFormatVersion: 2
guid: ca7d9c696ba7ff24ea005093ae955d1a
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_SourcePrefab: {fileID: 0}
m_RootGameObject: {fileID: 1211859245884242}
m_IsPrefabAsset: 1
--- !u!1 &1211859245884242
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 6
m_Component:
- component: {fileID: 224350874834166432}
- component: {fileID: 222774389294574794}
- component: {fileID: 114744092900330078}
m_Layer: 5
m_Name: Row
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &114744092900330078
MonoBehaviour:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1211859245884242}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300008, guid: 0c2144d8f09991444a79e6880da13b8f, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
--- !u!222 &222774389294574794
CanvasRenderer:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1211859245884242}
m_CullTransparentMesh: 0
--- !u!224 &224350874834166432
RectTransform:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1211859245884242}
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_Children: []
m_Father: {fileID: 0}
m_RootOrder: 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: 64, y: 24}
m_Pivot: {x: 0, y: 0}
fileFormatVersion: 2
guid: 64e119a3b05f7e643a2873db8c703f88
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:
...@@ -2,13 +2,47 @@ ...@@ -2,13 +2,47 @@
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
public class LifeCrystal : MonoBehaviour { public class LifeCrystal : MonoBehaviour
{
/// <summary>
/// Integer array representation of LifeCrystal shape
/// <para/> First index: width, 0 on the left
/// <para/> Second index: height, o on the bottom
/// </summary>
public LifeCrystalUI.CellType[][] grid;
public int[][] grid;
/// <summary>
/// Initiaization
/// </summary>
void Start ()
{
int cellCount = transform.childCount;
LifeCrystalUI.CellType[][] gridCopy = new LifeCrystalUI.CellType[3][]
{
new LifeCrystalUI.CellType[3],
new LifeCrystalUI.CellType[3],
new LifeCrystalUI.CellType[3]
};
int maxX = 1, maxY = 1;
// Use this for initialization for(int i = 0; i < cellCount; i++)
void Start () { {
Transform cell = transform.GetChild(i);
Vector2Int cellPosition = new Vector2Int(Mathf.RoundToInt(cell.localPosition.x), Mathf.RoundToInt(cell.localPosition.y));
gridCopy[cellPosition.x][cellPosition.y] = LifeCrystalUI.CellType.Life;
if (maxX < cellPosition.x) maxX = cellPosition.x;
if (maxY < cellPosition.y) maxY = cellPosition.y;
}
grid = new LifeCrystalUI.CellType[maxX + 1][];
for (int i = 0; i <= maxX; i++)
{
grid[i] = new LifeCrystalUI.CellType[maxY + 1];
for (int j = 0; j <= maxY; j++)
{
grid[i][j] = gridCopy[i][j];
}
}
} }
......
This diff is collapsed.
fileFormatVersion: 2
guid: 0c2144d8f09991444a79e6880da13b8f
TextureImporter:
fileIDToRecycleName:
21300000: LifeCrystal Mold_0
21300002: LifeCrystal Mold_1
21300004: LifeCrystal Mold_2
21300006: LC Mold_0
21300008: LC Mold_1
21300010: LC Mold_2
externalObjects: {}
serializedVersion: 6
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 0
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 2
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites:
- serializedVersion: 2
name: LC Mold_0
rect:
serializedVersion: 2
x: 0
y: 24
width: 32
height: 12
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 128ab26cacbd51b4db5c1070a5caf159
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: LC Mold_1
rect:
serializedVersion: 2
x: 0
y: 12
width: 32
height: 12
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 2d5922a3fd758df4d9cb9e3571d9fb15
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: LC Mold_2
rect:
serializedVersion: 2
x: 0
y: 0
width: 32
height: 12
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: e8f18c3e6da7ce64cb99cd17b5d9be3b
vertices: []
indices:
edges: []
weights: []
outline: []
physicsShape: []
bones: []
spriteID: 8d50ca77c4c7b6c488d6a0a75cc0fe69
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 137b0e8d2160bab45893f33e02df312a
timeCreated: 1530887932
licenseType: Free
TextureImporter:
fileIDToRecycleName:
21300000: LC_0
21300002: LC_1
21300004: LC_2
serializedVersion: 4
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
filterMode: 0
aniso: -1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 2
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
- buildTarget: Standalone
maxTextureSize: 2048
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
spriteSheet:
serializedVersion: 2
sprites:
- serializedVersion: 2
name: LC_0
rect:
serializedVersion: 2
x: 0
y: 0
width: 12
height: 12
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
tessellationDetail: 0
- serializedVersion: 2
name: LC_1
rect:
serializedVersion: 2
x: 12
y: 0
width: 12
height: 12
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
tessellationDetail: 0
- serializedVersion: 2
name: LC_2
rect:
serializedVersion: 2
x: 24
y: 0
width: 12
height: 12
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
tessellationDetail: 0
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
...@@ -44,3 +44,6 @@ TagManager: ...@@ -44,3 +44,6 @@ TagManager:
- name: Default - name: Default
uniqueID: 0 uniqueID: 0
locked: 0 locked: 0
- name: UI
uniqueID: 4254909397
locked: 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment