Commit 945310ae authored by 18신대성's avatar 18신대성

거울 안정화

parent f7ce5f51
...@@ -23,7 +23,6 @@ public abstract class Bullet : MonoBehaviour ...@@ -23,7 +23,6 @@ public abstract class Bullet : MonoBehaviour
{ {
col.GetComponent<Mirror>().StartCopy(); col.GetComponent<Mirror>().StartCopy();
yield return new WaitForSeconds(_time); yield return new WaitForSeconds(_time);
col.GetComponent<Mirror>().doReflect = true;
OnTriggerEnter(col); OnTriggerEnter(col);
} }
else else
......
...@@ -24,6 +24,7 @@ public class Mirror : Wall, IBulletInteractor, IBreakable ...@@ -24,6 +24,7 @@ public class Mirror : Wall, IBulletInteractor, IBreakable
{ {
if (bullet is FakeBullet) if (bullet is FakeBullet)
{ {
doReflect = true;
//Debug.Log("ldPos: " + ldPos + ", rdPos: " + rdPos + ", dir: " + dir); //Debug.Log("ldPos: " + ldPos + ", rdPos: " + rdPos + ", dir: " + dir);
// Make reflected objects // Make reflected objects
} }
...@@ -248,7 +249,9 @@ public class Mirror : Wall, IBulletInteractor, IBreakable ...@@ -248,7 +249,9 @@ public class Mirror : Wall, IBulletInteractor, IBreakable
} }
if (parRay.Count == 0) break; if (parRay.Count == 0) break;
} }
yield return new WaitUntil(() => doReflect);
while (!doReflect) yield return null;
// copy floors // copy floors
foreach (var floorCount in floorCountGrid) foreach (var floorCount in floorCountGrid)
{ {
......
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