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
2ac1f652
Commit
2ac1f652
authored
Jul 10, 2019
by
18손재민
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'map'
parents
d4320995
1954058a
Changes
20
Hide 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 @
2ac1f652
...
@@ -89,7 +89,6 @@ GameObject:
...
@@ -89,7 +89,6 @@ GameObject:
-
component
:
{
fileID
:
2534561534465045041
}
-
component
:
{
fileID
:
2534561534465045041
}
-
component
:
{
fileID
:
2534561534464242193
}
-
component
:
{
fileID
:
2534561534464242193
}
-
component
:
{
fileID
:
2534561534463275217
}
-
component
:
{
fileID
:
2534561534463275217
}
-
component
:
{
fileID
:
-2850530927027858165
}
-
component
:
{
fileID
:
-4559840392902712278
}
-
component
:
{
fileID
:
-4559840392902712278
}
-
component
:
{
fileID
:
-954323813722370706
}
-
component
:
{
fileID
:
-954323813722370706
}
m_Layer
:
13
m_Layer
:
13
...
@@ -162,19 +161,6 @@ MeshRenderer:
...
@@ -162,19 +161,6 @@ MeshRenderer:
m_SortingLayerID
:
0
m_SortingLayerID
:
0
m_SortingLayer
:
0
m_SortingLayer
:
0
m_SortingOrder
:
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
---
!u!114
&-4559840392902712278
MonoBehaviour
:
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_ObjectHideFlags
:
0
...
...
Assets/Prefabs/TestTools.prefab
View file @
2ac1f652
...
@@ -422,6 +422,85 @@ MonoBehaviour:
...
@@ -422,6 +422,85 @@ MonoBehaviour:
m_VerticalOverflow
:
0
m_VerticalOverflow
:
0
m_LineSpacing
:
1
m_LineSpacing
:
1
m_Text
:
add mannequin
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
---
!u!1
&356685241964599882
GameObject
:
GameObject
:
m_ObjectHideFlags
:
0
m_ObjectHideFlags
:
0
...
@@ -961,6 +1040,7 @@ RectTransform:
...
@@ -961,6 +1040,7 @@ RectTransform:
-
{
fileID
:
1444571407224148019
}
-
{
fileID
:
1444571407224148019
}
-
{
fileID
:
1444571408487427164
}
-
{
fileID
:
1444571408487427164
}
-
{
fileID
:
1466596363
}
-
{
fileID
:
1466596363
}
-
{
fileID
:
1854540598
}
m_Father
:
{
fileID
:
1444571408780882984
}
m_Father
:
{
fileID
:
1444571408780882984
}
m_RootOrder
:
0
m_RootOrder
:
0
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
...
@@ -1508,6 +1588,7 @@ MonoBehaviour:
...
@@ -1508,6 +1588,7 @@ MonoBehaviour:
m_Name
:
m_Name
:
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
currentBullet
:
{
fileID
:
3656934010764012818
}
currentBullet
:
{
fileID
:
3656934010764012818
}
clear
:
{
fileID
:
1854540599
}
xInput
:
{
fileID
:
1444571407224148016
}
xInput
:
{
fileID
:
1444571407224148016
}
yInput
:
{
fileID
:
1444571408487427165
}
yInput
:
{
fileID
:
1444571408487427165
}
---
!u!1
&1444571408874085630
---
!u!1
&1444571408874085630
...
...
Assets/Resources/Stages/stage1.json
View file @
2ac1f652
{
"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"
:
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"
:
1
,
"xPos"
:
2.0
,
"yPos"
:
0.0
},{
"tag"
:
1
,
"xPos"
:
2.0
,
"yPos"
:
-1.0
},{
"tag"
:
1
,
"xPos"
:
2.0
,
"yPos"
:
-2.0
},{
"tag"
:
1
,
"xPos"
:
1.0
,
"yPos"
:
-2.0
},{
"tag"
:
1
,
"xPos"
:
0.0
,
"yPos"
:
-2.0
},{
"tag"
:
1
,
"xPos"
:
-1.0
,
"yPos"
:
-2.0
},{
"tag"
:
1
,
"xPos"
:
-1.0
,
"yPos"
:
-1.0
},{
"tag"
:
1
,
"xPos"
:
-2.0
,
"yPos"
:
-1.0
},{
"tag"
:
9
,
"xPos"
:
-2.0
,
"yPos"
:
-1.0
},{
"tag"
:
1
,
"xPos"
:
-2.0
,
"yPos"
:
-2.0
},{
"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
]}
{
"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
\ No newline at end of file
Assets/Resources/Stages/stage2.json
View file @
2ac1f652
{
"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"
:
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"
:
1
,
"xPos"
:
2.0
,
"yPos"
:
0.0
},{
"tag"
:
1
,
"xPos"
:
2.0
,
"yPos"
:
-1.0
},{
"tag"
:
1
,
"xPos"
:
2.0
,
"yPos"
:
-2.0
},{
"tag"
:
1
,
"xPos"
:
1.0
,
"yPos"
:
-2.0
},{
"tag"
:
1
,
"xPos"
:
0.0
,
"yPos"
:
-2.0
},{
"tag"
:
1
,
"xPos"
:
-1.0
,
"yPos"
:
-2.0
},{
"tag"
:
1
,
"xPos"
:
-1.0
,
"yPos"
:
-1.0
},{
"tag"
:
1
,
"xPos"
:
-2.0
,
"yPos"
:
-1.0
},{
"tag"
:
9
,
"xPos"
:
-2.0
,
"yPos"
:
-1.0
},{
"tag"
:
1
,
"xPos"
:
-2.0
,
"yPos"
:
-2.0
},{
"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
]}
{
"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
\ No newline at end of file
Assets/Resources/Stages/stage2.json.meta
View file @
2ac1f652
fileFormatVersion: 2
fileFormatVersion: 2
guid:
b65159d8e62109d4990676399736ddbf
guid:
a0bbdbca5d3d3904b8af6f4f7266190d
TextScriptImporter:
TextScriptImporter:
externalObjects: {}
externalObjects: {}
userData:
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"
:
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"
:
1
,
"xPos"
:
2.0
,
"yPos"
:
0.0
},{
"tag"
:
1
,
"xPos"
:
2.0
,
"yPos"
:
-1.0
},{
"tag"
:
1
,
"xPos"
:
2.0
,
"yPos"
:
-2.0
},{
"tag"
:
1
,
"xPos"
:
1.0
,
"yPos"
:
-2.0
},{
"tag"
:
1
,
"xPos"
:
0.0
,
"yPos"
:
-2.0
},{
"tag"
:
1
,
"xPos"
:
-1.0
,
"yPos"
:
-2.0
},{
"tag"
:
1
,
"xPos"
:
-1.0
,
"yPos"
:
-1.0
},{
"tag"
:
1
,
"xPos"
:
-2.0
,
"yPos"
:
-1.0
},{
"tag"
:
9
,
"xPos"
:
-2.0
,
"yPos"
:
-1.0
},{
"tag"
:
1
,
"xPos"
:
-2.0
,
"yPos"
:
-2.0
},{
"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
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 @
2ac1f652
...
@@ -153,6 +153,7 @@ MonoBehaviour:
...
@@ -153,6 +153,7 @@ MonoBehaviour:
m_Name
:
m_Name
:
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
clearUI
:
{
fileID
:
4890012631615838995
,
guid
:
874af447cef689e478ca96b4d1d197c2
,
type
:
3
}
clearUI
:
{
fileID
:
4890012631615838995
,
guid
:
874af447cef689e478ca96b4d1d197c2
,
type
:
3
}
uiList
:
[]
---
!u!114
&158856769
---
!u!114
&158856769
MonoBehaviour
:
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_ObjectHideFlags
:
0
...
@@ -305,7 +306,7 @@ Light:
...
@@ -305,7 +306,7 @@ Light:
m_BounceIntensity
:
1
m_BounceIntensity
:
1
m_ColorTemperature
:
6570
m_ColorTemperature
:
6570
m_UseColorTemperature
:
0
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_UseBoundingSphereOverride
:
0
m_ShadowRadius
:
0
m_ShadowRadius
:
0
m_ShadowAngle
:
0
m_ShadowAngle
:
0
...
...
Assets/Scripts/Interactors/Briefcase.cs
View file @
2ac1f652
...
@@ -51,18 +51,22 @@ public class Briefcase : MonoBehaviour, IObject, IPlayerInteractor
...
@@ -51,18 +51,22 @@ public class Briefcase : MonoBehaviour, IObject, IPlayerInteractor
public
void
Interact
(
Vector2Int
position
)
public
void
Interact
(
Vector2Int
position
)
{
{
Debug
.
Log
(
Position
+
" "
+
position
);
if
(!
GameManager
.
inst
.
isGameOver
)
if
(
Position
==
position
)
{
{
if
(
dropBullet
!=
BulletCode
.
None
)
Debug
.
Log
(
Position
+
" "
+
position
);
PlayerController
.
inst
.
AddBullet
(
dropBullet
);
if
(
Position
==
position
)
if
(
GameManager
.
aCase
>=
0
)
{
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
aCase
].
IsDone
(
1
);
if
(
dropBullet
!=
BulletCode
.
None
)
if
(
GameManager
.
nCase
>=
0
)
PlayerController
.
inst
.
AddBullet
(
dropBullet
);
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
nCase
].
IsDone
(
1
);
if
(
GameManager
.
aCase
>=
0
)
floor
.
objOnFloor
=
null
;
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
aCase
].
IsDone
(
1
);
MapManager
.
inst
.
currentMap
.
RemoveObject
(
Position
);
if
(
GameManager
.
nCase
>=
0
)
}
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
nCase
].
IsDone
(
1
);
floor
.
objOnFloor
=
null
;
MapManager
.
inst
.
currentMap
.
RemoveObject
(
Position
,
true
);
}
}
}
}
ObjType
IObject
.
GetType
()
ObjType
IObject
.
GetType
()
...
...
Assets/Scripts/Interactors/CameraTurret.cs
View file @
2ac1f652
...
@@ -13,7 +13,8 @@ public class CameraTurret : MonoBehaviour, IObject, IBreakable, IPlayerInteracto
...
@@ -13,7 +13,8 @@ public class CameraTurret : MonoBehaviour, IObject, IBreakable, IPlayerInteracto
this
.
floor
=
floor
;
this
.
floor
=
floor
;
floor
.
objOnFloor
=
this
;
floor
.
objOnFloor
=
this
;
PlayerController
.
inst
.
OnPlayerMove
+=
Interact
;
PlayerController
.
inst
.
OnPlayerMove
+=
Interact
;
}
if
(
GameManager
.
aTurret
>=
0
)
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
aTurret
].
IsDone
(
0
,
1
);
}
public
void
Break
()
public
void
Break
()
{
{
...
@@ -26,11 +27,16 @@ public class CameraTurret : MonoBehaviour, IObject, IBreakable, IPlayerInteracto
...
@@ -26,11 +27,16 @@ public class CameraTurret : MonoBehaviour, IObject, IBreakable, IPlayerInteracto
public
void
Interact
(
Vector2Int
pos
)
public
void
Interact
(
Vector2Int
pos
)
{
{
if
(
Position
.
IsInAdjacentArea
(
pos
,
1
)
&&
MapManager
.
inst
.
currentMap
.
GetWallAtPos
((
Vector2
)(
Position
+
pos
)
/
2
)
==
null
)
if
(!
GameManager
.
inst
.
isGameOver
)
{
{
StartCoroutine
(
GameManager
.
inst
.
RestartStage
());
if
(
Position
.
IsInAdjacentArea
(
pos
,
1
)
&&
MapManager
.
inst
.
currentMap
.
GetWallAtPos
((
Vector2
)(
Position
+
pos
)
/
2
)
==
null
)
{
//TODO : Restart Level
GameManager
.
inst
.
isGameOver
=
true
;
StartCoroutine
(
GameManager
.
inst
.
RestartStage
());
GameManager
.
inst
.
uiGenerator
.
ResetAllClearUIs
();
//TODO : Restart Level
}
}
}
}
}
...
...
Assets/Scripts/Interactors/Mannequin.cs
View file @
2ac1f652
...
@@ -68,16 +68,17 @@ public class Mannequin : MonoBehaviour, IObject, IBulletInteractor
...
@@ -68,16 +68,17 @@ public class Mannequin : MonoBehaviour, IObject, IBulletInteractor
this
.
floor
=
floor
;
this
.
floor
=
floor
;
floor
.
objOnFloor
=
this
;
floor
.
objOnFloor
=
this
;
transform
.
Rotate
(
new
Vector3
(
0
,
Random
.
Range
(
0
,
4
)
*
90
,
0
));
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
)
public
void
SetColor
(
bool
isWhite
)
{
{
Color
=
isWhite
?
Color
.
white
:
Color
.
black
;
Color
=
isWhite
?
Color
.
white
:
Color
.
black
;
this
.
isWhite
=
isWhite
;
this
.
isWhite
=
isWhite
;
if
(
GameManager
.
white
>=
0
&&
isWhite
)
if
(
GameManager
.
white
>=
0
&&
isWhite
)
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
white
].
IsDone
(
1
);
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
white
].
IsDone
(
1
);
if
(
GameManager
.
black
>=
0
&&
!
isWhite
)
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
black
].
IsDone
(
1
);
if
(
GameManager
.
black
>=
0
&&
!
isWhite
)
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
black
].
IsDone
(
1
);
}
}
#
region
IObject
Override
#
region
IObject
Override
...
...
Assets/Scripts/Managers/GameManager.cs
View file @
2ac1f652
...
@@ -6,6 +6,7 @@ using UnityEngine.SceneManagement;
...
@@ -6,6 +6,7 @@ using UnityEngine.SceneManagement;
public
class
GameManager
:
SingletonBehaviour
<
GameManager
>
public
class
GameManager
:
SingletonBehaviour
<
GameManager
>
{
{
public
ClearUIGenerator
uiGenerator
;
public
ClearUIGenerator
uiGenerator
;
public
bool
isGameOver
=
false
;
public
int
[]
clearIndex
=
new
int
[
9
];
public
int
[]
clearIndex
=
new
int
[
9
];
public
int
clearCounter
=
0
;
public
int
clearCounter
=
0
;
...
@@ -47,39 +48,43 @@ public class GameManager : SingletonBehaviour<GameManager>
...
@@ -47,39 +48,43 @@ public class GameManager : SingletonBehaviour<GameManager>
MapManager
.
inst
.
LoadMap
(
currentStage
);
MapManager
.
inst
.
LoadMap
(
currentStage
);
}
}
public
void
ClearStage
()
public
IEnumerator
ClearStage
()
{
{
GameObject
.
Find
(
"TestTools"
).
GetComponent
<
TestTools
>().
clear
.
gameObject
.
SetActive
(
true
);
Debug
.
Log
(
"Stage Clear!"
);
Debug
.
Log
(
"Stage Clear!"
);
yield
return
new
WaitForSeconds
(
3
);
BackToStageSelect
();
}
}
public
void
GameOver
()
public
void
GameOver
()
{
{
Debug
.
Log
(
"Game Over!"
);
Debug
.
Log
(
"Game Over!"
);
StopAllCoroutines
();
StopAllCoroutines
();
foreach
(
GameObject
child
in
MapManager
.
inst
.
players
)
Destroy
(
child
);
Destroy
(
MapManager
.
inst
.
currentMap
.
gameObject
);
}
}
public
IEnumerator
RestartStage
()
public
IEnumerator
RestartStage
()
{
{
Debug
.
Log
(
"Game Restart!"
);
Debug
.
Log
(
"Game Restart!"
);
yield
return
new
WaitForSeconds
(
0.5f
);
yield
return
new
WaitForSeconds
(
0.5f
);
GameOver
();
SceneManager
.
LoadScene
(
SceneManager
.
GetActiveScene
().
name
);
StartStage
();
}
}
public
void
BackToStageSelect
()
public
void
BackToStageSelect
()
{
{
GameOver
(
);
Destroy
(
FindObjectOfType
<
StageSelector
>().
gameObject
);
SceneManager
.
LoadScene
(
"SelectStage"
);
SceneManager
.
LoadScene
(
"SelectStage"
);
}
}
// Start is called before the first frame update
// Start is called before the first frame update
void
Start
()
void
Start
()
{
{
currentStage
=
Resources
.
Load
<
TextAsset
>(
"Stages/"
+
"stage"
+
(
StageSelector
.
selectedStage
+
1
));
if
(!
MapManager
.
inst
.
isMapEditingOn
)
StartStage
();
{
Destroy
(
FindObjectOfType
<
StageSelector
>().
gameObject
);
isGameOver
=
false
;
currentStage
=
Resources
.
Load
<
TextAsset
>(
"Stages/"
+
"stage"
+
(
StageSelector
.
selectedStage
+
1
));
StartStage
();
//Destroy(FindObjectOfType<StageSelector>().gameObject);
}
}
}
}
}
Assets/Scripts/Map/ClearCondition.cs
View file @
2ac1f652
...
@@ -2,7 +2,6 @@
...
@@ -2,7 +2,6 @@
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
UnityEngine
;
using
UnityEngine
;
[
System
.
Serializable
]
[
System
.
Serializable
]
public
class
ClearCondition
public
class
ClearCondition
{
{
...
@@ -32,7 +31,7 @@ public class ClearCondition
...
@@ -32,7 +31,7 @@ public class ClearCondition
Debug
.
Log
(
GameManager
.
inst
.
clearCounter
);
Debug
.
Log
(
GameManager
.
inst
.
clearCounter
);
assignedClearUI
.
RefreshClearCondition
();
assignedClearUI
.
RefreshClearCondition
();
if
(
GameManager
.
inst
.
clearCounter
==
0
)
if
(
GameManager
.
inst
.
clearCounter
==
0
)
GameManager
.
inst
.
ClearStage
(
);
GameManager
.
inst
.
StartCoroutine
(
GameManager
.
inst
.
ClearStage
()
);
}
}
else
if
(
goal
>
count
&&
isDone
)
else
if
(
goal
>
count
&&
isDone
)
{
{
...
...
Assets/Scripts/Map/Map.cs
View file @
2ac1f652
...
@@ -223,13 +223,9 @@ public class Map : MonoBehaviour
...
@@ -223,13 +223,9 @@ public class Map : MonoBehaviour
{
{
case
ObjType
.
Briefcase
:
case
ObjType
.
Briefcase
:
objectGrid
.
Add
(
pos
,
Instantiate
(
MapManager
.
inst
.
briefCase
,
new
Vector3
(
pos
.
x
,
0.5f
,
pos
.
y
),
Quaternion
.
identity
,
objects
.
transform
).
GetComponent
<
IObject
>());
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
;
break
;
case
ObjType
.
Camera
:
case
ObjType
.
Camera
:
objectGrid
.
Add
(
pos
,
Instantiate
(
MapManager
.
inst
.
cameraTurret
,
new
Vector3
(
pos
.
x
,
0
,
pos
.
y
),
Quaternion
.
identity
,
objects
.
transform
).
GetComponent
<
IObject
>());
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
;
break
;
case
ObjType
.
Mannequin
:
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
>());
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
...
@@ -251,11 +247,11 @@ public class Map : MonoBehaviour
/// Remove Object at position.
/// Remove Object at position.
/// </summary>
/// </summary>
/// <param name="pos">Position of object.</param>
/// <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
.
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
);
clearConditions
[
GameManager
.
aCase
].
IsDone
(
0
,
-
1
);
else
if
(
objectGrid
[
pos
].
GetType
()
==
ObjType
.
Camera
&&
GameManager
.
aTurret
>=
0
)
else
if
(
objectGrid
[
pos
].
GetType
()
==
ObjType
.
Camera
&&
GameManager
.
aTurret
>=
0
)
clearConditions
[
GameManager
.
aTurret
].
IsDone
(
0
,
-
1
);
clearConditions
[
GameManager
.
aTurret
].
IsDone
(
0
,
-
1
);
...
...
Assets/Scripts/MapEditor.cs
View file @
2ac1f652
...
@@ -72,6 +72,9 @@ public class MapEditor : SingletonBehaviour<MapEditor>
...
@@ -72,6 +72,9 @@ public class MapEditor : SingletonBehaviour<MapEditor>
/// <param name="_newMap"></param>
/// <param name="_newMap"></param>
public
void
SaveMap
(
Map
_newMap
)
public
void
SaveMap
(
Map
_newMap
)
{
{
/* 맵 저장 시 반드시 승리 조건 작성할 것
* 목표가 '모든'일 경우 승리 목표는 초기 맵 기준으로 작성
*/
System
.
DateTime
time
=
System
.
DateTime
.
Now
;
System
.
DateTime
time
=
System
.
DateTime
.
Now
;
string
localPath
=
"Assets/"
+
time
.
ToShortDateString
()
+
"-"
+
time
.
Hour
+
"-"
+
time
.
Minute
+
"-"
+
time
.
Second
+
".json"
;
string
localPath
=
"Assets/"
+
time
.
ToShortDateString
()
+
"-"
+
time
.
Hour
+
"-"
+
time
.
Minute
+
"-"
+
time
.
Second
+
".json"
;
if
(
currentMap
.
startFloors
.
Count
==
0
)
if
(
currentMap
.
startFloors
.
Count
==
0
)
...
...
Assets/Scripts/Player.cs
View file @
2ac1f652
...
@@ -112,14 +112,6 @@ public class Player : MonoBehaviour
...
@@ -112,14 +112,6 @@ public class Player : MonoBehaviour
PlayerController
.
inst
.
bulletList
.
RemoveAt
(
0
);
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
// Start is called before the first frame update
void
Start
()
void
Start
()
{
{
...
...
Assets/Scripts/PlayerController.cs
View file @
2ac1f652
...
@@ -133,57 +133,60 @@ public class PlayerController : SingletonBehaviour<PlayerController>
...
@@ -133,57 +133,60 @@ public class PlayerController : SingletonBehaviour<PlayerController>
// Update is called once per frame
// Update is called once per frame
void
Update
()
void
Update
()
{
{
if
(
prePos
!=
MapPos
)
if
(!
GameManager
.
inst
.
isGameOver
)
{
{
//Debug.Log(MapPos);
if
(
prePos
!=
MapPos
)
OnPlayerMove
?.
Invoke
(
MapPos
);
{
prePos
=
MapPos
;
//Debug.Log(MapPos);
}
OnPlayerMove
?.
Invoke
(
MapPos
);
prePos
=
MapPos
;
}
//Control player only if camera is not zooming in to or out from the current player
//Control player only if camera is not zooming in to or out from the current player
if
(!
isZooming
)
if
(!
isZooming
)
{
if
(
Input
.
GetMouseButtonDown
(
0
))
{
{
//Move the current player.
if
(
Input
.
GetMouseButtonDown
(
0
))
if
(!
isPlayerMoving
&&
!
isPlayerShooting
)
{
{
Ray
mouseRay
=
Camera
.
main
.
ScreenPointToRay
(
Input
.
mousePosition
);
//Move the current player.
RaycastHit
hit
;
if
(!
isPlayerMoving
&&
!
isPlayerShooting
)
if
(
Physics
.
Raycast
(
mouseRay
,
out
hit
)
&&
hit
.
collider
.
gameObject
.
tag
.
Equals
(
"Player"
))
{
if
(
currentPlayer
!=
null
)
currentPlayer
.
ResetCurrentPlayer
();
currentPlayer
=
hit
.
transform
.
gameObject
.
GetComponent
<
Player
>();
StartCoroutine
(
currentPlayer
.
SetCurrentPlayer
());
StartCoroutine
(
currentPlayer
.
CountPlayerClick
(
Time
.
time
));
//Debug.Log(hit.collider.gameObject.tag);
}
else
if
(
Physics
.
Raycast
(
mouseRay
,
out
hit
)
&&
hit
.
collider
.
gameObject
.
tag
.
Equals
(
"floor"
))
{
{
if
(
currentPlayer
!=
null
)
Ray
mouseRay
=
Camera
.
main
.
ScreenPointToRay
(
Input
.
mousePosition
);
currentPlayer
.
MovePlayer
(
hit
.
collider
.
gameObject
.
transform
.
position
);
RaycastHit
hit
;
//Debug.Log(hit.collider.gameObject.tag);
if
(
Physics
.
Raycast
(
mouseRay
,
out
hit
)
&&
hit
.
collider
.
gameObject
.
tag
.
Equals
(
"Player"
))
{
if
(
currentPlayer
!=
null
)
currentPlayer
.
ResetCurrentPlayer
();
currentPlayer
=
hit
.
transform
.
gameObject
.
GetComponent
<
Player
>();
StartCoroutine
(
currentPlayer
.
SetCurrentPlayer
());
StartCoroutine
(
currentPlayer
.
CountPlayerClick
(
Time
.
time
));
//Debug.Log(hit.collider.gameObject.tag);
}
else
if
(
Physics
.
Raycast
(
mouseRay
,
out
hit
)
&&
hit
.
collider
.
gameObject
.
tag
.
Equals
(
"floor"
))
{
if
(
currentPlayer
!=
null
)
currentPlayer
.
MovePlayer
(
hit
.
collider
.
gameObject
.
transform
.
position
);
//Debug.Log(hit.collider.gameObject.tag);
}
else
if
(
hit
.
collider
==
null
)
{
if
(
currentPlayer
!=
null
)
currentPlayer
.
ResetCurrentPlayer
();
}
}
}
else
if
(
hit
.
collider
==
null
)
else
if
(
isPlayerShooting
)
{
{
if
(
currentPlayer
!=
null
)
if
(
bulletList
.
Count
>
0
)
currentPlayer
.
ResetCurrentPlayer
();
{
currentPlayer
.
Shoot
(
bulletList
[
0
]);
}
}
}
}
}
else
if
(
isPlayerShooting
)
else
if
(
Input
.
GetMouseButtonDown
(
1
)
&&
isPlayerShooting
)
{
{
if
(
bulletList
.
Count
>
0
)
StartCoroutine
(
Camera
.
main
.
GetComponent
<
CameraController
>().
ZoomOutFromPlayer
(
currentPlayer
));
{
currentPlayer
.
shootingArm
.
rotation
=
currentPlayer
.
armRotation
;
currentPlayer
.
Shoot
(
bulletList
[
0
]);
}
}
}
}
}
else
if
(
Input
.
GetMouseButtonDown
(
1
)
&&
isPlayerShooting
)
{
StartCoroutine
(
Camera
.
main
.
GetComponent
<
CameraController
>().
ZoomOutFromPlayer
(
currentPlayer
));
currentPlayer
.
shootingArm
.
rotation
=
currentPlayer
.
armRotation
;
}
}
}
}
}
...
...
Assets/Scripts/StageSelector.cs
View file @
2ac1f652
...
@@ -20,6 +20,7 @@ public class StageSelector : MonoBehaviour
...
@@ -20,6 +20,7 @@ public class StageSelector : MonoBehaviour
public
void
StartSelectedStage
()
public
void
StartSelectedStage
()
{
{
gameObject
.
GetComponent
<
Canvas
>().
enabled
=
false
;
SceneManager
.
LoadScene
(
"PlayStage"
);
SceneManager
.
LoadScene
(
"PlayStage"
);
}
}
...
...
Assets/Scripts/TestTools.cs
View file @
2ac1f652
...
@@ -5,7 +5,7 @@ using UnityEngine.UI;
...
@@ -5,7 +5,7 @@ using UnityEngine.UI;
public
class
TestTools
:
MonoBehaviour
public
class
TestTools
:
MonoBehaviour
{
{
public
Text
currentBullet
;
public
Text
currentBullet
,
clear
;
public
InputField
xInput
,
yInput
;
public
InputField
xInput
,
yInput
;
public
void
AddFloor
()
public
void
AddFloor
()
...
...
Assets/Scripts/UIs/ClearUIGenerator.cs
View file @
2ac1f652
...
@@ -5,6 +5,7 @@ using UnityEngine;
...
@@ -5,6 +5,7 @@ using UnityEngine;
public
class
ClearUIGenerator
:
MonoBehaviour
public
class
ClearUIGenerator
:
MonoBehaviour
{
{
public
GameObject
clearUI
;
public
GameObject
clearUI
;
public
List
<
GameObject
>
uiList
;
private
int
nextx
=
-
175
;
private
int
nextx
=
-
175
;
private
int
nexty
=
-
100
;
private
int
nexty
=
-
100
;
...
@@ -14,7 +15,9 @@ public class ClearUIGenerator : MonoBehaviour
...
@@ -14,7 +15,9 @@ public class ClearUIGenerator : MonoBehaviour
{
{
foreach
(
ClearCondition
cond
in
MapManager
.
inst
.
currentMap
.
clearConditions
)
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
);
ui
.
GetComponent
<
RectTransform
>().
anchoredPosition
=
new
Vector2
(
nextx
,
nexty
);
nexty
-=
200
;
nexty
-=
200
;
...
@@ -57,4 +60,14 @@ public class ClearUIGenerator : MonoBehaviour
...
@@ -57,4 +60,14 @@ public class ClearUIGenerator : MonoBehaviour
cond
.
assignedClearUI
=
ui
;
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