Commit bfd1bdec authored by 18신대성's avatar 18신대성

clear status ui 에 이미지들 적용

parent 3e34c4b8
fileFormatVersion: 2
guid: 874af447cef689e478ca96b4d1d197c2
guid: 5e73c6a45a1ccfe468a00ba7a518d50e
PrefabImporter:
externalObjects: {}
userData:
......
fileFormatVersion: 2
guid: 76e083ffdf1cab14ea1c5b7824bd7ef7
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 10
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: -1
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: -1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 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: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
......@@ -154,8 +154,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d988d68782719aa48821116eae3f5a6d, type: 3}
m_Name:
m_EditorClassIdentifier:
clearUI: {fileID: 4890012631615838995, guid: 874af447cef689e478ca96b4d1d197c2, type: 3}
clearUIParent: {fileID: 1519023766}
clearUI: {fileID: 8216924603199657263, guid: 5e73c6a45a1ccfe468a00ba7a518d50e, type: 3}
clearUIParent: {fileID: 1928700961}
uiList: []
--- !u!114 &158856769
MonoBehaviour:
......@@ -230,8 +230,8 @@ RectTransform:
m_Children:
- {fileID: 1547091490}
- {fileID: 1015578411}
- {fileID: 1519023766}
- {fileID: 1607829338}
- {fileID: 1928700961}
- {fileID: 1839944656}
m_Father: {fileID: 0}
m_RootOrder: 8
......@@ -764,41 +764,6 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &1519023765
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1519023766}
m_Layer: 5
m_Name: ClearCondUIs
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1519023766
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1519023765}
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: 158856772}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 960, y: 540}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &1547091489
GameObject:
m_ObjectHideFlags: 0
......@@ -904,7 +869,7 @@ RectTransform:
- {fileID: 1745203030}
- {fileID: 2123597350}
m_Father: {fileID: 158856772}
m_RootOrder: 3
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
......@@ -946,8 +911,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: -860, y: 440}
m_SizeDelta: {x: 150, y: 150}
m_AnchoredPosition: {x: -900, y: 480}
m_SizeDelta: {x: 120, y: 120}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1745203031
MonoBehaviour:
......@@ -1059,7 +1024,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &1839944656
RectTransform:
m_ObjectHideFlags: 0
......@@ -1116,6 +1081,41 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1839944655}
m_CullTransparentMesh: 0
--- !u!1 &1928700960
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1928700961}
m_Layer: 5
m_Name: ClearStatusUIs
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1928700961
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1928700960}
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: 158856772}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 960, y: 540}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1994486390 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 2122327709, guid: 42247a938bb6e554eb00dc08303a72d6,
......@@ -1241,8 +1241,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: -860, y: -443}
m_SizeDelta: {x: 150, y: 150}
m_AnchoredPosition: {x: -900, y: -480}
m_SizeDelta: {x: 120, y: 120}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &2123597351
MonoBehaviour:
......
......@@ -7,14 +7,16 @@ public class ClearStatusUI : MonoBehaviour
{
[Header("gameobjects")]
public ClearCondition assignedCondition;
public Sprite emptyBox;
public Sprite fullBox;
public Sprite notCleared;
public Color notClearedTooltipColor;
public Color notClearedColor;
public Sprite whenCleared;
public Color clearColor;
[Header("inside")]
public Image condImage;
public Text tooltipText;
public Text slashText;
public Text goalText;
public Text statusText;
public Image doneImage;
public Text checkerText;
public Text counterText;
public void Init(ClearCondition condition, string tooltip)
{
......@@ -22,33 +24,53 @@ public class ClearStatusUI : MonoBehaviour
tooltipText.text = tooltip;
if (condition.type == ClearType.AllCase || condition.type == ClearType.AllFloor || condition.type == ClearType.AllTurret)
{
goalText.text = "";
statusText.text = "";
slashText.text = (assignedCondition.goal - assignedCondition.count).ToString();
checkerText.text = "잔여";
counterText.text = (condition.goal - condition.count).ToString();
}
else
{
goalText.text = assignedCondition.goal.ToString();
statusText.text = assignedCondition.count.ToString();
checkerText.text = "현재";
counterText.text = condition.count.ToString();
}
if (assignedCondition.isDone)
{
condImage.sprite = whenCleared;
tooltipText.color = clearColor;
checkerText.color = clearColor;
counterText.color = clearColor;
}
else
{
condImage.sprite = notCleared;
tooltipText.color = notClearedTooltipColor;
counterText.color = notClearedColor;
checkerText.color = notClearedColor;
}
if (assignedCondition.isDone) doneImage.sprite = fullBox;
else doneImage.sprite = emptyBox;
}
public void RefreshClearCondition()
{
if (assignedCondition.type == ClearType.AllCase || assignedCondition.type == ClearType.AllFloor || assignedCondition.type == ClearType.AllTurret)
{
goalText.text = "";
statusText.text = "";
slashText.text = (assignedCondition.goal - assignedCondition.count).ToString();
counterText.text = (assignedCondition.goal - assignedCondition.count).ToString();
}
else
{
counterText.text = assignedCondition.count.ToString();
}
if (assignedCondition.isDone)
{
condImage.sprite = whenCleared;
tooltipText.color = clearColor;
checkerText.color = clearColor;
counterText.color = clearColor;
}
else
{
goalText.text = assignedCondition.goal.ToString();
statusText.text = assignedCondition.count.ToString();
condImage.sprite = notCleared;
tooltipText.color = notClearedTooltipColor;
counterText.color = notClearedColor;
checkerText.color = notClearedColor;
}
if (assignedCondition.isDone) doneImage.sprite = fullBox;
else doneImage.sprite = emptyBox;
}
}
......@@ -8,8 +8,8 @@ public class ClearUIGenerator : MonoBehaviour
public Transform clearUIParent;
public List<GameObject> uiList;
private int nextx = -175;
private int nexty = -100;
private int nextx = -260;
private int nexty = -65;
// Start is called before the first frame update
public void GenerateAllClearUI()
......@@ -20,22 +20,22 @@ public class ClearUIGenerator : MonoBehaviour
uiList.Add(uiObject);
ClearStatusUI ui = uiObject.GetComponent<ClearStatusUI>();
ui.GetComponent<RectTransform>().anchoredPosition = new Vector2(nextx, nexty);
nexty -= 200;
nexty -= 110;
string str;
switch(cond.type)
{
case ClearType.NFloor:
str = "강조된 바닥에 올라서세요.";
str = "강조된 바닥중 "+ cond.goal +"개 이상에 올라서세요.";
break;
case ClearType.NTurret:
str = "카메라터렛을 파괴하세요.";
str = "카메라터렛을 "+ cond.goal +"개 이상 파괴하세요.";
break;
case ClearType.NCase:
str = "서류가방을 획득하세요.";
str = "서류가방을 "+ cond.goal +"개 이상 획득하세요.";
break;
case ClearType.NPlayer:
str = "캐릭터를 일정 수로 만드세요.";
str = "캐릭터를 "+ cond.goal +"명으로 만드세요.";
break;
case ClearType.AllFloor:
str = "모든 강조된 바닥에 올라서세요.";
......@@ -47,10 +47,10 @@ public class ClearUIGenerator : MonoBehaviour
str = "모든 서류가방을 획득하세요";
break;
case ClearType.White:
str = "흰 마네킹을 만드세요.";
str = "흰 마네킹을 " + cond.goal + "개로 만드세요.";
break;
case ClearType.Black:
str = "검은 마네킹을 만드세요.";
str = "검은 마네킹을 " + cond.goal + "개로 만드세요.";
break;
default:
str = "오류입니다.";
......@@ -69,6 +69,6 @@ public class ClearUIGenerator : MonoBehaviour
Destroy(uiList[i]);
uiList.RemoveAt(i);
}
nexty = -100;
nexty = -65;
}
}
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