Commit 90a0a3ed authored by 18신대성's avatar 18신대성

거울 관련 오류들 싸그리 수정

parent c7e03029
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Blue
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
fileFormatVersion: 2
guid: c8405e0f3c417fe4fa15f60f16eceda4
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:
......@@ -158,7 +158,7 @@ Transform:
m_GameObject: {fileID: 5218482813292233953}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0.6, z: 0}
m_LocalScale: {x: 1, y: 1, z: 0.01}
m_LocalScale: {x: 1, y: 0.95, z: 0.01}
m_Children: []
m_Father: {fileID: 1244481854748242454}
m_RootOrder: 2
......@@ -188,7 +188,7 @@ MeshRenderer:
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 36f9d35b500106b42b6a47c516bf7b38, type: 2}
- {fileID: 2100000, guid: c8405e0f3c417fe4fa15f60f16eceda4, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
......
......@@ -261,7 +261,8 @@ public class Map : MonoBehaviour
{
if (objectGrid.ContainsKey(pos))
{
switch(objectGrid[pos].GetType())
//Debug.Log(pos + " Remove Obj, " + objectGrid[pos].GetType());
switch (objectGrid[pos].GetType())
{
case ObjType.Camera:
if (GameManager.aTurret >= 0)
......
......@@ -96,7 +96,12 @@ public class Mirror : Wall, IBulletInteractor, IBreakable
Wall wallAtPos = MapManager.inst.currentMap.GetWallAtPos(wallPos);
if (wallAtPos != null) // have wall at wallpos
{
// create wall
if (MapManager.inst.currentMap.wallGrid.ContainsKey(oppWallPos) && wallAtPos.type == WallType.Mirror) // change to Mirror
{
MapManager.inst.currentMap.ChangeToMirror(oppWallPos);
}
else // create wall
{
Pair wallPair = new Pair(PointToParRay(stPos, wallAtPos.ldPos, true), PointToParRay(stPos, wallAtPos.rdPos, true));
if (wallPair.l > wallPair.r) wallPair = wallPair.Swap();
......@@ -106,6 +111,7 @@ public class Mirror : Wall, IBulletInteractor, IBreakable
SubtractRay(parRay, wallPair);
}
}
}
else if (MapManager.inst.currentMap.GetWallAtPos(oppWallPos) != null) // no wall at wallPos but have at opposite
{
// remove wall
......@@ -124,7 +130,12 @@ public class Mirror : Wall, IBulletInteractor, IBreakable
Wall wallAtPos = MapManager.inst.currentMap.GetWallAtPos(wallPos);
if (wallAtPos != null) // have wall at wallpos
{
// create wall
if (MapManager.inst.currentMap.wallGrid.ContainsKey(oppWallPos) && wallAtPos.type == WallType.Mirror) // change to Mirror
{
MapManager.inst.currentMap.ChangeToMirror(oppWallPos);
}
else // create wall
{
Pair wallPair = new Pair(PointToParRay(stPos, wallAtPos.ldPos, true), PointToParRay(stPos, wallAtPos.rdPos, true));
if (wallPair.l > wallPair.r) wallPair = wallPair.Swap();
......@@ -134,6 +145,7 @@ public class Mirror : Wall, IBulletInteractor, IBreakable
SubtractRay(parRay, wallPair);
}
}
}
else if (MapManager.inst.currentMap.GetWallAtPos(oppWallPos) != null) // no wall at wallPos but have at opposite
{
// remove wall
......@@ -152,7 +164,7 @@ public class Mirror : Wall, IBulletInteractor, IBreakable
if (floor != null)
{
//Debug.Log(oppFloorPos);
if (IsInRay(parRay, PointToParRay(stPos, floor.mapPos, true)))
if (floorCountGrid[floor.mapPos] == 0 && IsInRay(parRay, PointToParRay(stPos, floor.mapPos, true)))
{
floorCountGrid[floor.mapPos] = 1;
}
......@@ -186,7 +198,7 @@ public class Mirror : Wall, IBulletInteractor, IBreakable
if (floor != null)
{
//Debug.Log(oppFloorPos);
if (IsInRay(parRay, PointToParRay(stPos, floor.mapPos, true)))
if (floorCountGrid[floor.mapPos] == 0 && IsInRay(parRay, PointToParRay(stPos, floor.mapPos, true)))
{
floorCountGrid[floor.mapPos] = 1;
}
......@@ -220,7 +232,7 @@ public class Mirror : Wall, IBulletInteractor, IBreakable
if (floor != null)
{
//Debug.Log(oppFloorPos);
if (IsInRay(parRay, PointToParRay(stPos, floor.mapPos, true)))
if (floorCountGrid[floor.mapPos] == 0 && IsInRay(parRay, PointToParRay(stPos, floor.mapPos, true)))
{
floorCountGrid[floor.mapPos] = 1;
}
......@@ -254,7 +266,7 @@ public class Mirror : Wall, IBulletInteractor, IBreakable
if (floor != null)
{
//Debug.Log(oppFloorPos);
if (IsInRay(parRay, PointToParRay(stPos, floor.mapPos, true)))
if (floorCountGrid[floor.mapPos] == 0 && IsInRay(parRay, PointToParRay(stPos, floor.mapPos, true)))
{
floorCountGrid[floor.mapPos] = 1;
}
......
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