Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
man-in-the-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
4
Issues
4
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MIM
man-in-the-mirror
Commits
90a0a3ed
Commit
90a0a3ed
authored
Aug 05, 2019
by
18신대성
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
거울 관련 오류들 싸그리 수정
parent
c7e03029
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
119 additions
and
21 deletions
+119
-21
Blue.mat
Assets/Models/Materials/Blue.mat
+77
-0
Blue.mat.meta
Assets/Models/Materials/Blue.mat.meta
+8
-0
mirror.prefab
Assets/Prefabs/MapObjects/mirror.prefab
+2
-2
Map.cs
Assets/Scripts/Map/Map.cs
+2
-1
Mirror.cs
Assets/Scripts/Map/Mirror.cs
+30
-18
No files found.
Assets/Models/Materials/Blue.mat
0 → 100644
View file @
90a0a3ed
%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
}
Assets/Models/Materials/Blue.mat.meta
0 → 100644
View file @
90a0a3ed
fileFormatVersion: 2
guid: c8405e0f3c417fe4fa15f60f16eceda4
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:
Assets/Prefabs/MapObjects/mirror.prefab
View file @
90a0a3ed
...
@@ -158,7 +158,7 @@ Transform:
...
@@ -158,7 +158,7 @@ Transform:
m_GameObject
:
{
fileID
:
5218482813292233953
}
m_GameObject
:
{
fileID
:
5218482813292233953
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
0.6
,
z
:
0
}
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_Children
:
[]
m_Father
:
{
fileID
:
1244481854748242454
}
m_Father
:
{
fileID
:
1244481854748242454
}
m_RootOrder
:
2
m_RootOrder
:
2
...
@@ -188,7 +188,7 @@ MeshRenderer:
...
@@ -188,7 +188,7 @@ MeshRenderer:
m_RenderingLayerMask
:
1
m_RenderingLayerMask
:
1
m_RendererPriority
:
0
m_RendererPriority
:
0
m_Materials
:
m_Materials
:
-
{
fileID
:
2100000
,
guid
:
36f9d35b500106b42b6a47c516bf7b38
,
type
:
2
}
-
{
fileID
:
2100000
,
guid
:
c8405e0f3c417fe4fa15f60f16eceda4
,
type
:
2
}
m_StaticBatchInfo
:
m_StaticBatchInfo
:
firstSubMesh
:
0
firstSubMesh
:
0
subMeshCount
:
0
subMeshCount
:
0
...
...
Assets/Scripts/Map/Map.cs
View file @
90a0a3ed
...
@@ -261,7 +261,8 @@ public class Map : MonoBehaviour
...
@@ -261,7 +261,8 @@ public class Map : MonoBehaviour
{
{
if
(
objectGrid
.
ContainsKey
(
pos
))
if
(
objectGrid
.
ContainsKey
(
pos
))
{
{
switch
(
objectGrid
[
pos
].
GetType
())
//Debug.Log(pos + " Remove Obj, " + objectGrid[pos].GetType());
switch
(
objectGrid
[
pos
].
GetType
())
{
{
case
ObjType
.
Camera
:
case
ObjType
.
Camera
:
if
(
GameManager
.
aTurret
>=
0
)
if
(
GameManager
.
aTurret
>=
0
)
...
...
Assets/Scripts/Map/Mirror.cs
View file @
90a0a3ed
...
@@ -96,14 +96,20 @@ public class Mirror : Wall, IBulletInteractor, IBreakable
...
@@ -96,14 +96,20 @@ public class Mirror : Wall, IBulletInteractor, IBreakable
Wall
wallAtPos
=
MapManager
.
inst
.
currentMap
.
GetWallAtPos
(
wallPos
);
Wall
wallAtPos
=
MapManager
.
inst
.
currentMap
.
GetWallAtPos
(
wallPos
);
if
(
wallAtPos
!=
null
)
// have wall at wallpos
if
(
wallAtPos
!=
null
)
// have wall at wallpos
{
{
// create wall
if
(
MapManager
.
inst
.
currentMap
.
wallGrid
.
ContainsKey
(
oppWallPos
)
&&
wallAtPos
.
type
==
WallType
.
Mirror
)
// change to Mirror
Pair
wallPair
=
new
Pair
(
PointToParRay
(
stPos
,
wallAtPos
.
ldPos
,
true
),
PointToParRay
(
stPos
,
wallAtPos
.
rdPos
,
true
));
{
if
(
wallPair
.
l
>
wallPair
.
r
)
wallPair
=
wallPair
.
Swap
(
);
MapManager
.
inst
.
currentMap
.
ChangeToMirror
(
oppWallPos
);
}
if
(
IsInRay
(
parRay
,
wallPair
))
else
// create wall
{
{
MapManager
.
inst
.
currentMap
.
CreateWall
(
oppWallPos
,
wallAtPos
.
type
);
Pair
wallPair
=
new
Pair
(
PointToParRay
(
stPos
,
wallAtPos
.
ldPos
,
true
),
PointToParRay
(
stPos
,
wallAtPos
.
rdPos
,
true
));
SubtractRay
(
parRay
,
wallPair
);
if
(
wallPair
.
l
>
wallPair
.
r
)
wallPair
=
wallPair
.
Swap
();
if
(
IsInRay
(
parRay
,
wallPair
))
{
MapManager
.
inst
.
currentMap
.
CreateWall
(
oppWallPos
,
wallAtPos
.
type
);
SubtractRay
(
parRay
,
wallPair
);
}
}
}
}
}
else
if
(
MapManager
.
inst
.
currentMap
.
GetWallAtPos
(
oppWallPos
)
!=
null
)
// no wall at wallPos but have at opposite
else
if
(
MapManager
.
inst
.
currentMap
.
GetWallAtPos
(
oppWallPos
)
!=
null
)
// no wall at wallPos but have at opposite
...
@@ -124,14 +130,20 @@ public class Mirror : Wall, IBulletInteractor, IBreakable
...
@@ -124,14 +130,20 @@ public class Mirror : Wall, IBulletInteractor, IBreakable
Wall
wallAtPos
=
MapManager
.
inst
.
currentMap
.
GetWallAtPos
(
wallPos
);
Wall
wallAtPos
=
MapManager
.
inst
.
currentMap
.
GetWallAtPos
(
wallPos
);
if
(
wallAtPos
!=
null
)
// have wall at wallpos
if
(
wallAtPos
!=
null
)
// have wall at wallpos
{
{
// create wall
if
(
MapManager
.
inst
.
currentMap
.
wallGrid
.
ContainsKey
(
oppWallPos
)
&&
wallAtPos
.
type
==
WallType
.
Mirror
)
// change to Mirror
Pair
wallPair
=
new
Pair
(
PointToParRay
(
stPos
,
wallAtPos
.
ldPos
,
true
),
PointToParRay
(
stPos
,
wallAtPos
.
rdPos
,
true
));
{
if
(
wallPair
.
l
>
wallPair
.
r
)
wallPair
=
wallPair
.
Swap
(
);
MapManager
.
inst
.
currentMap
.
ChangeToMirror
(
oppWallPos
);
}
if
(
IsInRay
(
parRay
,
wallPair
))
else
// create wall
{
{
MapManager
.
inst
.
currentMap
.
CreateWall
(
oppWallPos
,
wallAtPos
.
type
);
Pair
wallPair
=
new
Pair
(
PointToParRay
(
stPos
,
wallAtPos
.
ldPos
,
true
),
PointToParRay
(
stPos
,
wallAtPos
.
rdPos
,
true
));
SubtractRay
(
parRay
,
wallPair
);
if
(
wallPair
.
l
>
wallPair
.
r
)
wallPair
=
wallPair
.
Swap
();
if
(
IsInRay
(
parRay
,
wallPair
))
{
MapManager
.
inst
.
currentMap
.
CreateWall
(
oppWallPos
,
wallAtPos
.
type
);
SubtractRay
(
parRay
,
wallPair
);
}
}
}
}
}
else
if
(
MapManager
.
inst
.
currentMap
.
GetWallAtPos
(
oppWallPos
)
!=
null
)
// no wall at wallPos but have at opposite
else
if
(
MapManager
.
inst
.
currentMap
.
GetWallAtPos
(
oppWallPos
)
!=
null
)
// no wall at wallPos but have at opposite
...
@@ -152,7 +164,7 @@ public class Mirror : Wall, IBulletInteractor, IBreakable
...
@@ -152,7 +164,7 @@ public class Mirror : Wall, IBulletInteractor, IBreakable
if
(
floor
!=
null
)
if
(
floor
!=
null
)
{
{
//Debug.Log(oppFloorPos);
//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
;
floorCountGrid
[
floor
.
mapPos
]
=
1
;
}
}
...
@@ -186,7 +198,7 @@ public class Mirror : Wall, IBulletInteractor, IBreakable
...
@@ -186,7 +198,7 @@ public class Mirror : Wall, IBulletInteractor, IBreakable
if
(
floor
!=
null
)
if
(
floor
!=
null
)
{
{
//Debug.Log(oppFloorPos);
//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
;
floorCountGrid
[
floor
.
mapPos
]
=
1
;
}
}
...
@@ -220,7 +232,7 @@ public class Mirror : Wall, IBulletInteractor, IBreakable
...
@@ -220,7 +232,7 @@ public class Mirror : Wall, IBulletInteractor, IBreakable
if
(
floor
!=
null
)
if
(
floor
!=
null
)
{
{
//Debug.Log(oppFloorPos);
//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
;
floorCountGrid
[
floor
.
mapPos
]
=
1
;
}
}
...
@@ -254,7 +266,7 @@ public class Mirror : Wall, IBulletInteractor, IBreakable
...
@@ -254,7 +266,7 @@ public class Mirror : Wall, IBulletInteractor, IBreakable
if
(
floor
!=
null
)
if
(
floor
!=
null
)
{
{
//Debug.Log(oppFloorPos);
//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
;
floorCountGrid
[
floor
.
mapPos
]
=
1
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment