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
f7ce5f51
Commit
f7ce5f51
authored
Aug 15, 2019
by
18신대성
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
이제 타겟 이외에는 아예 반응하지 않음, 거울 계산을 총알이 나가는 도중에 하도록
parent
676b99b9
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
135 additions
and
159 deletions
+135
-159
FakeBullet.prefab
Assets/Prefabs/Bullets/FakeBullet.prefab
+1
-16
MirrorBullet.prefab
Assets/Prefabs/Bullets/MirrorBullet.prefab
+1
-16
TruthBullet.prefab
Assets/Prefabs/Bullets/TruthBullet.prefab
+1
-16
PlayStage.unity
Assets/Scenes/PlayStage.unity
+86
-84
Bullet.cs
Assets/Scripts/Bullets/Bullet.cs
+13
-3
GameManager.cs
Assets/Scripts/Managers/GameManager.cs
+1
-1
Mirror.cs
Assets/Scripts/Map/Mirror.cs
+9
-3
ClearStatusUI.cs
Assets/Scripts/UIs/ClearStatusUI.cs
+23
-20
No files found.
Assets/Prefabs/Bullets/FakeBullet.prefab
View file @
f7ce5f51
...
@@ -13,9 +13,8 @@ GameObject:
...
@@ -13,9 +13,8 @@ GameObject:
-
component
:
{
fileID
:
4947938599857946864
}
-
component
:
{
fileID
:
4947938599857946864
}
-
component
:
{
fileID
:
4161250197469750740
}
-
component
:
{
fileID
:
4161250197469750740
}
-
component
:
{
fileID
:
3304980749204935003
}
-
component
:
{
fileID
:
3304980749204935003
}
-
component
:
{
fileID
:
3162875621187340848
}
-
component
:
{
fileID
:
4161250197469750741
}
-
component
:
{
fileID
:
4161250197469750741
}
m_Layer
:
0
m_Layer
:
14
m_Name
:
FakeBullet
m_Name
:
FakeBullet
m_TagString
:
Untagged
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_Icon
:
{
fileID
:
0
}
...
@@ -204,20 +203,6 @@ TrailRenderer:
...
@@ -204,20 +203,6 @@ TrailRenderer:
m_MinVertexDistance
:
0.1
m_MinVertexDistance
:
0.1
m_Autodestruct
:
0
m_Autodestruct
:
0
m_Emitting
:
1
m_Emitting
:
1
---
!u!136
&3162875621187340848
CapsuleCollider
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
5866539243986221368
}
m_Material
:
{
fileID
:
0
}
m_IsTrigger
:
1
m_Enabled
:
1
m_Radius
:
0.015
m_Height
:
0.1
m_Direction
:
2
m_Center
:
{
x
:
0
,
y
:
0
,
z
:
0.03
}
---
!u!114
&4161250197469750741
---
!u!114
&4161250197469750741
MonoBehaviour
:
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_ObjectHideFlags
:
0
...
...
Assets/Prefabs/Bullets/MirrorBullet.prefab
View file @
f7ce5f51
...
@@ -13,9 +13,8 @@ GameObject:
...
@@ -13,9 +13,8 @@ GameObject:
-
component
:
{
fileID
:
4155062941239240570
}
-
component
:
{
fileID
:
4155062941239240570
}
-
component
:
{
fileID
:
4953008830657790558
}
-
component
:
{
fileID
:
4953008830657790558
}
-
component
:
{
fileID
:
5827238114440197841
}
-
component
:
{
fileID
:
5827238114440197841
}
-
component
:
{
fileID
:
1135352145491507194
}
-
component
:
{
fileID
:
7453088000727901302
}
-
component
:
{
fileID
:
7453088000727901302
}
m_Layer
:
0
m_Layer
:
14
m_Name
:
MirrorBullet
m_Name
:
MirrorBullet
m_TagString
:
Untagged
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_Icon
:
{
fileID
:
0
}
...
@@ -204,20 +203,6 @@ TrailRenderer:
...
@@ -204,20 +203,6 @@ TrailRenderer:
m_MinVertexDistance
:
0.1
m_MinVertexDistance
:
0.1
m_Autodestruct
:
0
m_Autodestruct
:
0
m_Emitting
:
1
m_Emitting
:
1
---
!u!136
&1135352145491507194
CapsuleCollider
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
3200095709359611570
}
m_Material
:
{
fileID
:
0
}
m_IsTrigger
:
1
m_Enabled
:
1
m_Radius
:
0.015
m_Height
:
0.1
m_Direction
:
2
m_Center
:
{
x
:
0
,
y
:
0
,
z
:
0.03
}
---
!u!114
&7453088000727901302
---
!u!114
&7453088000727901302
MonoBehaviour
:
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_ObjectHideFlags
:
0
...
...
Assets/Prefabs/Bullets/TruthBullet.prefab
View file @
f7ce5f51
...
@@ -13,9 +13,8 @@ GameObject:
...
@@ -13,9 +13,8 @@ GameObject:
-
component
:
{
fileID
:
9013146449102202151
}
-
component
:
{
fileID
:
9013146449102202151
}
-
component
:
{
fileID
:
2621242702935536648
}
-
component
:
{
fileID
:
2621242702935536648
}
-
component
:
{
fileID
:
1468768842466997388
}
-
component
:
{
fileID
:
1468768842466997388
}
-
component
:
{
fileID
:
2012789303173402189
}
-
component
:
{
fileID
:
-7647737824225647995
}
-
component
:
{
fileID
:
-7647737824225647995
}
m_Layer
:
0
m_Layer
:
14
m_Name
:
TruthBullet
m_Name
:
TruthBullet
m_TagString
:
Untagged
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_Icon
:
{
fileID
:
0
}
...
@@ -204,20 +203,6 @@ TrailRenderer:
...
@@ -204,20 +203,6 @@ TrailRenderer:
m_MinVertexDistance
:
0.1
m_MinVertexDistance
:
0.1
m_Autodestruct
:
0
m_Autodestruct
:
0
m_Emitting
:
1
m_Emitting
:
1
---
!u!136
&2012789303173402189
CapsuleCollider
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
7554112578236620015
}
m_Material
:
{
fileID
:
0
}
m_IsTrigger
:
1
m_Enabled
:
1
m_Radius
:
0.015
m_Height
:
0.1
m_Direction
:
2
m_Center
:
{
x
:
0
,
y
:
0
,
z
:
0.03
}
---
!u!114
&-7647737824225647995
---
!u!114
&-7647737824225647995
MonoBehaviour
:
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_ObjectHideFlags
:
0
...
...
Assets/Scenes/PlayStage.unity
View file @
f7ce5f51
...
@@ -1048,6 +1048,8 @@ MonoBehaviour:
...
@@ -1048,6 +1048,8 @@ MonoBehaviour:
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
helpUI
:
{
fileID
:
1520705829
}
helpUI
:
{
fileID
:
1520705829
}
dragSpeed
:
10
dragSpeed
:
10
minFOV
:
0
maxFOV
:
0
centerPos
:
{
x
:
-0.5
,
y
:
0
,
z
:
-0.5
}
centerPos
:
{
x
:
-0.5
,
y
:
0
,
z
:
-0.5
}
---
!u!114
&534669907
---
!u!114
&534669907
MonoBehaviour
:
MonoBehaviour
:
...
@@ -1137,8 +1139,8 @@ MonoBehaviour:
...
@@ -1137,8 +1139,8 @@ MonoBehaviour:
sourceCamera
:
{
fileID
:
534669904
}
sourceCamera
:
{
fileID
:
534669904
}
outlineCamera
:
{
fileID
:
1548020010
}
outlineCamera
:
{
fileID
:
1548020010
}
outlineShaderMaterial
:
{
fileID
:
0
}
outlineShaderMaterial
:
{
fileID
:
0
}
renderTexture
:
{
fileID
:
693028346
}
renderTexture
:
{
fileID
:
1030187939
}
extraRenderTexture
:
{
fileID
:
1361509628
}
extraRenderTexture
:
{
fileID
:
641273653
}
---
!u!1
&617748942
---
!u!1
&617748942
GameObject
:
GameObject
:
m_ObjectHideFlags
:
0
m_ObjectHideFlags
:
0
...
@@ -1234,6 +1236,41 @@ CanvasRenderer:
...
@@ -1234,6 +1236,41 @@ CanvasRenderer:
m_PrefabAsset
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
617748942
}
m_GameObject
:
{
fileID
:
617748942
}
m_CullTransparentMesh
:
0
m_CullTransparentMesh
:
0
---
!u!84
&641273653
RenderTexture
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_Name
:
m_ImageContentsHash
:
serializedVersion
:
2
Hash
:
00000000000000000000000000000000
m_ForcedFallbackFormat
:
4
m_DownscaleFallback
:
0
serializedVersion
:
3
m_Width
:
1920
m_Height
:
1080
m_AntiAliasing
:
1
m_MipCount
:
-1
m_DepthFormat
:
1
m_ColorFormat
:
4
m_MipMap
:
0
m_GenerateMips
:
1
m_SRGB
:
1
m_UseDynamicScale
:
0
m_BindMS
:
0
m_EnableCompatibleFormat
:
1
m_TextureSettings
:
serializedVersion
:
2
m_FilterMode
:
1
m_Aniso
:
1
m_MipBias
:
0
m_WrapU
:
1
m_WrapV
:
1
m_WrapW
:
1
m_Dimension
:
2
m_VolumeDepth
:
1
---
!u!1
&666076611
---
!u!1
&666076611
GameObject
:
GameObject
:
m_ObjectHideFlags
:
0
m_ObjectHideFlags
:
0
...
@@ -1365,41 +1402,6 @@ CanvasRenderer:
...
@@ -1365,41 +1402,6 @@ CanvasRenderer:
m_PrefabAsset
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
666076611
}
m_GameObject
:
{
fileID
:
666076611
}
m_CullTransparentMesh
:
0
m_CullTransparentMesh
:
0
---
!u!84
&693028346
RenderTexture
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_Name
:
m_ImageContentsHash
:
serializedVersion
:
2
Hash
:
00000000000000000000000000000000
m_ForcedFallbackFormat
:
4
m_DownscaleFallback
:
0
serializedVersion
:
3
m_Width
:
1920
m_Height
:
1080
m_AntiAliasing
:
1
m_MipCount
:
-1
m_DepthFormat
:
1
m_ColorFormat
:
4
m_MipMap
:
0
m_GenerateMips
:
1
m_SRGB
:
1
m_UseDynamicScale
:
0
m_BindMS
:
0
m_EnableCompatibleFormat
:
1
m_TextureSettings
:
serializedVersion
:
2
m_FilterMode
:
1
m_Aniso
:
1
m_MipBias
:
0
m_WrapU
:
1
m_WrapV
:
1
m_WrapW
:
1
m_Dimension
:
2
m_VolumeDepth
:
1
---
!u!1
&770981479
---
!u!1
&770981479
GameObject
:
GameObject
:
m_ObjectHideFlags
:
0
m_ObjectHideFlags
:
0
...
@@ -1641,6 +1643,41 @@ RectTransform:
...
@@ -1641,6 +1643,41 @@ RectTransform:
m_AnchoredPosition
:
{
x
:
0
,
y
:
0
}
m_AnchoredPosition
:
{
x
:
0
,
y
:
0
}
m_SizeDelta
:
{
x
:
0
,
y
:
0
}
m_SizeDelta
:
{
x
:
0
,
y
:
0
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!84
&1030187939
RenderTexture
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_Name
:
m_ImageContentsHash
:
serializedVersion
:
2
Hash
:
00000000000000000000000000000000
m_ForcedFallbackFormat
:
4
m_DownscaleFallback
:
0
serializedVersion
:
3
m_Width
:
1920
m_Height
:
1080
m_AntiAliasing
:
1
m_MipCount
:
-1
m_DepthFormat
:
1
m_ColorFormat
:
4
m_MipMap
:
0
m_GenerateMips
:
1
m_SRGB
:
1
m_UseDynamicScale
:
0
m_BindMS
:
0
m_EnableCompatibleFormat
:
1
m_TextureSettings
:
serializedVersion
:
2
m_FilterMode
:
1
m_Aniso
:
1
m_MipBias
:
0
m_WrapU
:
1
m_WrapV
:
1
m_WrapW
:
1
m_Dimension
:
2
m_VolumeDepth
:
1
---
!u!1
&1145584062
---
!u!1
&1145584062
GameObject
:
GameObject
:
m_ObjectHideFlags
:
0
m_ObjectHideFlags
:
0
...
@@ -1817,41 +1854,6 @@ CanvasRenderer:
...
@@ -1817,41 +1854,6 @@ CanvasRenderer:
m_PrefabAsset
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1205101239
}
m_GameObject
:
{
fileID
:
1205101239
}
m_CullTransparentMesh
:
0
m_CullTransparentMesh
:
0
---
!u!84
&1361509628
RenderTexture
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_Name
:
m_ImageContentsHash
:
serializedVersion
:
2
Hash
:
00000000000000000000000000000000
m_ForcedFallbackFormat
:
4
m_DownscaleFallback
:
0
serializedVersion
:
3
m_Width
:
1920
m_Height
:
1080
m_AntiAliasing
:
1
m_MipCount
:
-1
m_DepthFormat
:
1
m_ColorFormat
:
4
m_MipMap
:
0
m_GenerateMips
:
1
m_SRGB
:
1
m_UseDynamicScale
:
0
m_BindMS
:
0
m_EnableCompatibleFormat
:
1
m_TextureSettings
:
serializedVersion
:
2
m_FilterMode
:
1
m_Aniso
:
1
m_MipBias
:
0
m_WrapU
:
1
m_WrapV
:
1
m_WrapW
:
1
m_Dimension
:
2
m_VolumeDepth
:
1
---
!u!1
&1472222827
---
!u!1
&1472222827
GameObject
:
GameObject
:
m_ObjectHideFlags
:
0
m_ObjectHideFlags
:
0
...
@@ -2254,7 +2256,7 @@ Camera:
...
@@ -2254,7 +2256,7 @@ Camera:
serializedVersion
:
2
serializedVersion
:
2
m_Bits
:
0
m_Bits
:
0
m_RenderingPath
:
1
m_RenderingPath
:
1
m_TargetTexture
:
{
fileID
:
693028346
}
m_TargetTexture
:
{
fileID
:
1030187939
}
m_TargetDisplay
:
0
m_TargetDisplay
:
0
m_TargetEye
:
3
m_TargetEye
:
3
m_HDR
:
0
m_HDR
:
0
...
@@ -2988,7 +2990,7 @@ MonoBehaviour:
...
@@ -2988,7 +2990,7 @@ MonoBehaviour:
m_IntArgument
:
0
m_IntArgument
:
0
m_FloatArgument
:
0
m_FloatArgument
:
0
m_StringArgument
:
m_StringArgument
:
m_BoolArgument
:
0
m_BoolArgument
:
1
m_CallState
:
2
m_CallState
:
2
m_TypeName
:
UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
m_TypeName
:
UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null
Culture=neutral, PublicKeyToken=null
...
@@ -3142,6 +3144,16 @@ PrefabInstance:
...
@@ -3142,6 +3144,16 @@ PrefabInstance:
m_Modification
:
m_Modification
:
m_TransformParent
:
{
fileID
:
0
}
m_TransformParent
:
{
fileID
:
0
}
m_Modifications
:
m_Modifications
:
-
target
:
{
fileID
:
52444459818764334
,
guid
:
42247a938bb6e554eb00dc08303a72d6
,
type
:
3
}
propertyPath
:
m_Name
value
:
GameManager
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
52444459818764334
,
guid
:
42247a938bb6e554eb00dc08303a72d6
,
type
:
3
}
propertyPath
:
m_IsActive
value
:
1
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
2122327709
,
guid
:
42247a938bb6e554eb00dc08303a72d6
,
type
:
3
}
-
target
:
{
fileID
:
2122327709
,
guid
:
42247a938bb6e554eb00dc08303a72d6
,
type
:
3
}
propertyPath
:
uiGenerator
propertyPath
:
uiGenerator
value
:
value
:
...
@@ -3186,16 +3198,6 @@ PrefabInstance:
...
@@ -3186,16 +3198,6 @@ PrefabInstance:
propertyPath
:
menuUIController
propertyPath
:
menuUIController
value
:
value
:
objectReference
:
{
fileID
:
158856775
}
objectReference
:
{
fileID
:
158856775
}
-
target
:
{
fileID
:
52444459818764334
,
guid
:
42247a938bb6e554eb00dc08303a72d6
,
type
:
3
}
propertyPath
:
m_Name
value
:
GameManager
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
52444459818764334
,
guid
:
42247a938bb6e554eb00dc08303a72d6
,
type
:
3
}
propertyPath
:
m_IsActive
value
:
1
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
52444459818764335
,
guid
:
42247a938bb6e554eb00dc08303a72d6
,
-
target
:
{
fileID
:
52444459818764335
,
guid
:
42247a938bb6e554eb00dc08303a72d6
,
type
:
3
}
type
:
3
}
propertyPath
:
m_LocalPosition.x
propertyPath
:
m_LocalPosition.x
...
...
Assets/Scripts/Bullets/Bullet.cs
View file @
f7ce5f51
...
@@ -18,10 +18,21 @@ public abstract class Bullet : MonoBehaviour
...
@@ -18,10 +18,21 @@ public abstract class Bullet : MonoBehaviour
}
}
IEnumerator
ForceInteract
(
Collider
col
,
float
_time
)
IEnumerator
ForceInteract
(
Collider
col
,
float
_time
)
{
if
(
col
.
CompareTag
(
"Mirror"
)
&&
this
is
FakeBullet
)
{
col
.
GetComponent
<
Mirror
>().
StartCopy
();
yield
return
new
WaitForSeconds
(
_time
);
col
.
GetComponent
<
Mirror
>().
doReflect
=
true
;
OnTriggerEnter
(
col
);
}
else
{
{
yield
return
new
WaitForSeconds
(
_time
);
yield
return
new
WaitForSeconds
(
_time
);
OnTriggerEnter
(
col
);
OnTriggerEnter
(
col
);
}
}
Destroy
(
gameObject
,
0.1f
);
}
public
void
Init
(
Vector3
velocity
,
Collider
col
)
public
void
Init
(
Vector3
velocity
,
Collider
col
)
{
{
...
@@ -31,6 +42,5 @@ public abstract class Bullet : MonoBehaviour
...
@@ -31,6 +42,5 @@ public abstract class Bullet : MonoBehaviour
if
(
col
!=
null
)
flightTime
=
(
col
.
transform
.
position
-
transform
.
position
).
magnitude
/
velocity
.
magnitude
;
if
(
col
!=
null
)
flightTime
=
(
col
.
transform
.
position
-
transform
.
position
).
magnitude
/
velocity
.
magnitude
;
else
flightTime
=
MapManager
.
inst
.
currentMap
.
maxMapSize
/
velocity
.
magnitude
;
else
flightTime
=
MapManager
.
inst
.
currentMap
.
maxMapSize
/
velocity
.
magnitude
;
StartCoroutine
(
ForceInteract
(
col
,
flightTime
));
StartCoroutine
(
ForceInteract
(
col
,
flightTime
));
Destroy
(
gameObject
,
flightTime
+
0.5f
);
}
}
}
}
Assets/Scripts/Managers/GameManager.cs
View file @
f7ce5f51
...
@@ -94,7 +94,7 @@ public class GameManager : SingletonBehaviour<GameManager>
...
@@ -94,7 +94,7 @@ public class GameManager : SingletonBehaviour<GameManager>
public
IEnumerator
ClearStage
()
public
IEnumerator
ClearStage
()
{
{
yield
return
new
WaitForSeconds
(
0.1f
);
yield
return
new
WaitForSeconds
(
0.1f
);
if
(
clearCounter
==
0
)
if
(
clearCounter
==
0
&&
!
isGameOver
)
{
{
if
(
isPlayerShooting
)
yield
return
StartCoroutine
(
Camera
.
main
.
gameObject
.
GetComponent
<
CameraController
>().
ZoomOutFromPlayer
(
PlayerController
.
inst
.
currentPlayer
));
if
(
isPlayerShooting
)
yield
return
StartCoroutine
(
Camera
.
main
.
gameObject
.
GetComponent
<
CameraController
>().
ZoomOutFromPlayer
(
PlayerController
.
inst
.
currentPlayer
));
yield
return
null
;
yield
return
null
;
...
...
Assets/Scripts/Map/Mirror.cs
View file @
f7ce5f51
...
@@ -7,6 +7,7 @@ public class Mirror : Wall, IBulletInteractor, IBreakable
...
@@ -7,6 +7,7 @@ public class Mirror : Wall, IBulletInteractor, IBreakable
{
{
[
Space
(
15
)]
[
Space
(
15
)]
public
GameObject
scatteredMirror
;
public
GameObject
scatteredMirror
;
public
bool
doReflect
=
false
;
public
void
Break
()
public
void
Break
()
{
{
...
@@ -14,13 +15,17 @@ public class Mirror : Wall, IBulletInteractor, IBreakable
...
@@ -14,13 +15,17 @@ public class Mirror : Wall, IBulletInteractor, IBreakable
MapManager
.
inst
.
currentMap
.
RemoveWall
(
this
.
mapPos
);
MapManager
.
inst
.
currentMap
.
RemoveWall
(
this
.
mapPos
);
}
}
public
void
StartCopy
()
{
StartCoroutine
(
CopyObjects
(
PlayerController
.
inst
.
currentPlayer
));
}
public
void
Interact
(
Bullet
bullet
)
public
void
Interact
(
Bullet
bullet
)
{
{
if
(
bullet
is
FakeBullet
)
if
(
bullet
is
FakeBullet
)
{
{
//Debug.Log("ldPos: " + ldPos + ", rdPos: " + rdPos + ", dir: " + dir);
//Debug.Log("ldPos: " + ldPos + ", rdPos: " + rdPos + ", dir: " + dir);
// Make reflected objects
// Make reflected objects
StartCoroutine
(
CopyObjects
(
PlayerController
.
inst
.
currentPlayer
));
}
}
}
}
...
@@ -99,6 +104,7 @@ public class Mirror : Wall, IBulletInteractor, IBreakable
...
@@ -99,6 +104,7 @@ public class Mirror : Wall, IBulletInteractor, IBreakable
}
}
for
(;
Mathf
.
Abs
(
i
)
<
(
MapManager
.
inst
.
currentMap
.
maxMapSize
+
1
);
i
+=
side
)
for
(;
Mathf
.
Abs
(
i
)
<
(
MapManager
.
inst
.
currentMap
.
maxMapSize
+
1
);
i
+=
side
)
{
{
yield
return
null
;
bool
anotherSide
=
false
;
bool
anotherSide
=
false
;
for
(
int
j
=
mapRange
;
Mathf
.
Abs
(
j
)
<=
(
MapManager
.
inst
.
currentMap
.
maxMapSize
+
1
);
j
+=
reflectSide
)
for
(
int
j
=
mapRange
;
Mathf
.
Abs
(
j
)
<=
(
MapManager
.
inst
.
currentMap
.
maxMapSize
+
1
);
j
+=
reflectSide
)
{
{
...
@@ -242,7 +248,7 @@ public class Mirror : Wall, IBulletInteractor, IBreakable
...
@@ -242,7 +248,7 @@ public class Mirror : Wall, IBulletInteractor, IBreakable
}
}
if
(
parRay
.
Count
==
0
)
break
;
if
(
parRay
.
Count
==
0
)
break
;
}
}
yield
return
n
ull
;
yield
return
n
ew
WaitUntil
(()
=>
doReflect
)
;
// copy floors
// copy floors
foreach
(
var
floorCount
in
floorCountGrid
)
foreach
(
var
floorCount
in
floorCountGrid
)
{
{
...
...
Assets/Scripts/UIs/ClearStatusUI.cs
View file @
f7ce5f51
...
@@ -49,6 +49,8 @@ public class ClearStatusUI : MonoBehaviour
...
@@ -49,6 +49,8 @@ public class ClearStatusUI : MonoBehaviour
}
}
public
void
RefreshClearCondition
()
public
void
RefreshClearCondition
()
{
if
(!
GameManager
.
inst
.
isGameOver
)
{
{
if
(
assignedCondition
.
type
==
ClearType
.
AllCase
||
assignedCondition
.
type
==
ClearType
.
AllFloor
||
assignedCondition
.
type
==
ClearType
.
AllTurret
)
if
(
assignedCondition
.
type
==
ClearType
.
AllCase
||
assignedCondition
.
type
==
ClearType
.
AllFloor
||
assignedCondition
.
type
==
ClearType
.
AllTurret
)
{
{
...
@@ -73,4 +75,5 @@ public class ClearStatusUI : MonoBehaviour
...
@@ -73,4 +75,5 @@ public class ClearStatusUI : MonoBehaviour
checkerText
.
color
=
notClearedColor
;
checkerText
.
color
=
notClearedColor
;
}
}
}
}
}
}
}
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