Commit 3abc3364 authored by 18손재민's avatar 18손재민

마네킹 관련 승리조건 문제 수정, 머지 완료

parent 5b918985
......@@ -79,7 +79,7 @@ Light:
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 15671
m_Bits: 4294967295
m_RenderingLayerMask: 1
m_Lightmapping: 4
m_LightShadowCasterMode: 0
......@@ -170,7 +170,7 @@ Light:
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 15671
m_Bits: 4294967295
m_RenderingLayerMask: 1
m_Lightmapping: 4
m_LightShadowCasterMode: 0
......@@ -520,7 +520,7 @@ Light:
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 15671
m_Bits: 4294967295
m_RenderingLayerMask: 1
m_Lightmapping: 4
m_LightShadowCasterMode: 0
......@@ -611,7 +611,7 @@ Light:
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 15671
m_Bits: 4294967295
m_RenderingLayerMask: 1
m_Lightmapping: 4
m_LightShadowCasterMode: 0
......
......@@ -77,8 +77,11 @@ public class Mannequin : MonoBehaviour, IObject, IBulletInteractor
{
Color = isWhite ? Color.white : Color.black;
this.isWhite = isWhite;
if (GameManager.white >= 0 && isWhite) MapManager.inst.currentMap.clearConditions[GameManager.white].IsDone(1);
if (GameManager.black >= 0 && !isWhite) MapManager.inst.currentMap.clearConditions[GameManager.black].IsDone(1);
if (GameManager.black >= 0 && !isWhite)
{
MapManager.inst.currentMap.clearConditions[GameManager.black].count++;
if (GameManager.white >= 0) MapManager.inst.currentMap.clearConditions[GameManager.white].count--;
}
}
#region IObject Override
......
......@@ -81,6 +81,19 @@ public class MapManager : SingletonBehaviour<MapManager>
GameManager.inst.SetClearIndex(currentMap);
surface.BuildNavMesh();
GameManager.inst.uiGenerator.GenerateAllClearUI();
foreach(Transform child in currentMap.objects.transform)
{
if (child.GetComponent<IObject>() is Mannequin)
{
if(child.GetComponent<Mannequin>().isWhite && GameManager.white >= 0)
currentMap.clearConditions[GameManager.white].IsDone(1);
if (!child.GetComponent<Mannequin>().isWhite && GameManager.black >= 0)
currentMap.clearConditions[GameManager.black].IsDone(1);
}
}
for (int i = 0; i < currentMap.startFloors.Count; i++)
PlayerController.inst.CreatePlayer(currentMap.startFloors[i]);
for (int i = 0; i < loadedMapData.bullets.Count; i++)
......
......@@ -24,20 +24,18 @@ public class ClearCondition
{
count += _count;
goal += _goal;
if (goal <= count)
assignedClearUI.RefreshClearCondition();
if (goal <= count && !isDone)
{
GameManager.inst.clearCounter--;
isDone = true;
Debug.Log(GameManager.inst.clearCounter);
assignedClearUI.RefreshClearCondition();
if (GameManager.inst.clearCounter == 0)
GameManager.inst.StartCoroutine(GameManager.inst.ClearStage());
}
else if (goal > count && isDone)
else if (goal > count)
{
GameManager.inst.clearCounter++;
isDone = false;
assignedClearUI.RefreshClearCondition();
}
}
}
......
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