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
cb38d222
Commit
cb38d222
authored
May 27, 2019
by
18신대성
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bullet 다 작동함
캐릭터가 총 쏘는 위치 맞췄음
parent
18cdb90b
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
154 additions
and
49 deletions
+154
-49
Mirror.mat
Assets/Models/Materials/Mirror.mat
+10
-9
TruthBullet.prefab
Assets/Prefabs/Bullets/TruthBullet.prefab
+1
-1
jackson.prefab
Assets/Prefabs/MapObjects/jackson.prefab
+1
-0
mirror.prefab
Assets/Prefabs/MapObjects/mirror.prefab
+25
-15
wall.prefab
Assets/Prefabs/MapObjects/wall.prefab
+2
-1
ModelScene.meta
Assets/Scenes/ModelScene.meta
+8
-0
ModelScene.unity
Assets/Scenes/ModelScene.unity
+69
-0
SampleScene.unity
Assets/Scenes/SampleScene.unity
+3
-17
TruthBullet.cs
Assets/Scripts/Bullets/TruthBullet.cs
+1
-0
Map.cs
Assets/Scripts/Map/Map.cs
+31
-0
NormalWall.cs
Assets/Scripts/Map/NormalWall.cs
+1
-6
Player.cs
Assets/Scripts/Player.cs
+2
-0
No files found.
Assets/Models/Materials/Mirror.mat
View file @
cb38d222
...
...
@@ -9,12 +9,13 @@ Material:
m_PrefabAsset
:
{
fileID
:
0
}
m_Name
:
Mirror
m_Shader
:
{
fileID
:
46
,
guid
:
0000000000000000f000000000000000
,
type
:
0
}
m_ShaderKeywords
:
m_ShaderKeywords
:
_ALPHAPREMULTIPLY_ON
m_LightmapFlags
:
4
m_EnableInstancingVariants
:
0
m_DoubleSidedGI
:
0
m_CustomRenderQueue
:
-1
stringTagMap
:
{}
m_CustomRenderQueue
:
3000
stringTagMap
:
RenderType
:
Transparent
disabledShaderPasses
:
[]
m_SavedProperties
:
serializedVersion
:
3
...
...
@@ -59,19 +60,19 @@ Material:
-
_BumpScale
:
1
-
_Cutoff
:
0.5
-
_DetailNormalMapScale
:
1
-
_DstBlend
:
0
-
_DstBlend
:
1
0
-
_GlossMapScale
:
1
-
_Glossiness
:
0.
95
-
_Glossiness
:
0.
4
-
_GlossyReflections
:
1
-
_Metallic
:
0.
9
-
_Mode
:
0
-
_Metallic
:
0.
5
-
_Mode
:
3
-
_OcclusionStrength
:
1
-
_Parallax
:
0.02
-
_SmoothnessTextureChannel
:
0
-
_SpecularHighlights
:
1
-
_SrcBlend
:
1
-
_UVSec
:
0
-
_ZWrite
:
1
-
_ZWrite
:
0
m_Colors
:
-
_Color
:
{
r
:
1
,
g
:
1
,
b
:
1
,
a
:
1
}
-
_Color
:
{
r
:
1
,
g
:
0.9890261
,
b
:
0.82547176
,
a
:
0
}
-
_EmissionColor
:
{
r
:
0
,
g
:
0
,
b
:
0
,
a
:
1
}
Assets/Prefabs/Bullets/TruthBullet.prefab
View file @
cb38d222
...
...
@@ -90,7 +90,7 @@ SphereCollider:
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
7554112578236620015
}
m_Material
:
{
fileID
:
0
}
m_IsTrigger
:
0
m_IsTrigger
:
1
m_Enabled
:
1
serializedVersion
:
2
m_Radius
:
0.5
...
...
Assets/Prefabs/MapObjects/jackson.prefab
View file @
cb38d222
...
...
@@ -1433,6 +1433,7 @@ MonoBehaviour:
m_EditorClassIdentifier
:
head
:
{
fileID
:
3233955354714130270
}
shootingArm
:
{
fileID
:
494213313239917623
}
shootingFinger
:
{
fileID
:
494213313239918045
}
---
!u!1
&494213313239918029
GameObject
:
m_ObjectHideFlags
:
0
...
...
Assets/Prefabs/MapObjects/mirror.prefab
View file @
cb38d222
...
...
@@ -91,7 +91,7 @@ BoxCollider:
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1244481854748732982
}
m_Material
:
{
fileID
:
0
}
m_IsTrigger
:
0
m_IsTrigger
:
1
m_Enabled
:
1
serializedVersion
:
2
m_Size
:
{
x
:
1.0000005
,
y
:
1.0000002
,
z
:
0.080003634
}
...
...
@@ -134,11 +134,6 @@ PrefabInstance:
m_Modification
:
m_TransformParent
:
{
fileID
:
1244481854748242454
}
m_Modifications
:
-
target
:
{
fileID
:
5956712601806148718
,
guid
:
6cee9ce2ee605c54c957dc68c69cea90
,
type
:
3
}
propertyPath
:
m_Name
value
:
Mirror
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
5956712601805655926
,
guid
:
6cee9ce2ee605c54c957dc68c69cea90
,
type
:
3
}
propertyPath
:
m_LocalPosition.x
...
...
@@ -152,7 +147,7 @@ PrefabInstance:
-
target
:
{
fileID
:
5956712601805655926
,
guid
:
6cee9ce2ee605c54c957dc68c69cea90
,
type
:
3
}
propertyPath
:
m_LocalPosition.z
value
:
-0.0
4
value
:
-0.0
1
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
5956712601805655926
,
guid
:
6cee9ce2ee605c54c957dc68c69cea90
,
type
:
3
}
...
...
@@ -197,18 +192,28 @@ PrefabInstance:
-
target
:
{
fileID
:
5956712601805655926
,
guid
:
6cee9ce2ee605c54c957dc68c69cea90
,
type
:
3
}
propertyPath
:
m_LocalScale.x
value
:
0.9
value
:
1
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
5956712601805655926
,
guid
:
6cee9ce2ee605c54c957dc68c69cea90
,
type
:
3
}
propertyPath
:
m_LocalScale.z
value
:
0.9
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
5956712601806148718
,
guid
:
6cee9ce2ee605c54c957dc68c69cea90
,
type
:
3
}
propertyPath
:
m_Name
value
:
Mirror
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
5956712601794644638
,
guid
:
6cee9ce2ee605c54c957dc68c69cea90
,
type
:
3
}
propertyPath
:
TextureSize
value
:
768
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
5956712601804180398
,
guid
:
6cee9ce2ee605c54c957dc68c69cea90
,
type
:
3
}
propertyPath
:
m_CullingMask.m_Bits
value
:
1335
objectReference
:
{
fileID
:
0
}
m_RemovedComponents
:
[]
m_SourcePrefab
:
{
fileID
:
100100000
,
guid
:
6cee9ce2ee605c54c957dc68c69cea90
,
type
:
3
}
---
!u!4
&5893704869078864246
stripped
...
...
@@ -224,11 +229,6 @@ PrefabInstance:
m_Modification
:
m_TransformParent
:
{
fileID
:
1244481854748242454
}
m_Modifications
:
-
target
:
{
fileID
:
5956712601806148718
,
guid
:
6cee9ce2ee605c54c957dc68c69cea90
,
type
:
3
}
propertyPath
:
m_Name
value
:
Mirror (1)
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
5956712601805655926
,
guid
:
6cee9ce2ee605c54c957dc68c69cea90
,
type
:
3
}
propertyPath
:
m_LocalPosition.x
...
...
@@ -242,7 +242,7 @@ PrefabInstance:
-
target
:
{
fileID
:
5956712601805655926
,
guid
:
6cee9ce2ee605c54c957dc68c69cea90
,
type
:
3
}
propertyPath
:
m_LocalPosition.z
value
:
0.0
4
value
:
0.0
1
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
5956712601805655926
,
guid
:
6cee9ce2ee605c54c957dc68c69cea90
,
type
:
3
}
...
...
@@ -287,18 +287,28 @@ PrefabInstance:
-
target
:
{
fileID
:
5956712601805655926
,
guid
:
6cee9ce2ee605c54c957dc68c69cea90
,
type
:
3
}
propertyPath
:
m_LocalScale.x
value
:
0.9
value
:
1
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
5956712601805655926
,
guid
:
6cee9ce2ee605c54c957dc68c69cea90
,
type
:
3
}
propertyPath
:
m_LocalScale.z
value
:
0.9
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
5956712601806148718
,
guid
:
6cee9ce2ee605c54c957dc68c69cea90
,
type
:
3
}
propertyPath
:
m_Name
value
:
Mirror (1)
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
5956712601794644638
,
guid
:
6cee9ce2ee605c54c957dc68c69cea90
,
type
:
3
}
propertyPath
:
TextureSize
value
:
768
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
5956712601804180398
,
guid
:
6cee9ce2ee605c54c957dc68c69cea90
,
type
:
3
}
propertyPath
:
m_CullingMask.m_Bits
value
:
1335
objectReference
:
{
fileID
:
0
}
m_RemovedComponents
:
[]
m_SourcePrefab
:
{
fileID
:
100100000
,
guid
:
6cee9ce2ee605c54c957dc68c69cea90
,
type
:
3
}
---
!u!4
&8860960064478022773
stripped
...
...
Assets/Prefabs/MapObjects/wall.prefab
View file @
cb38d222
...
...
@@ -68,6 +68,7 @@ MeshRenderer:
m_ProbeAnchor
:
{
fileID
:
0
}
m_LightProbeVolumeOverride
:
{
fileID
:
0
}
m_ScaleInLightmap
:
1
m_ReceiveGI
:
1
m_PreserveUVs
:
0
m_IgnoreNormalsForChartDetection
:
0
m_ImportantGI
:
0
...
...
@@ -88,7 +89,7 @@ BoxCollider:
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
337530617404887312
}
m_Material
:
{
fileID
:
0
}
m_IsTrigger
:
0
m_IsTrigger
:
1
m_Enabled
:
1
serializedVersion
:
2
m_Size
:
{
x
:
1.0000005
,
y
:
1.0000002
,
z
:
0.080003634
}
...
...
Assets/Scenes/ModelScene.meta
0 → 100644
View file @
cb38d222
fileFormatVersion: 2
guid: ae6df86ab9243f74f8c5e9aab2cbca92
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/Scenes/ModelScene.unity
View file @
cb38d222
...
...
@@ -120,6 +120,75 @@ NavMeshSettings:
debug
:
m_Flags
:
0
m_NavMeshData
:
{
fileID
:
0
}
---
!u!1001
&471248682
PrefabInstance
:
m_ObjectHideFlags
:
0
serializedVersion
:
2
m_Modification
:
m_TransformParent
:
{
fileID
:
0
}
m_Modifications
:
-
target
:
{
fileID
:
1244481854748732982
,
guid
:
90282f1c82fff7545962b5ca66f1a102
,
type
:
3
}
propertyPath
:
m_Name
value
:
mirror (2)
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
1244481854748242454
,
guid
:
90282f1c82fff7545962b5ca66f1a102
,
type
:
3
}
propertyPath
:
m_LocalPosition.x
value
:
0.5
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
1244481854748242454
,
guid
:
90282f1c82fff7545962b5ca66f1a102
,
type
:
3
}
propertyPath
:
m_LocalPosition.y
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
1244481854748242454
,
guid
:
90282f1c82fff7545962b5ca66f1a102
,
type
:
3
}
propertyPath
:
m_LocalPosition.z
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
1244481854748242454
,
guid
:
90282f1c82fff7545962b5ca66f1a102
,
type
:
3
}
propertyPath
:
m_LocalRotation.x
value
:
-0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
1244481854748242454
,
guid
:
90282f1c82fff7545962b5ca66f1a102
,
type
:
3
}
propertyPath
:
m_LocalRotation.y
value
:
0.7071058
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
1244481854748242454
,
guid
:
90282f1c82fff7545962b5ca66f1a102
,
type
:
3
}
propertyPath
:
m_LocalRotation.z
value
:
-0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
1244481854748242454
,
guid
:
90282f1c82fff7545962b5ca66f1a102
,
type
:
3
}
propertyPath
:
m_LocalRotation.w
value
:
0.7071078
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
1244481854748242454
,
guid
:
90282f1c82fff7545962b5ca66f1a102
,
type
:
3
}
propertyPath
:
m_RootOrder
value
:
5
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
1244481854748242454
,
guid
:
90282f1c82fff7545962b5ca66f1a102
,
type
:
3
}
propertyPath
:
m_LocalEulerAnglesHint.x
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
1244481854748242454
,
guid
:
90282f1c82fff7545962b5ca66f1a102
,
type
:
3
}
propertyPath
:
m_LocalEulerAnglesHint.y
value
:
90.00001
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
1244481854748242454
,
guid
:
90282f1c82fff7545962b5ca66f1a102
,
type
:
3
}
propertyPath
:
m_LocalEulerAnglesHint.z
value
:
0
objectReference
:
{
fileID
:
0
}
m_RemovedComponents
:
[]
m_SourcePrefab
:
{
fileID
:
100100000
,
guid
:
90282f1c82fff7545962b5ca66f1a102
,
type
:
3
}
---
!u!1001
&527634235
PrefabInstance
:
m_ObjectHideFlags
:
0
...
...
Assets/Scenes/SampleScene.unity
View file @
cb38d222
...
...
@@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity
:
1
m_CustomReflection
:
{
fileID
:
0
}
m_Sun
:
{
fileID
:
170076734
}
m_IndirectSpecularColor
:
{
r
:
0.040
745974
,
g
:
0.050543424
,
b
:
0.08338426
,
a
:
1
}
m_IndirectSpecularColor
:
{
r
:
0.040
508375
,
g
:
0.050361775
,
b
:
0.08322008
,
a
:
1
}
m_UseRadianceAmbientProbe
:
0
---
!u!157
&3
LightmapSettings
:
...
...
@@ -220,7 +220,6 @@ GameObject:
serializedVersion
:
6
m_Component
:
-
component
:
{
fileID
:
448150610
}
-
component
:
{
fileID
:
448150609
}
-
component
:
{
fileID
:
448150608
}
m_Layer
:
10
m_Name
:
Post-process Volume
...
...
@@ -228,7 +227,7 @@ GameObject:
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
m_IsActive
:
0
---
!u!114
&448150608
MonoBehaviour
:
m_ObjectHideFlags
:
0
...
...
@@ -246,19 +245,6 @@ MonoBehaviour:
blendDistance
:
0
weight
:
1
priority
:
0
---
!u!65
&448150609
BoxCollider
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
448150607
}
m_Material
:
{
fileID
:
0
}
m_IsTrigger
:
1
m_Enabled
:
1
serializedVersion
:
2
m_Size
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_Center
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!4
&448150610
Transform
:
m_ObjectHideFlags
:
0
...
...
@@ -378,7 +364,7 @@ MonoBehaviour:
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
534669902
}
m_Enabled
:
1
m_Enabled
:
0
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
948f4100a11a5c24981795d21301da5c
,
type
:
3
}
m_Name
:
...
...
Assets/Scripts/Bullets/TruthBullet.cs
View file @
cb38d222
...
...
@@ -14,6 +14,7 @@ public class TruthBullet : Bullet
{
other
.
GetComponent
<
IBulletInteractor
>().
Interact
(
this
);
}
Debug
.
Log
(
other
.
name
);
Destroy
(
gameObject
);
}
}
Assets/Scripts/Map/Map.cs
View file @
cb38d222
...
...
@@ -148,6 +148,37 @@ public class Map : MonoBehaviour
}
}
/// <summary>
/// Change normal wall at position to mirror.
/// </summary>
/// <param name="pos">Position of wall.</param>
public
void
ChangeToMirror
(
Vector2
pos
)
{
if
(((
int
)
pos
.
x
>=
0
?
((
int
)
pos
.
x
>
maxMapSize
/
2
)
:
((
int
)
pos
.
x
<
-
maxMapSize
/
2
))
||
((
int
)
pos
.
y
>=
0
?
((
int
)
pos
.
y
>
maxMapSize
/
2
)
:
((
int
)
pos
.
y
<
-
maxMapSize
/
2
)))
{
Debug
.
Log
(
"Input size exceeds map's max size."
);
return
;
}
if
(
Mathf
.
Abs
(
pos
.
x
*
10
)
%
5
!=
0
||
Mathf
.
Abs
(
pos
.
y
*
10
)
%
5
!=
0
||
(
Mathf
.
Abs
(
pos
.
x
*
10
)
%
10
==
5
&&
Mathf
.
Abs
(
pos
.
y
*
10
)
%
10
==
5
)
||
(
Mathf
.
Abs
(
pos
.
x
*
10
)
%
10
!=
5
&&
Mathf
.
Abs
(
pos
.
y
*
10
)
%
10
!=
5
))
{
Debug
.
Log
(
"Inappropriate position of wall."
);
return
;
}
if
(
wallGrid
.
ContainsKey
(
pos
))
{
RemoveWall
(
pos
);
wallGrid
.
Add
(
pos
,
Instantiate
(
MapManager
.
inst
.
mirror
,
new
Vector3
(
pos
.
x
,
0
,
pos
.
y
),
Quaternion
.
identity
,
walls
.
transform
).
GetComponent
<
Wall
>());
wallGrid
[
pos
].
mapPos
=
pos
;
wallGrid
[
pos
].
type
=
WallType
.
Mirror
;
if
(
Mathf
.
Abs
(
pos
.
x
*
10
)
%
10
==
5
)
wallGrid
[
pos
].
transform
.
eulerAngles
=
new
Vector3
(
0
,
90
,
0
);
else
if
(
Mathf
.
Abs
(
pos
.
y
*
10
)
%
10
==
5
)
wallGrid
[
pos
].
transform
.
eulerAngles
=
new
Vector3
(
0
,
0
,
0
);
StartCoroutine
(
MapManager
.
inst
.
Rebaker
());
}
else
Debug
.
Log
(
"Wall already exists at : "
+
pos
);
}
/// <summary>
/// Remove wall at position.
/// </summary>
/// <param name="pos">Position of wall.</param>
...
...
Assets/Scripts/Map/NormalWall.cs
View file @
cb38d222
...
...
@@ -12,12 +12,7 @@ public class NormalWall : Wall, IBulletInteractor
}
else
if
(
bullet
is
MirrorBullet
)
{
Mirror
mirror
=
gameObject
.
AddComponent
<
Mirror
>();
GetComponent
<
Renderer
>().
material
=
GameManager
.
inst
.
mirrorMaterial
;
mirror
.
mapPos
=
mapPos
;
mirror
.
len
=
len
;
mirror
.
type
=
WallType
.
Mirror
;
Destroy
(
this
);
MapManager
.
inst
.
currentMap
.
ChangeToMirror
(
mapPos
);
}
}
}
Assets/Scripts/Player.cs
View file @
cb38d222
...
...
@@ -13,6 +13,7 @@ public class Player : MonoBehaviour
Coroutine
playerArrivalCheck
;
public
GameObject
head
;
public
GameObject
shootingArm
;
public
GameObject
shootingFinger
;
Animator
anim
;
/// <summary>
...
...
@@ -101,6 +102,7 @@ public class Player : MonoBehaviour
public
void
Shoot
(
BulletCode
bulletCode
)
{
Bullet
newBullet
=
MapManager
.
inst
.
bulletFactory
.
MakeBullet
(
bulletCode
);
newBullet
.
transform
.
position
=
shootingFinger
.
transform
.
position
;
newBullet
.
Init
(
transform
.
forward
);
}
...
...
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