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
1954058a
Commit
1954058a
authored
Jul 10, 2019
by
18손재민
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
승리 조건 버그 고치고 게임 재시작 시 씬 리로드하는 것으로 고침. 이제 카메라 터렛에 닿으면 클리어 여부와 관계 없이 게임 오버 됨
parent
d4320995
Changes
20
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
197 additions
and
114 deletions
+197
-114
case.prefab
Assets/Prefabs/Objects/case.prefab
+0
-14
TestTools.prefab
Assets/Prefabs/TestTools.prefab
+81
-0
stage1.json
Assets/Resources/Stages/stage1.json
+1
-1
stage2.json
Assets/Resources/Stages/stage2.json
+1
-1
stage2.json.meta
Assets/Resources/Stages/stage2.json.meta
+1
-1
stage3.json
Assets/Resources/Stages/stage3.json
+0
-1
stage3.json.meta
Assets/Resources/Stages/stage3.json.meta
+0
-7
PlayStage.unity
Assets/Scenes/PlayStage.unity
+2
-1
Briefcase.cs
Assets/Scripts/Interactors/Briefcase.cs
+15
-11
CameraTurret.cs
Assets/Scripts/Interactors/CameraTurret.cs
+12
-6
Mannequin.cs
Assets/Scripts/Interactors/Mannequin.cs
+5
-4
GameManager.cs
Assets/Scripts/Managers/GameManager.cs
+15
-10
ClearCondition.cs
Assets/Scripts/Map/ClearCondition.cs
+1
-2
Map.cs
Assets/Scripts/Map/Map.cs
+2
-6
MapEditor.cs
Assets/Scripts/MapEditor.cs
+3
-0
Player.cs
Assets/Scripts/Player.cs
+0
-8
PlayerController.cs
Assets/Scripts/PlayerController.cs
+42
-39
StageSelector.cs
Assets/Scripts/StageSelector.cs
+1
-0
TestTools.cs
Assets/Scripts/TestTools.cs
+1
-1
ClearUIGenerator.cs
Assets/Scripts/UIs/ClearUIGenerator.cs
+14
-1
No files found.
Assets/Prefabs/Objects/case.prefab
View file @
1954058a
...
...
@@ -89,7 +89,6 @@ GameObject:
-
component
:
{
fileID
:
2534561534465045041
}
-
component
:
{
fileID
:
2534561534464242193
}
-
component
:
{
fileID
:
2534561534463275217
}
-
component
:
{
fileID
:
-2850530927027858165
}
-
component
:
{
fileID
:
-4559840392902712278
}
-
component
:
{
fileID
:
-954323813722370706
}
m_Layer
:
13
...
...
@@ -162,19 +161,6 @@ MeshRenderer:
m_SortingLayerID
:
0
m_SortingLayer
:
0
m_SortingOrder
:
0
---
!u!65
&-2850530927027858165
BoxCollider
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
2534561534465535505
}
m_Material
:
{
fileID
:
0
}
m_IsTrigger
:
1
m_Enabled
:
1
serializedVersion
:
2
m_Size
:
{
x
:
0.52
,
y
:
0.44944128
,
z
:
0.1252539
}
m_Center
:
{
x
:
0
,
y
:
0.030357078
,
z
:
0
}
---
!u!114
&-4559840392902712278
MonoBehaviour
:
m_ObjectHideFlags
:
0
...
...
Assets/Prefabs/TestTools.prefab
View file @
1954058a
...
...
@@ -422,6 +422,85 @@ MonoBehaviour:
m_VerticalOverflow
:
0
m_LineSpacing
:
1
m_Text
:
add mannequin
---
!u!1
&1854540597
GameObject
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
serializedVersion
:
6
m_Component
:
-
component
:
{
fileID
:
1854540598
}
-
component
:
{
fileID
:
1854540600
}
-
component
:
{
fileID
:
1854540599
}
m_Layer
:
5
m_Name
:
Clear
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
0
---
!u!224
&1854540598
RectTransform
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1854540597
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_Children
:
[]
m_Father
:
{
fileID
:
1444571407667829093
}
m_RootOrder
:
7
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_AnchorMin
:
{
x
:
0.5
,
y
:
0.5
}
m_AnchorMax
:
{
x
:
0.5
,
y
:
0.5
}
m_AnchoredPosition
:
{
x
:
0
,
y
:
0
}
m_SizeDelta
:
{
x
:
500
,
y
:
200
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!222
&1854540600
CanvasRenderer
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1854540597
}
m_CullTransparentMesh
:
0
---
!u!114
&1854540599
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1854540597
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
708705254
,
guid
:
f70555f144d8491a825f0804e09c671c
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
m_Material
:
{
fileID
:
0
}
m_Color
:
{
r
:
1
,
g
:
1
,
b
:
1
,
a
:
1
}
m_RaycastTarget
:
1
m_OnCullStateChanged
:
m_PersistentCalls
:
m_Calls
:
[]
m_TypeName
:
UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData
:
m_Font
:
{
fileID
:
10102
,
guid
:
0000000000000000e000000000000000
,
type
:
0
}
m_FontSize
:
90
m_FontStyle
:
0
m_BestFit
:
0
m_MinSize
:
1
m_MaxSize
:
200
m_Alignment
:
4
m_AlignByGeometry
:
0
m_RichText
:
1
m_HorizontalOverflow
:
0
m_VerticalOverflow
:
0
m_LineSpacing
:
1
m_Text
:
Stage Clear!
---
!u!1
&356685241964599882
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -961,6 +1040,7 @@ RectTransform:
-
{
fileID
:
1444571407224148019
}
-
{
fileID
:
1444571408487427164
}
-
{
fileID
:
1466596363
}
-
{
fileID
:
1854540598
}
m_Father
:
{
fileID
:
1444571408780882984
}
m_RootOrder
:
0
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
...
...
@@ -1508,6 +1588,7 @@ MonoBehaviour:
m_Name
:
m_EditorClassIdentifier
:
currentBullet
:
{
fileID
:
3656934010764012818
}
clear
:
{
fileID
:
1854540599
}
xInput
:
{
fileID
:
1444571407224148016
}
yInput
:
{
fileID
:
1444571408487427165
}
---
!u!1
&1444571408874085630
...
...
Assets/Resources/Stages/stage1.json
View file @
1954058a
{
"objects"
:[{
"tag"
:
0
,
"xPos"
:
25.0
,
"yPos"
:
0.0
},{
"tag"
:
2
,
"xPos"
:
-2.0
,
"yPos"
:
1.5
},{
"tag"
:
2
,
"xPos"
:
-1.0
,
"yPos"
:
1.5
},{
"tag"
:
3
,
"xPos"
:
0.0
,
"yPos"
:
1.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
"tag"
:
1
,
"xPos"
:
-2.0
,
"yPos"
:
0.0
},{
"tag"
:
9
,
"xPos"
:
-2.0
,
"yPos"
:
0.0
},{
"tag"
:
1
,
"xPos"
:
-1.0
,
"yPos"
:
0.0
},{
"tag"
:
4
,
"xPos"
:
-2.0
,
"yPos"
:
-2.0
},{
"tag"
:
4
,
"xPos"
:
-1.0
,
"yPos"
:
-2.0
},{
"tag"
:
6
,
"xPos"
:
2.0
,
"yPos"
:
2.0
},{
"tag"
:
7
,
"xPos"
:
2.0
,
"yPos"
:
1.0
},{
"tag"
:
8
,
"xPos"
:
2.0
,
"yPos"
:
0.0
},{
"tag"
:
5
,
"xPos"
:
1.0
,
"yPos"
:
1.0
},{
"tag"
:
5
,
"xPos"
:
1.0
,
"yPos"
:
0.0
},{
"tag"
:
5
,
"xPos"
:
1.0
,
"yPos"
:
-1.0
},{
"tag"
:
5
,
"xPos"
:
1.0
,
"yPos"
:
-2.0
}],
"clears"
:[],
"cases"
:[
3
,
0
,
1
,
2
],
"bullets"
:[
0
,
1
,
2
]}
\ No newline at end of file
{
"objects"
:[{
"tag"
:
0
,
"xPos"
:
20.0
,
"yPos"
:
0.0
},{
"tag"
:
3
,
"xPos"
:
-0.5
,
"yPos"
:
0.0
},{
"tag"
:
2
,
"xPos"
:
-0.5
,
"yPos"
:
1.0
},{
"tag"
:
2
,
"xPos"
:
-0.5
,
"yPos"
:
-2.0
},{
"tag"
:
1
,
"xPos"
:
-2.0
,
"yPos"
:
1.0
},{
"tag"
:
1
,
"xPos"
:
-2.0
,
"yPos"
:
0.0
},{
"tag"
:
1
,
"xPos"
:
-1.0
,
"yPos"
:
0.0
},{
"tag"
:
1
,
"xPos"
:
-1.0
,
"yPos"
:
1.0
},{
"tag"
:
1
,
"xPos"
:
0.0
,
"yPos"
:
1.0
},{
"tag"
:
1
,
"xPos"
:
0.0
,
"yPos"
:
0.0
},{
"tag"
:
1
,
"xPos"
:
1.0
,
"yPos"
:
0.0
},{
"tag"
:
1
,
"xPos"
:
1.0
,
"yPos"
:
1.0
},{
"tag"
:
1
,
"xPos"
:
1.0
,
"yPos"
:
-1.0
},{
"tag"
:
1
,
"xPos"
:
1.0
,
"yPos"
:
-2.0
},{
"tag"
:
1
,
"xPos"
:
0.0
,
"yPos"
:
-2.0
},{
"tag"
:
1
,
"xPos"
:
0.0
,
"yPos"
:
-1.0
},{
"tag"
:
1
,
"xPos"
:
-1.0
,
"yPos"
:
-1.0
},{
"tag"
:
1
,
"xPos"
:
-1.0
,
"yPos"
:
-2.0
},{
"tag"
:
1
,
"xPos"
:
-2.0
,
"yPos"
:
-2.0
},{
"tag"
:
1
,
"xPos"
:
-2.0
,
"yPos"
:
-1.0
},{
"tag"
:
4
,
"xPos"
:
1.0
,
"yPos"
:
-2.0
},{
"tag"
:
6
,
"xPos"
:
1.0
,
"yPos"
:
0.0
},{
"tag"
:
5
,
"xPos"
:
1.0
,
"yPos"
:
1.0
}],
"clears"
:[{
"type"
:
2
,
"goal"
:
1
}],
"cases"
:[
3
],
"bullets"
:[
1
]}
\ No newline at end of file
Assets/Resources/Stages/stage2.json
View file @
1954058a
{
"objects"
:[{
"tag"
:
0
,
"xPos"
:
25.0
,
"yPos"
:
0.0
},{
"tag"
:
2
,
"xPos"
:
-2.0
,
"yPos"
:
1.5
},{
"tag"
:
2
,
"xPos"
:
-1.0
,
"yPos"
:
1.5
},{
"tag"
:
3
,
"xPos"
:
0.0
,
"yPos"
:
1.5
},{
"tag"
:
3
,
"xPos"
:
1.0
,
"yPos"
:
1.5
},{
"tag"
:
1
,
"xPos"
:
0.0
,
"yPos"
:
0.0
},{
"tag"
:
1
,
"xPos"
:
0.0
,
"yPos"
:
-1.0
},{
"tag"
:
1
,
"xPos"
:
1.0
,
"yPos"
:
-1.0
},{
"tag"
:
1
,
"xPos"
:
1.0
,
"yPos"
:
0.0
},{
"tag"
:
1
,
"xPos"
:
-2.0
,
"yPos"
:
2.0
},{
"tag"
:
1
,
"xPos"
:
-2.0
,
"yPos"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:
1.0
},{
"tag"
:
8
,
"xPos"
:
2.0
,
"yPos"
:
0.0
},{
"tag"
:
5
,
"xPos"
:
1.0
,
"yPos"
:
1.0
},{
"tag"
:
5
,
"xPos"
:
1.0
,
"yPos"
:
0.0
},{
"tag"
:
5
,
"xPos"
:
1.0
,
"yPos"
:
-1.0
},{
"tag"
:
5
,
"xPos"
:
1.0
,
"yPos"
:
-2.0
}],
"clears"
:[],
"cases"
:[
3
,
0
,
1
,
2
],
"bullets"
:[
0
,
1
,
2
]}
\ No newline at end of file
{
"objects"
:[{
"tag"
:
0
,
"xPos"
:
20.0
,
"yPos"
:
0.0
},{
"tag"
:
2
,
"xPos"
:
-2.0
,
"yPos"
:
-0.5
},{
"tag"
:
2
,
"xPos"
:
-1.0
,
"yPos"
:
-0.5
},{
"tag"
:
2
,
"xPos"
:
0.5
,
"yPos"
:
-1.0
},{
"tag"
:
3
,
"xPos"
:
0.0
,
"yPos"
:
-0.5
},{
"tag"
:
3
,
"xPos"
:
1.0
,
"yPos"
:
-0.5
},{
"tag"
:
1
,
"xPos"
:
0.0
,
"yPos"
:
0.0
},{
"tag"
:
1
,
"xPos"
:
-2.0
,
"yPos"
:
0.0
},{
"tag"
:
1
,
"xPos"
:
-1.0
,
"yPos"
:
0.0
},{
"tag"
:
1
,
"xPos"
:
-1.0
,
"yPos"
:
1.0
},{
"tag"
:
1
,
"xPos"
:
-2.0
,
"yPos"
:
1.0
},{
"tag"
:
1
,
"xPos"
:
-2.0
,
"yPos"
:
-1.0
},{
"tag"
:
1
,
"xPos"
:
-1.0
,
"yPos"
:
-1.0
},{
"tag"
:
1
,
"xPos"
:
-1.0
,
"yPos"
:
-2.0
},{
"tag"
:
1
,
"xPos"
:
-2.0
,
"yPos"
:
-2.0
},{
"tag"
:
1
,
"xPos"
:
0.0
,
"yPos"
:
-2.0
},{
"tag"
:
1
,
"xPos"
:
0.0
,
"yPos"
:
-1.0
},{
"tag"
:
1
,
"xPos"
:
1.0
,
"yPos"
:
-1.0
},{
"tag"
:
1
,
"xPos"
:
1.0
,
"yPos"
:
-2.0
},{
"tag"
:
1
,
"xPos"
:
1.0
,
"yPos"
:
0.0
},{
"tag"
:
1
,
"xPos"
:
1.0
,
"yPos"
:
1.0
},{
"tag"
:
1
,
"xPos"
:
0.0
,
"yPos"
:
1.0
},{
"tag"
:
4
,
"xPos"
:
-2.0
,
"yPos"
:
-2.0
},{
"tag"
:
6
,
"xPos"
:
1.0
,
"yPos"
:
-1.0
},{
"tag"
:
5
,
"xPos"
:
1.0
,
"yPos"
:
-2.0
}],
"clears"
:[{
"type"
:
6
,
"goal"
:
1
}],
"cases"
:[
3
],
"bullets"
:[
1
,
1
]}
\ No newline at end of file
Assets/Resources/Stages/stage2.json.meta
View file @
1954058a
fileFormatVersion: 2
guid:
b65159d8e62109d4990676399736ddbf
guid:
a0bbdbca5d3d3904b8af6f4f7266190d
TextScriptImporter:
externalObjects: {}
userData:
...
...
Assets/Resources/Stages/stage3.json
deleted
100644 → 0
View file @
d4320995
{
"objects"
:[{
"tag"
:
0
,
"xPos"
:
25.0
,
"yPos"
:
0.0
},{
"tag"
:
2
,
"xPos"
:
-2.0
,
"yPos"
:
1.5
},{
"tag"
:
2
,
"xPos"
:
-1.0
,
"yPos"
:
1.5
},{
"tag"
:
3
,
"xPos"
:
0.0
,
"yPos"
:
1.5
},{
"tag"
:
3
,
"xPos"
:
1.0
,
"yPos"
:
1.5
},{
"tag"
:
1
,
"xPos"
:
0.0
,
"yPos"
:
0.0
},{
"tag"
:
1
,
"xPos"
:
0.0
,
"yPos"
:
-1.0
},{
"tag"
:
1
,
"xPos"
:
1.0
,
"yPos"
:
-1.0
},{
"tag"
:
1
,
"xPos"
:
1.0
,
"yPos"
:
0.0
},{
"tag"
:
1
,
"xPos"
:
-2.0
,
"yPos"
:
2.0
},{
"tag"
:
1
,
"xPos"
:
-2.0
,
"yPos"
:
1.0
},{
"tag"
:
1
,
"xPos"
:
-1.0
,
"yPos"
:
1.0
},{
"tag"
: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
,
"xPos"
:
1.0
,
"yPos"
:
1.0
},{
"tag"
:
5
,
"xPos"
:
1.0
,
"yPos"
:
0.0
},{
"tag"
:
5
,
"xPos"
:
1.0
,
"yPos"
:
-1.0
},{
"tag"
:
5
,
"xPos"
:
1.0
,
"yPos"
:
-2.0
}],
"clears"
:[],
"cases"
:[
3
,
0
,
1
,
2
],
"bullets"
:[
0
,
1
,
2
]}
\ No newline at end of file
Assets/Resources/Stages/stage3.json.meta
deleted
100644 → 0
View file @
d4320995
fileFormatVersion: 2
guid: a0bbdbca5d3d3904b8af6f4f7266190d
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/Scenes/PlayStage.unity
View file @
1954058a
...
...
@@ -153,6 +153,7 @@ MonoBehaviour:
m_Name
:
m_EditorClassIdentifier
:
clearUI
:
{
fileID
:
4890012631615838995
,
guid
:
874af447cef689e478ca96b4d1d197c2
,
type
:
3
}
uiList
:
[]
---
!u!114
&158856769
MonoBehaviour
:
m_ObjectHideFlags
:
0
...
...
@@ -305,7 +306,7 @@ Light:
m_BounceIntensity
:
1
m_ColorTemperature
:
6570
m_UseColorTemperature
:
0
m_BoundingSphereOverride
:
{
x
:
0.03125
,
y
:
0.109375
,
z
:
0.03125
,
w
:
-0.03125
}
m_BoundingSphereOverride
:
{
x
:
-Infinity
,
y
:
2.8421708e-14
,
z
:
0
,
w
:
2.69e-43
}
m_UseBoundingSphereOverride
:
0
m_ShadowRadius
:
0
m_ShadowAngle
:
0
...
...
Assets/Scripts/Interactors/Briefcase.cs
View file @
1954058a
...
...
@@ -50,6 +50,8 @@ public class Briefcase : MonoBehaviour, IObject, IPlayerInteractor
}
public
void
Interact
(
Vector2Int
position
)
{
if
(!
GameManager
.
inst
.
isGameOver
)
{
Debug
.
Log
(
Position
+
" "
+
position
);
if
(
Position
==
position
)
...
...
@@ -61,8 +63,10 @@ public class Briefcase : MonoBehaviour, IObject, IPlayerInteractor
if
(
GameManager
.
nCase
>=
0
)
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
nCase
].
IsDone
(
1
);
floor
.
objOnFloor
=
null
;
MapManager
.
inst
.
currentMap
.
RemoveObject
(
Position
);
MapManager
.
inst
.
currentMap
.
RemoveObject
(
Position
,
true
);
}
}
}
ObjType
IObject
.
GetType
()
...
...
Assets/Scripts/Interactors/CameraTurret.cs
View file @
1954058a
...
...
@@ -13,6 +13,7 @@ public class CameraTurret : MonoBehaviour, IObject, IBreakable, IPlayerInteracto
this
.
floor
=
floor
;
floor
.
objOnFloor
=
this
;
PlayerController
.
inst
.
OnPlayerMove
+=
Interact
;
if
(
GameManager
.
aTurret
>=
0
)
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
aTurret
].
IsDone
(
0
,
1
);
}
public
void
Break
()
...
...
@@ -25,14 +26,19 @@ public class CameraTurret : MonoBehaviour, IObject, IBreakable, IPlayerInteracto
}
public
void
Interact
(
Vector2Int
pos
)
{
if
(!
GameManager
.
inst
.
isGameOver
)
{
if
(
Position
.
IsInAdjacentArea
(
pos
,
1
)
&&
MapManager
.
inst
.
currentMap
.
GetWallAtPos
((
Vector2
)(
Position
+
pos
)
/
2
)
==
null
)
{
GameManager
.
inst
.
isGameOver
=
true
;
StartCoroutine
(
GameManager
.
inst
.
RestartStage
());
GameManager
.
inst
.
uiGenerator
.
ResetAllClearUIs
();
//TODO : Restart Level
}
}
}
public
GameObject
GetObject
()
{
...
...
Assets/Scripts/Interactors/Mannequin.cs
View file @
1954058a
...
...
@@ -68,16 +68,17 @@ public class Mannequin : MonoBehaviour, IObject, IBulletInteractor
this
.
floor
=
floor
;
floor
.
objOnFloor
=
this
;
transform
.
Rotate
(
new
Vector3
(
0
,
Random
.
Range
(
0
,
4
)
*
90
,
0
));
isWhite
=
true
;
Color
=
Color
.
white
;
if
(
GameManager
.
white
>=
0
)
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
white
].
IsDone
(
1
);
}
public
void
SetColor
(
bool
isWhite
)
{
Color
=
isWhite
?
Color
.
white
:
Color
.
black
;
this
.
isWhite
=
isWhite
;
if
(
GameManager
.
white
>=
0
&&
isWhite
)
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
white
].
IsDone
(
1
);
if
(
GameManager
.
black
>=
0
&&
!
isWhite
)
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
black
].
IsDone
(
1
);
if
(
GameManager
.
white
>=
0
&&
isWhite
)
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
white
].
IsDone
(
1
);
if
(
GameManager
.
black
>=
0
&&
!
isWhite
)
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
black
].
IsDone
(
1
);
}
#
region
IObject
Override
...
...
Assets/Scripts/Managers/GameManager.cs
View file @
1954058a
...
...
@@ -6,6 +6,7 @@ using UnityEngine.SceneManagement;
public
class
GameManager
:
SingletonBehaviour
<
GameManager
>
{
public
ClearUIGenerator
uiGenerator
;
public
bool
isGameOver
=
false
;
public
int
[]
clearIndex
=
new
int
[
9
];
public
int
clearCounter
=
0
;
...
...
@@ -47,39 +48,43 @@ public class GameManager : SingletonBehaviour<GameManager>
MapManager
.
inst
.
LoadMap
(
currentStage
);
}
public
void
ClearStage
()
public
IEnumerator
ClearStage
()
{
GameObject
.
Find
(
"TestTools"
).
GetComponent
<
TestTools
>().
clear
.
gameObject
.
SetActive
(
true
);
Debug
.
Log
(
"Stage Clear!"
);
yield
return
new
WaitForSeconds
(
3
);
BackToStageSelect
();
}
public
void
GameOver
()
{
Debug
.
Log
(
"Game Over!"
);
StopAllCoroutines
();
foreach
(
GameObject
child
in
MapManager
.
inst
.
players
)
Destroy
(
child
);
Destroy
(
MapManager
.
inst
.
currentMap
.
gameObject
);
}
public
IEnumerator
RestartStage
()
{
Debug
.
Log
(
"Game Restart!"
);
yield
return
new
WaitForSeconds
(
0.5f
);
GameOver
();
StartStage
();
SceneManager
.
LoadScene
(
SceneManager
.
GetActiveScene
().
name
);
}
public
void
BackToStageSelect
()
{
GameOver
(
);
Destroy
(
FindObjectOfType
<
StageSelector
>().
gameObject
);
SceneManager
.
LoadScene
(
"SelectStage"
);
}
// Start is called before the first frame update
void
Start
()
{
if
(!
MapManager
.
inst
.
isMapEditingOn
)
{
isGameOver
=
false
;
currentStage
=
Resources
.
Load
<
TextAsset
>(
"Stages/"
+
"stage"
+
(
StageSelector
.
selectedStage
+
1
));
StartStage
();
Destroy
(
FindObjectOfType
<
StageSelector
>().
gameObject
);
//Destroy(FindObjectOfType<StageSelector>().gameObject);
}
}
}
Assets/Scripts/Map/ClearCondition.cs
View file @
1954058a
...
...
@@ -2,7 +2,6 @@
using
System.Collections.Generic
;
using
UnityEngine
;
[
System
.
Serializable
]
public
class
ClearCondition
{
...
...
@@ -32,7 +31,7 @@ public class ClearCondition
Debug
.
Log
(
GameManager
.
inst
.
clearCounter
);
assignedClearUI
.
RefreshClearCondition
();
if
(
GameManager
.
inst
.
clearCounter
==
0
)
GameManager
.
inst
.
ClearStage
(
);
GameManager
.
inst
.
StartCoroutine
(
GameManager
.
inst
.
ClearStage
()
);
}
else
if
(
goal
>
count
&&
isDone
)
{
...
...
Assets/Scripts/Map/Map.cs
View file @
1954058a
...
...
@@ -223,13 +223,9 @@ public class Map : MonoBehaviour
{
case
ObjType
.
Briefcase
:
objectGrid
.
Add
(
pos
,
Instantiate
(
MapManager
.
inst
.
briefCase
,
new
Vector3
(
pos
.
x
,
0.5f
,
pos
.
y
),
Quaternion
.
identity
,
objects
.
transform
).
GetComponent
<
IObject
>());
if
(
GameManager
.
aCase
>=
0
)
clearConditions
[
GameManager
.
aCase
].
IsDone
(
0
,
1
);
break
;
case
ObjType
.
Camera
:
objectGrid
.
Add
(
pos
,
Instantiate
(
MapManager
.
inst
.
cameraTurret
,
new
Vector3
(
pos
.
x
,
0
,
pos
.
y
),
Quaternion
.
identity
,
objects
.
transform
).
GetComponent
<
IObject
>());
if
(
GameManager
.
aTurret
>=
0
)
clearConditions
[
GameManager
.
aTurret
].
IsDone
(
0
,
1
);
break
;
case
ObjType
.
Mannequin
:
objectGrid
.
Add
(
pos
,
Instantiate
(
MapManager
.
inst
.
mannequins
[
Random
.
Range
(
0
,
5
)],
new
Vector3
(
pos
.
x
,
0
,
pos
.
y
),
Quaternion
.
identity
,
objects
.
transform
).
GetComponent
<
IObject
>());
...
...
@@ -251,11 +247,11 @@ public class Map : MonoBehaviour
/// Remove Object at position.
/// </summary>
/// <param name="pos">Position of object.</param>
public
void
RemoveObject
(
Vector2Int
pos
)
public
void
RemoveObject
(
Vector2Int
pos
,
bool
isCaseInteracted
=
false
)
{
if
(
objectGrid
.
ContainsKey
(
pos
))
{
if
(
objectGrid
[
pos
].
GetType
()
==
ObjType
.
Briefcase
&&
GameManager
.
aCase
>=
0
)
if
(
objectGrid
[
pos
].
GetType
()
==
ObjType
.
Briefcase
&&
GameManager
.
aCase
>=
0
&&
!
isCaseInteracted
)
clearConditions
[
GameManager
.
aCase
].
IsDone
(
0
,
-
1
);
else
if
(
objectGrid
[
pos
].
GetType
()
==
ObjType
.
Camera
&&
GameManager
.
aTurret
>=
0
)
clearConditions
[
GameManager
.
aTurret
].
IsDone
(
0
,
-
1
);
...
...
Assets/Scripts/MapEditor.cs
View file @
1954058a
...
...
@@ -72,6 +72,9 @@ public class MapEditor : SingletonBehaviour<MapEditor>
/// <param name="_newMap"></param>
public
void
SaveMap
(
Map
_newMap
)
{
/* 맵 저장 시 반드시 승리 조건 작성할 것
* 목표가 '모든'일 경우 승리 목표는 초기 맵 기준으로 작성
*/
System
.
DateTime
time
=
System
.
DateTime
.
Now
;
string
localPath
=
"Assets/"
+
time
.
ToShortDateString
()
+
"-"
+
time
.
Hour
+
"-"
+
time
.
Minute
+
"-"
+
time
.
Second
+
".json"
;
if
(
currentMap
.
startFloors
.
Count
==
0
)
...
...
Assets/Scripts/Player.cs
View file @
1954058a
...
...
@@ -112,14 +112,6 @@ public class Player : MonoBehaviour
PlayerController
.
inst
.
bulletList
.
RemoveAt
(
0
);
}
private
void
OnTriggerEnter
(
Collider
other
)
{
if
(
other
.
GetComponent
<
IPlayerInteractor
>()
!=
null
)
{
other
.
GetComponent
<
IPlayerInteractor
>().
Interact
(
currentFloor
.
mapPos
);
}
}
// Start is called before the first frame update
void
Start
()
{
...
...
Assets/Scripts/PlayerController.cs
View file @
1954058a
...
...
@@ -132,6 +132,8 @@ public class PlayerController : SingletonBehaviour<PlayerController>
// Update is called once per frame
void
Update
()
{
if
(!
GameManager
.
inst
.
isGameOver
)
{
if
(
prePos
!=
MapPos
)
{
...
...
@@ -146,7 +148,7 @@ public class PlayerController : SingletonBehaviour<PlayerController>
if
(
Input
.
GetMouseButtonDown
(
0
))
{
//Move the current player.
if
(!
isPlayerMoving
&&
!
isPlayerShooting
)
if
(!
isPlayerMoving
&&
!
isPlayerShooting
)
{
Ray
mouseRay
=
Camera
.
main
.
ScreenPointToRay
(
Input
.
mousePosition
);
RaycastHit
hit
;
...
...
@@ -186,6 +188,7 @@ public class PlayerController : SingletonBehaviour<PlayerController>
}
}
}
}
void
LateUpdate
()
{
...
...
Assets/Scripts/StageSelector.cs
View file @
1954058a
...
...
@@ -20,6 +20,7 @@ public class StageSelector : MonoBehaviour
public
void
StartSelectedStage
()
{
gameObject
.
GetComponent
<
Canvas
>().
enabled
=
false
;
SceneManager
.
LoadScene
(
"PlayStage"
);
}
...
...
Assets/Scripts/TestTools.cs
View file @
1954058a
...
...
@@ -5,7 +5,7 @@ using UnityEngine.UI;
public
class
TestTools
:
MonoBehaviour
{
public
Text
currentBullet
;
public
Text
currentBullet
,
clear
;
public
InputField
xInput
,
yInput
;
public
void
AddFloor
()
...
...
Assets/Scripts/UIs/ClearUIGenerator.cs
View file @
1954058a
...
...
@@ -5,6 +5,7 @@ using UnityEngine;
public
class
ClearUIGenerator
:
MonoBehaviour
{
public
GameObject
clearUI
;
public
List
<
GameObject
>
uiList
;
private
int
nextx
=
-
175
;
private
int
nexty
=
-
100
;
...
...
@@ -14,7 +15,9 @@ public class ClearUIGenerator : MonoBehaviour
{
foreach
(
ClearCondition
cond
in
MapManager
.
inst
.
currentMap
.
clearConditions
)
{
ClearStatusUI
ui
=
Instantiate
(
clearUI
,
transform
).
GetComponent
<
ClearStatusUI
>();
GameObject
uiObject
=
Instantiate
(
clearUI
,
transform
);
uiList
.
Add
(
uiObject
);
ClearStatusUI
ui
=
uiObject
.
GetComponent
<
ClearStatusUI
>();
ui
.
GetComponent
<
RectTransform
>().
anchoredPosition
=
new
Vector2
(
nextx
,
nexty
);
nexty
-=
200
;
...
...
@@ -57,4 +60,14 @@ public class ClearUIGenerator : MonoBehaviour
cond
.
assignedClearUI
=
ui
;
}
}
public
void
ResetAllClearUIs
()
{
for
(
int
i
=
0
;
i
<
uiList
.
Count
;)
{
Destroy
(
uiList
[
i
]);
uiList
.
RemoveAt
(
i
);
}
nexty
=
-
100
;
}
}
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