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

민근이 오류 해결 (사이드에서 거짓탄쏘면 바로앞바닥 복사 안되는ㄱ거

parent 2598cd3e
......@@ -79,6 +79,19 @@ public class Mirror : Wall, IBulletInteractor, IBreakable
int minMapRange = -1 * MapManager.inst.currentMap.maxMapSize - 1;
int maxMapRange = MapManager.inst.currentMap.maxMapSize + 1;
// start reflection
Vector2Int frontFloorPos = dir ?
new Vector2Int(Mathf.RoundToInt(mapPos.x), Mathf.RoundToInt(mapPos.y + 0.5f * side))
: new Vector2Int(Mathf.RoundToInt(mapPos.x + 0.5f * side), Mathf.RoundToInt(mapPos.y));
int frontFloorCount = 0;
if (floorCountGrid.TryGetValue(frontFloorPos, out frontFloorCount))
{
if (frontFloorCount == 0) floorCountGrid[frontFloorPos]++; // have floor
}
else // no floor on there
{
floorCountGrid.Add(frontFloorPos, -1);
}
for (; Mathf.Abs(i) < maxMapRange; i += side)
{
// check walls and copy
......
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