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
c2df5852
Commit
c2df5852
authored
Jun 07, 2019
by
18손재민
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'interact'
parents
f7d46633
759643e8
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
269 additions
and
45 deletions
+269
-45
Player3Test.prefab
Assets/Player3Test.prefab
+87
-3
GameManager.prefab
Assets/Prefabs/GameManager.prefab
+16
-0
MapManager.prefab
Assets/Prefabs/MapManager.prefab
+6
-6
SampleScene.unity
Assets/Scenes/SampleScene.unity
+5
-5
Briefcase.cs
Assets/Scripts/Interactors/Briefcase.cs
+12
-2
GameManager.cs
Assets/Scripts/Managers/GameManager.cs
+29
-17
ClearCondition.cs
Assets/Scripts/Map/ClearCondition.cs
+47
-0
ClearCondition.cs.meta
Assets/Scripts/Map/ClearCondition.cs.meta
+11
-0
Floor.cs
Assets/Scripts/Map/Floor.cs
+2
-0
Map.cs
Assets/Scripts/Map/Map.cs
+6
-1
MapManager.cs
Assets/Scripts/MapManager.cs
+5
-4
Player.cs
Assets/Scripts/Player.cs
+4
-4
PlayerController.cs
Assets/Scripts/PlayerController.cs
+39
-3
No files found.
Assets/Player3Test.prefab
View file @
c2df5852
...
...
@@ -67,6 +67,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
...
...
@@ -105,6 +106,8 @@ MonoBehaviour:
m_Name
:
m_EditorClassIdentifier
:
mapPos
:
{
x
:
1
,
y
:
0
}
isPassed
:
0
isGoalFloor
:
0
---
!u!1
&1634709099193762938
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -172,6 +175,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
...
...
@@ -210,6 +214,8 @@ MonoBehaviour:
m_Name
:
m_EditorClassIdentifier
:
mapPos
:
{
x
:
-2
,
y
:
-1
}
isPassed
:
0
isGoalFloor
:
0
---
!u!1
&1638206002697659172
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -277,6 +283,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
...
...
@@ -315,6 +322,8 @@ MonoBehaviour:
m_Name
:
m_EditorClassIdentifier
:
mapPos
:
{
x
:
1
,
y
:
1
}
isPassed
:
0
isGoalFloor
:
0
---
!u!1
&1737410653383664023
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -326,7 +335,7 @@ GameObject:
-
component
:
{
fileID
:
5186655675642147998
}
-
component
:
{
fileID
:
2496973653136699540
}
m_Layer
:
0
m_Name
:
SavedMap_2019-05-14-22-18-37
m_Name
:
Player3Test
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
...
...
@@ -361,8 +370,6 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
aa2c12f6bf26415469ec088e3e4c4dc3
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
testInputSizeX
:
0
testInputSizeY
:
0
maxMapSize
:
5
floors
:
{
fileID
:
5390496715387352304
}
walls
:
{
fileID
:
6532917746544365902
}
...
...
@@ -371,6 +378,13 @@ MonoBehaviour:
-
{
fileID
:
6317210441967747213
}
-
{
fileID
:
8692496119037193698
}
-
{
fileID
:
4002211523417806573
}
clearConditions
:
-
type
:
0
count
:
0
goal
:
3
-
type
:
3
count
:
0
goal
:
3
---
!u!1
&2104754727029010325
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -438,6 +452,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
...
...
@@ -476,6 +491,8 @@ MonoBehaviour:
m_Name
:
m_EditorClassIdentifier
:
mapPos
:
{
x
:
2
,
y
:
0
}
isPassed
:
0
isGoalFloor
:
0
---
!u!1
&2189700681577347922
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -543,6 +560,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
...
...
@@ -581,6 +599,8 @@ MonoBehaviour:
m_Name
:
m_EditorClassIdentifier
:
mapPos
:
{
x
:
-2
,
y
:
2
}
isPassed
:
0
isGoalFloor
:
0
---
!u!1
&2292282653549884484
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -648,6 +668,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
...
...
@@ -686,6 +707,8 @@ MonoBehaviour:
m_Name
:
m_EditorClassIdentifier
:
mapPos
:
{
x
:
-1
,
y
:
2
}
isPassed
:
0
isGoalFloor
:
0
---
!u!1
&2339437859421285817
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -753,6 +776,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
...
...
@@ -791,6 +815,8 @@ MonoBehaviour:
m_Name
:
m_EditorClassIdentifier
:
mapPos
:
{
x
:
-2
,
y
:
-2
}
isPassed
:
0
isGoalFloor
:
0
---
!u!1
&2681926362236754680
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -858,6 +884,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
...
...
@@ -896,6 +923,8 @@ MonoBehaviour:
m_Name
:
m_EditorClassIdentifier
:
mapPos
:
{
x
:
2
,
y
:
1
}
isPassed
:
0
isGoalFloor
:
0
---
!u!1
&3525591482656589422
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -963,6 +992,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
...
...
@@ -1001,6 +1031,8 @@ MonoBehaviour:
m_Name
:
m_EditorClassIdentifier
:
mapPos
:
{
x
:
2
,
y
:
-2
}
isPassed
:
0
isGoalFloor
:
0
---
!u!1
&4007647678807291638
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -1069,6 +1101,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
...
...
@@ -1192,6 +1225,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
...
...
@@ -1230,6 +1264,8 @@ MonoBehaviour:
m_Name
:
m_EditorClassIdentifier
:
mapPos
:
{
x
:
1
,
y
:
-2
}
isPassed
:
0
isGoalFloor
:
0
---
!u!1
&4592160369612705167
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -1297,6 +1333,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
...
...
@@ -1335,6 +1372,8 @@ MonoBehaviour:
m_Name
:
m_EditorClassIdentifier
:
mapPos
:
{
x
:
1
,
y
:
-1
}
isPassed
:
0
isGoalFloor
:
0
---
!u!1
&4709249395185914413
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -1402,6 +1441,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
...
...
@@ -1440,6 +1480,8 @@ MonoBehaviour:
m_Name
:
m_EditorClassIdentifier
:
mapPos
:
{
x
:
1
,
y
:
2
}
isPassed
:
0
isGoalFloor
:
0
---
!u!1
&4810397660174508062
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -1507,6 +1549,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
...
...
@@ -1545,6 +1588,8 @@ MonoBehaviour:
m_Name
:
m_EditorClassIdentifier
:
mapPos
:
{
x
:
-1
,
y
:
-1
}
isPassed
:
0
isGoalFloor
:
0
---
!u!1
&5069305046428251933
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -1612,6 +1657,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
...
...
@@ -1650,6 +1696,8 @@ MonoBehaviour:
m_Name
:
m_EditorClassIdentifier
:
mapPos
:
{
x
:
-1
,
y
:
0
}
isPassed
:
0
isGoalFloor
:
0
---
!u!1
&5342110572568681991
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -1717,6 +1765,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
...
...
@@ -1755,6 +1804,8 @@ MonoBehaviour:
m_Name
:
m_EditorClassIdentifier
:
mapPos
:
{
x
:
0
,
y
:
-2
}
isPassed
:
0
isGoalFloor
:
0
---
!u!1
&5390496715387352304
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -1878,6 +1929,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
...
...
@@ -2001,6 +2053,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
...
...
@@ -2039,6 +2092,8 @@ MonoBehaviour:
m_Name
:
m_EditorClassIdentifier
:
mapPos
:
{
x
:
0
,
y
:
1
}
isPassed
:
0
isGoalFloor
:
0
---
!u!1
&6532917746544365902
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -2140,6 +2195,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
...
...
@@ -2178,6 +2234,8 @@ MonoBehaviour:
m_Name
:
m_EditorClassIdentifier
:
mapPos
:
{
x
:
-2
,
y
:
1
}
isPassed
:
0
isGoalFloor
:
0
---
!u!1
&7141810549857698684
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -2245,6 +2303,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
...
...
@@ -2283,6 +2342,8 @@ MonoBehaviour:
m_Name
:
m_EditorClassIdentifier
:
mapPos
:
{
x
:
0
,
y
:
0
}
isPassed
:
0
isGoalFloor
:
0
---
!u!1
&7422189717627061705
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -2351,6 +2412,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
...
...
@@ -2474,6 +2536,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
...
...
@@ -2512,6 +2575,8 @@ MonoBehaviour:
m_Name
:
m_EditorClassIdentifier
:
mapPos
:
{
x
:
-2
,
y
:
0
}
isPassed
:
0
isGoalFloor
:
0
---
!u!1
&7560450311381198066
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -2580,6 +2645,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
...
...
@@ -2733,6 +2799,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
...
...
@@ -2771,6 +2838,8 @@ MonoBehaviour:
m_Name
:
m_EditorClassIdentifier
:
mapPos
:
{
x
:
-1
,
y
:
1
}
isPassed
:
0
isGoalFloor
:
0
---
!u!1
&8683807963293059402
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -2838,6 +2907,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
...
...
@@ -2876,6 +2946,8 @@ MonoBehaviour:
m_Name
:
m_EditorClassIdentifier
:
mapPos
:
{
x
:
0
,
y
:
2
}
isPassed
:
0
isGoalFloor
:
0
---
!u!1
&8695425579486219508
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -2943,6 +3015,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
...
...
@@ -2981,6 +3054,8 @@ MonoBehaviour:
m_Name
:
m_EditorClassIdentifier
:
mapPos
:
{
x
:
2
,
y
:
2
}
isPassed
:
0
isGoalFloor
:
0
---
!u!1
&8852115476851130467
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -3048,6 +3123,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
...
...
@@ -3086,6 +3162,8 @@ MonoBehaviour:
m_Name
:
m_EditorClassIdentifier
:
mapPos
:
{
x
:
0
,
y
:
-1
}
isPassed
:
0
isGoalFloor
:
0
---
!u!1
&9046791506793280589
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -3153,6 +3231,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
...
...
@@ -3191,6 +3270,8 @@ MonoBehaviour:
m_Name
:
m_EditorClassIdentifier
:
mapPos
:
{
x
:
-1
,
y
:
-2
}
isPassed
:
0
isGoalFloor
:
0
---
!u!1
&9206324191454810788
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -3258,6 +3339,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
...
...
@@ -3296,3 +3378,5 @@ MonoBehaviour:
m_Name
:
m_EditorClassIdentifier
:
mapPos
:
{
x
:
2
,
y
:
-1
}
isPassed
:
0
isGoalFloor
:
0
Assets/Prefabs/GameManager.prefab
View file @
c2df5852
...
...
@@ -9,6 +9,7 @@ GameObject:
serializedVersion
:
6
m_Component
:
-
component
:
{
fileID
:
52444459818764335
}
-
component
:
{
fileID
:
2122327709
}
m_Layer
:
0
m_Name
:
GameManager
m_TagString
:
Untagged
...
...
@@ -30,3 +31,18 @@ Transform:
m_Father
:
{
fileID
:
0
}
m_RootOrder
:
0
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!114
&2122327709
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
52444459818764334
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
f94477ce50cfef746baa12d77bb9d4eb
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
mirrorMaterial
:
{
fileID
:
0
}
clearIndex
:
000000000000000000000000000000000000000000000000000000000000000000000000
clearCounter
:
0
Assets/Prefabs/MapManager.prefab
View file @
c2df5852
...
...
@@ -52,15 +52,15 @@ MonoBehaviour:
-
{
fileID
:
2534561534465535505
,
guid
:
0b323beb318071144aef94132be66541
,
type
:
3
}
-
{
fileID
:
6001025753464815805
,
guid
:
df6f1d8b9377ec346af4255abe290fbb
,
type
:
3
}
-
{
fileID
:
33432975985984805
,
guid
:
ec20e06c4a993924791d02d7a4c9375c
,
type
:
3
}
players
:
[]
player
:
{
fileID
:
494213313239918027
,
guid
:
449b2ca4d925da541bb45c84b63aab98
,
type
:
3
}
currentMap
:
{
fileID
:
0
}
surface
:
{
fileID
:
0
}
stage
:
-
{
fileID
:
2496973653136699540
,
guid
:
dbb2e09c19fe5ad49b11a6b95e5ac9e8
,
type
:
3
}
truthBullet
:
{
fileID
:
7554112578236620015
,
guid
:
bfe2c93abf5421b4a9b142f60d689533
,
type
:
3
}
fakeBullet
:
{
fileID
:
5866539243986221368
,
guid
:
a1830defb592fe841ab1732fd18f73a1
,
type
:
3
}
mirrorBullet
:
{
fileID
:
3200095709359611570
,
guid
:
bb70103aa487bc346a6df423335477a2
,
type
:
3
}
players
:
[]
player
:
{
fileID
:
494213313239918027
,
guid
:
449b2ca4d925da541bb45c84b63aab98
,
type
:
3
}
currentMap
:
{
fileID
:
0
}
surface
:
{
fileID
:
0
}
stage
:
-
{
fileID
:
2496973653136699540
,
guid
:
dbb2e09c19fe5ad49b11a6b95e5ac9e8
,
type
:
3
}
Assets/Scenes/SampleScene.unity
View file @
c2df5852
...
...
@@ -802,11 +802,6 @@ PrefabInstance:
m_Modification
:
m_TransformParent
:
{
fileID
:
0
}
m_Modifications
:
-
target
:
{
fileID
:
7277015661519863741
,
guid
:
20dee07e28273f049a9093ae4453912f
,
type
:
3
}
propertyPath
:
m_NavMeshData
value
:
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
7277015661519863740
,
guid
:
20dee07e28273f049a9093ae4453912f
,
type
:
3
}
propertyPath
:
m_Name
...
...
@@ -817,6 +812,11 @@ PrefabInstance:
propertyPath
:
m_IsActive
value
:
1
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
7277015661519863741
,
guid
:
20dee07e28273f049a9093ae4453912f
,
type
:
3
}
propertyPath
:
m_NavMeshData
value
:
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
7277015661519863742
,
guid
:
20dee07e28273f049a9093ae4453912f
,
type
:
3
}
propertyPath
:
m_LocalPosition.x
...
...
Assets/Scripts/Interactors/Briefcase.cs
View file @
c2df5852
...
...
@@ -20,6 +20,7 @@ public class Briefcase : MonoBehaviour, IObject, IPlayerInteractor
public
void
Init
(
Floor
floor
)
{
if
(
GameManager
.
aCase
>=
0
)
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
aCase
].
goal
++;
this
.
floor
=
floor
;
PlayerController
.
inst
.
OnPlayerMove
+=
Interact
;
}
...
...
@@ -29,7 +30,16 @@ public class Briefcase : MonoBehaviour, IObject, IPlayerInteractor
Debug
.
Log
(
Position
+
" "
+
position
);
if
(
Position
==
position
)
{
IngameManager
.
inst
.
BriefcaseCount
++;
if
(
GameManager
.
aCase
>=
0
)
{
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
aCase
].
count
++;
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
aCase
].
IsDone
();
}
if
(
GameManager
.
nCase
>=
0
)
{
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
nCase
].
count
++;
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
nCase
].
IsDone
();
}
Destroy
(
gameObject
);
}
}
...
...
Assets/Scripts/Managers/GameManager.cs
View file @
c2df5852
...
...
@@ -7,26 +7,38 @@ public class GameManager : SingletonBehaviour<GameManager>
{
public
Material
mirrorMaterial
;
public
int
[]
clearIndex
=
new
int
[
9
];
public
int
clearCounter
=
0
;
public
static
int
nFloor
,
nTurret
,
nCase
,
nPlayer
,
aFloor
,
aTurret
,
aCase
,
white
,
black
;
/*
private List<IPlayerInteractor> playerInteractors;
public void UpdateInteractorList(
)
public
void
SetClearIndex
(
Map
map
)
{
for
(
int
i
=
0
;
i
<
9
;
i
++)
clearIndex
[
i
]
=
-
1
;
foreach
(
var
child
in
map
.
clearConditions
)
{
playerInteractors = FindObjectsOfType<MonoBehaviour>().OfType<IPlayerInteractor>().ToList();
clearIndex
[(
int
)
child
.
type
]
=
map
.
clearConditions
.
IndexOf
(
child
);
clearCounter
++;
}
nFloor
=
clearIndex
[(
int
)
ClearType
.
NFloor
];
nTurret
=
clearIndex
[(
int
)
ClearType
.
NTurret
];
nCase
=
clearIndex
[(
int
)
ClearType
.
NCase
];
nPlayer
=
clearIndex
[(
int
)
ClearType
.
NPlayer
];
aFloor
=
clearIndex
[(
int
)
ClearType
.
AllFloor
];
aTurret
=
clearIndex
[(
int
)
ClearType
.
AllTurret
];
aCase
=
clearIndex
[(
int
)
ClearType
.
AllCase
];
white
=
clearIndex
[(
int
)
ClearType
.
White
];
black
=
clearIndex
[(
int
)
ClearType
.
Black
];
}
public void AddInteractor
()
public
void
ClearStage
()
{
Debug
.
Log
(
"Stage Clear!"
);
}
public void TriggerPlayerInteractors(Vector2Int pos)
{
foreach (var interactor in playerInteractors)
// Start is called before the first frame update
void
Start
()
{
interactor.Interact(pos);
}
if
(!
MapManager
.
inst
.
isMapEditingOn
)
MapManager
.
inst
.
LoadMap
(
MapManager
.
inst
.
stage
[
0
]);
}
*/
}
Assets/Scripts/Map/ClearCondition.cs
0 → 100644
View file @
c2df5852
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
public
enum
ClearType
{
NFloor
,
NTurret
,
NCase
,
NPlayer
,
AllFloor
,
AllTurret
,
AllCase
,
White
,
Black
}
[
System
.
Serializable
]
public
class
ClearCondition
{
public
ClearType
type
;
public
int
count
;
public
int
goal
;
bool
isDone
=
false
;
public
ClearCondition
(
ClearType
_type
,
int
_goal
)
{
type
=
_type
;
goal
=
_goal
;
count
=
0
;
}
public
void
IsDone
()
{
if
(!
isDone
)
{
if
(
goal
<=
count
)
{
GameManager
.
inst
.
clearCounter
--;
GameManager
.
inst
.
clearIndex
[(
int
)
type
]
=
-
1
;
isDone
=
true
;
if
(
GameManager
.
inst
.
clearCounter
==
0
)
GameManager
.
inst
.
ClearStage
();
}
}
}
}
Assets/Scripts/Map/ClearCondition.cs.meta
0 → 100644
View file @
c2df5852
fileFormatVersion: 2
guid: 4899567b2a08a374da0108b53f6d6683
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Assets/Scripts/Map/Floor.cs
View file @
c2df5852
...
...
@@ -8,6 +8,8 @@ public class Floor : MonoBehaviour
/// Position of this floor at the map.
/// </summary>
public
Vector2Int
mapPos
;
public
bool
isPassed
;
public
bool
isGoalFloor
=
false
;
// Start is called before the first frame update
void
Start
()
...
...
Assets/Scripts/Map/Map.cs
View file @
c2df5852
...
...
@@ -5,7 +5,7 @@ using System.IO;
public
class
Map
:
MonoBehaviour
{
public
int
testInputSizeX
,
testInputSizeY
;
[
Header
(
"Map Data"
)]
public
int
maxMapSize
;
public
Dictionary
<
Vector2Int
,
Floor
>
floorGrid
;
public
Dictionary
<
Vector2
,
Wall
>
wallGrid
;
...
...
@@ -15,6 +15,8 @@ public class Map : MonoBehaviour
public
GameObject
objects
;
public
List
<
Floor
>
startFloors
;
public
List
<
ClearCondition
>
clearConditions
;
/// <summary>
/// Get floor at position.
/// </summary>
...
...
@@ -57,6 +59,9 @@ public class Map : MonoBehaviour
{
floorGrid
.
Add
(
pos
,
Instantiate
(
MapManager
.
inst
.
floor
,
new
Vector3
(
pos
.
x
,
0
,
pos
.
y
),
Quaternion
.
identity
,
floors
.
transform
).
GetComponent
<
Floor
>());
floorGrid
[
pos
].
mapPos
=
pos
;
floorGrid
[
pos
].
isPassed
=
false
;
if
(
GameManager
.
aFloor
>=
0
)
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
aFloor
].
goal
++;
StartCoroutine
(
MapManager
.
inst
.
Rebaker
());
}
else
...
...
Assets/Scripts/MapManager.cs
View file @
c2df5852
...
...
@@ -7,16 +7,17 @@ using UnityEngine.AI;
public
class
MapManager
:
SingletonBehaviour
<
MapManager
>
{
public
bool
isMapEditingOn
;
[
Header
(
"Instances"
)]
public
Floor
floor
;
public
NormalWall
normalWall
;
public
Mirror
mirror
;
public
GameObject
[]
objects
;
public
GameObject
truthBullet
,
fakeBullet
,
mirrorBullet
;
public
List
<
GameObject
>
players
;
public
GameObject
player
;
public
Map
currentMap
;
public
NavMeshSurface
surface
;
public
Map
[]
stage
;
public
GameObject
truthBullet
,
fakeBullet
,
mirrorBullet
;
public
BulletFactory
bulletFactory
;
public
void
LoadMap
(
Map
_newMap
)
...
...
@@ -26,8 +27,9 @@ public class MapManager : SingletonBehaviour<MapManager>
currentMap
=
Instantiate
(
_newMap
);
currentMap
.
transform
.
position
=
new
Vector3
(
0
,
0
,
0
);
surface
.
BuildNavMesh
();
GameManager
.
inst
.
SetClearIndex
(
currentMap
);
for
(
int
i
=
0
;
i
<
currentMap
.
startFloors
.
Count
;
i
++)
players
.
Add
(
Instantiate
(
player
,
currentMap
.
startFloors
[
i
].
transform
.
position
+
new
Vector3
(
0
,
0.1f
,
0
),
Quaternion
.
identity
)
);
PlayerController
.
inst
.
CreatePlayer
(
currentMap
.
startFloors
[
i
]
);
}
public
IEnumerator
Rebaker
()
{
...
...
@@ -44,8 +46,7 @@ public class MapManager : SingletonBehaviour<MapManager>
// Start is called before the first frame update
void
Start
()
{
if
(!
isMapEditingOn
)
LoadMap
(
stage
[
0
]);
}
// Update is called once per frame
...
...
Assets/Scripts/Player.cs
View file @
c2df5852
...
...
@@ -15,6 +15,8 @@ public class Player : MonoBehaviour
public
GameObject
shootingArm
;
Animator
anim
;
public
Floor
currentFloor
;
/// <summary>
/// Set this player as the current player.
/// </summary>
...
...
@@ -55,10 +57,8 @@ public class Player : MonoBehaviour
GetComponent
<
NavMeshAgent
>().
SetDestination
(
destination
);
}
else
{
Debug
.
Log
(
"Destination is not reachable."
);
}
}
/// <summary>
/// Check if player is arrived at the destination.
/// </summary>
...
...
@@ -68,10 +68,10 @@ public class Player : MonoBehaviour
{
anim
.
SetBool
(
"isWalking"
,
true
);
while
(
Mathf
.
Abs
(
transform
.
position
.
x
-
destination
.
x
)
>
0.01f
||
Mathf
.
Abs
(
transform
.
position
.
z
-
destination
.
z
)
>
0.01f
)
{
yield
return
null
;
}
transform
.
position
=
new
Vector3
(
destination
.
x
,
transform
.
position
.
y
,
destination
.
z
);
currentFloor
=
MapManager
.
inst
.
currentMap
.
GetFloorAtPos
(
new
Vector2Int
((
int
)
destination
.
x
,
(
int
)
destination
.
z
));
PlayerController
.
inst
.
CheckCurrentFloors
();
anim
.
SetBool
(
"isWalking"
,
false
);
PlayerController
.
inst
.
isPlayerMoving
=
false
;
}
...
...
Assets/Scripts/PlayerController.cs
View file @
c2df5852
...
...
@@ -27,6 +27,42 @@ public class PlayerController : SingletonBehaviour<PlayerController>
public
event
Action
<
Vector2Int
>
OnPlayerMove
;
public
void
CreatePlayer
(
Floor
floor
)
{
GameObject
player
=
Instantiate
(
MapManager
.
inst
.
player
,
floor
.
transform
.
position
+
new
Vector3
(
0
,
0.1f
,
0
),
Quaternion
.
identity
);
player
.
GetComponent
<
Player
>().
currentFloor
=
floor
;
MapManager
.
inst
.
players
.
Add
(
player
);
if
(
GameManager
.
nPlayer
>=
0
)
{
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
nPlayer
].
count
=
MapManager
.
inst
.
players
.
Count
;
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
nPlayer
].
IsDone
();
}
CheckCurrentFloors
();
}
public
void
CheckCurrentFloors
()
{
int
goalFloorCount
=
0
;
foreach
(
GameObject
child
in
MapManager
.
inst
.
players
)
{
Debug
.
Log
(
"df"
);
if
(
child
.
GetComponent
<
Player
>().
currentFloor
.
isGoalFloor
)
goalFloorCount
++;
Debug
.
Log
(
goalFloorCount
);
}
if
(
GameManager
.
aFloor
>=
0
)
{
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
aFloor
].
count
=
goalFloorCount
;
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
aFloor
].
IsDone
();
}
if
(
GameManager
.
nFloor
>=
0
)
{
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
nFloor
].
count
=
goalFloorCount
;
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
nFloor
].
IsDone
();
}
}
//For test
public
string
GetCurrentBullet
()
{
return
bulletList
.
Count
>
0
?
bulletList
[
bulletCount
].
ToString
()
:
null
;
...
...
@@ -58,7 +94,7 @@ public class PlayerController : SingletonBehaviour<PlayerController>
{
if
(
prePos
!=
MapPos
)
{
Debug
.
Log
(
MapPos
);
//
Debug.Log(MapPos);
OnPlayerMove
?.
Invoke
(
MapPos
);
prePos
=
MapPos
;
}
...
...
@@ -80,13 +116,13 @@ public class PlayerController : SingletonBehaviour<PlayerController>
currentPlayer
=
hit
.
transform
.
gameObject
.
GetComponent
<
Player
>();
StartCoroutine
(
currentPlayer
.
SetCurrentPlayer
());
StartCoroutine
(
currentPlayer
.
CountPlayerClick
(
Time
.
time
));
Debug
.
Log
(
hit
.
collider
.
gameObject
.
tag
);
//
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
);
//
Debug.Log(hit.collider.gameObject.tag);
}
else
if
(
hit
.
collider
==
null
)
{
...
...
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