Commit c2df5852 authored by 18손재민's avatar 18손재민

Merge branch 'interact'

parents f7d46633 759643e8
...@@ -67,6 +67,7 @@ MeshRenderer: ...@@ -67,6 +67,7 @@ MeshRenderer:
m_ProbeAnchor: {fileID: 0} m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1 m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0 m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
...@@ -105,6 +106,8 @@ MonoBehaviour: ...@@ -105,6 +106,8 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: 1, y: 0} mapPos: {x: 1, y: 0}
isPassed: 0
isGoalFloor: 0
--- !u!1 &1634709099193762938 --- !u!1 &1634709099193762938
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -172,6 +175,7 @@ MeshRenderer: ...@@ -172,6 +175,7 @@ MeshRenderer:
m_ProbeAnchor: {fileID: 0} m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1 m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0 m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
...@@ -210,6 +214,8 @@ MonoBehaviour: ...@@ -210,6 +214,8 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: -2, y: -1} mapPos: {x: -2, y: -1}
isPassed: 0
isGoalFloor: 0
--- !u!1 &1638206002697659172 --- !u!1 &1638206002697659172
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -277,6 +283,7 @@ MeshRenderer: ...@@ -277,6 +283,7 @@ MeshRenderer:
m_ProbeAnchor: {fileID: 0} m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1 m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0 m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
...@@ -315,6 +322,8 @@ MonoBehaviour: ...@@ -315,6 +322,8 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: 1, y: 1} mapPos: {x: 1, y: 1}
isPassed: 0
isGoalFloor: 0
--- !u!1 &1737410653383664023 --- !u!1 &1737410653383664023
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -326,7 +335,7 @@ GameObject: ...@@ -326,7 +335,7 @@ GameObject:
- component: {fileID: 5186655675642147998} - component: {fileID: 5186655675642147998}
- component: {fileID: 2496973653136699540} - component: {fileID: 2496973653136699540}
m_Layer: 0 m_Layer: 0
m_Name: SavedMap_2019-05-14-22-18-37 m_Name: Player3Test
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
...@@ -361,8 +370,6 @@ MonoBehaviour: ...@@ -361,8 +370,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: aa2c12f6bf26415469ec088e3e4c4dc3, type: 3} m_Script: {fileID: 11500000, guid: aa2c12f6bf26415469ec088e3e4c4dc3, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
testInputSizeX: 0
testInputSizeY: 0
maxMapSize: 5 maxMapSize: 5
floors: {fileID: 5390496715387352304} floors: {fileID: 5390496715387352304}
walls: {fileID: 6532917746544365902} walls: {fileID: 6532917746544365902}
...@@ -371,6 +378,13 @@ MonoBehaviour: ...@@ -371,6 +378,13 @@ MonoBehaviour:
- {fileID: 6317210441967747213} - {fileID: 6317210441967747213}
- {fileID: 8692496119037193698} - {fileID: 8692496119037193698}
- {fileID: 4002211523417806573} - {fileID: 4002211523417806573}
clearConditions:
- type: 0
count: 0
goal: 3
- type: 3
count: 0
goal: 3
--- !u!1 &2104754727029010325 --- !u!1 &2104754727029010325
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -438,6 +452,7 @@ MeshRenderer: ...@@ -438,6 +452,7 @@ MeshRenderer:
m_ProbeAnchor: {fileID: 0} m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1 m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0 m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
...@@ -476,6 +491,8 @@ MonoBehaviour: ...@@ -476,6 +491,8 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: 2, y: 0} mapPos: {x: 2, y: 0}
isPassed: 0
isGoalFloor: 0
--- !u!1 &2189700681577347922 --- !u!1 &2189700681577347922
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -543,6 +560,7 @@ MeshRenderer: ...@@ -543,6 +560,7 @@ MeshRenderer:
m_ProbeAnchor: {fileID: 0} m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1 m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0 m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
...@@ -581,6 +599,8 @@ MonoBehaviour: ...@@ -581,6 +599,8 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: -2, y: 2} mapPos: {x: -2, y: 2}
isPassed: 0
isGoalFloor: 0
--- !u!1 &2292282653549884484 --- !u!1 &2292282653549884484
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -648,6 +668,7 @@ MeshRenderer: ...@@ -648,6 +668,7 @@ MeshRenderer:
m_ProbeAnchor: {fileID: 0} m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1 m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0 m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
...@@ -686,6 +707,8 @@ MonoBehaviour: ...@@ -686,6 +707,8 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: -1, y: 2} mapPos: {x: -1, y: 2}
isPassed: 0
isGoalFloor: 0
--- !u!1 &2339437859421285817 --- !u!1 &2339437859421285817
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -753,6 +776,7 @@ MeshRenderer: ...@@ -753,6 +776,7 @@ MeshRenderer:
m_ProbeAnchor: {fileID: 0} m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1 m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0 m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
...@@ -791,6 +815,8 @@ MonoBehaviour: ...@@ -791,6 +815,8 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: -2, y: -2} mapPos: {x: -2, y: -2}
isPassed: 0
isGoalFloor: 0
--- !u!1 &2681926362236754680 --- !u!1 &2681926362236754680
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -858,6 +884,7 @@ MeshRenderer: ...@@ -858,6 +884,7 @@ MeshRenderer:
m_ProbeAnchor: {fileID: 0} m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1 m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0 m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
...@@ -896,6 +923,8 @@ MonoBehaviour: ...@@ -896,6 +923,8 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: 2, y: 1} mapPos: {x: 2, y: 1}
isPassed: 0
isGoalFloor: 0
--- !u!1 &3525591482656589422 --- !u!1 &3525591482656589422
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -963,6 +992,7 @@ MeshRenderer: ...@@ -963,6 +992,7 @@ MeshRenderer:
m_ProbeAnchor: {fileID: 0} m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1 m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0 m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
...@@ -1001,6 +1031,8 @@ MonoBehaviour: ...@@ -1001,6 +1031,8 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: 2, y: -2} mapPos: {x: 2, y: -2}
isPassed: 0
isGoalFloor: 0
--- !u!1 &4007647678807291638 --- !u!1 &4007647678807291638
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -1069,6 +1101,7 @@ MeshRenderer: ...@@ -1069,6 +1101,7 @@ MeshRenderer:
m_ProbeAnchor: {fileID: 0} m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1 m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0 m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
...@@ -1192,6 +1225,7 @@ MeshRenderer: ...@@ -1192,6 +1225,7 @@ MeshRenderer:
m_ProbeAnchor: {fileID: 0} m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1 m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0 m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
...@@ -1230,6 +1264,8 @@ MonoBehaviour: ...@@ -1230,6 +1264,8 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: 1, y: -2} mapPos: {x: 1, y: -2}
isPassed: 0
isGoalFloor: 0
--- !u!1 &4592160369612705167 --- !u!1 &4592160369612705167
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -1297,6 +1333,7 @@ MeshRenderer: ...@@ -1297,6 +1333,7 @@ MeshRenderer:
m_ProbeAnchor: {fileID: 0} m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1 m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0 m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
...@@ -1335,6 +1372,8 @@ MonoBehaviour: ...@@ -1335,6 +1372,8 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: 1, y: -1} mapPos: {x: 1, y: -1}
isPassed: 0
isGoalFloor: 0
--- !u!1 &4709249395185914413 --- !u!1 &4709249395185914413
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -1402,6 +1441,7 @@ MeshRenderer: ...@@ -1402,6 +1441,7 @@ MeshRenderer:
m_ProbeAnchor: {fileID: 0} m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1 m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0 m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
...@@ -1440,6 +1480,8 @@ MonoBehaviour: ...@@ -1440,6 +1480,8 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: 1, y: 2} mapPos: {x: 1, y: 2}
isPassed: 0
isGoalFloor: 0
--- !u!1 &4810397660174508062 --- !u!1 &4810397660174508062
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -1507,6 +1549,7 @@ MeshRenderer: ...@@ -1507,6 +1549,7 @@ MeshRenderer:
m_ProbeAnchor: {fileID: 0} m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1 m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0 m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
...@@ -1545,6 +1588,8 @@ MonoBehaviour: ...@@ -1545,6 +1588,8 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: -1, y: -1} mapPos: {x: -1, y: -1}
isPassed: 0
isGoalFloor: 0
--- !u!1 &5069305046428251933 --- !u!1 &5069305046428251933
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -1612,6 +1657,7 @@ MeshRenderer: ...@@ -1612,6 +1657,7 @@ MeshRenderer:
m_ProbeAnchor: {fileID: 0} m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1 m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0 m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
...@@ -1650,6 +1696,8 @@ MonoBehaviour: ...@@ -1650,6 +1696,8 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: -1, y: 0} mapPos: {x: -1, y: 0}
isPassed: 0
isGoalFloor: 0
--- !u!1 &5342110572568681991 --- !u!1 &5342110572568681991
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -1717,6 +1765,7 @@ MeshRenderer: ...@@ -1717,6 +1765,7 @@ MeshRenderer:
m_ProbeAnchor: {fileID: 0} m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1 m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0 m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
...@@ -1755,6 +1804,8 @@ MonoBehaviour: ...@@ -1755,6 +1804,8 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: 0, y: -2} mapPos: {x: 0, y: -2}
isPassed: 0
isGoalFloor: 0
--- !u!1 &5390496715387352304 --- !u!1 &5390496715387352304
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -1878,6 +1929,7 @@ MeshRenderer: ...@@ -1878,6 +1929,7 @@ MeshRenderer:
m_ProbeAnchor: {fileID: 0} m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1 m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0 m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
...@@ -2001,6 +2053,7 @@ MeshRenderer: ...@@ -2001,6 +2053,7 @@ MeshRenderer:
m_ProbeAnchor: {fileID: 0} m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1 m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0 m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
...@@ -2039,6 +2092,8 @@ MonoBehaviour: ...@@ -2039,6 +2092,8 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: 0, y: 1} mapPos: {x: 0, y: 1}
isPassed: 0
isGoalFloor: 0
--- !u!1 &6532917746544365902 --- !u!1 &6532917746544365902
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -2140,6 +2195,7 @@ MeshRenderer: ...@@ -2140,6 +2195,7 @@ MeshRenderer:
m_ProbeAnchor: {fileID: 0} m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1 m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0 m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
...@@ -2178,6 +2234,8 @@ MonoBehaviour: ...@@ -2178,6 +2234,8 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: -2, y: 1} mapPos: {x: -2, y: 1}
isPassed: 0
isGoalFloor: 0
--- !u!1 &7141810549857698684 --- !u!1 &7141810549857698684
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -2245,6 +2303,7 @@ MeshRenderer: ...@@ -2245,6 +2303,7 @@ MeshRenderer:
m_ProbeAnchor: {fileID: 0} m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1 m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0 m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
...@@ -2283,6 +2342,8 @@ MonoBehaviour: ...@@ -2283,6 +2342,8 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: 0, y: 0} mapPos: {x: 0, y: 0}
isPassed: 0
isGoalFloor: 0
--- !u!1 &7422189717627061705 --- !u!1 &7422189717627061705
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -2351,6 +2412,7 @@ MeshRenderer: ...@@ -2351,6 +2412,7 @@ MeshRenderer:
m_ProbeAnchor: {fileID: 0} m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1 m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0 m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
...@@ -2474,6 +2536,7 @@ MeshRenderer: ...@@ -2474,6 +2536,7 @@ MeshRenderer:
m_ProbeAnchor: {fileID: 0} m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1 m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0 m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
...@@ -2512,6 +2575,8 @@ MonoBehaviour: ...@@ -2512,6 +2575,8 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: -2, y: 0} mapPos: {x: -2, y: 0}
isPassed: 0
isGoalFloor: 0
--- !u!1 &7560450311381198066 --- !u!1 &7560450311381198066
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -2580,6 +2645,7 @@ MeshRenderer: ...@@ -2580,6 +2645,7 @@ MeshRenderer:
m_ProbeAnchor: {fileID: 0} m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1 m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0 m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
...@@ -2733,6 +2799,7 @@ MeshRenderer: ...@@ -2733,6 +2799,7 @@ MeshRenderer:
m_ProbeAnchor: {fileID: 0} m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1 m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0 m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
...@@ -2771,6 +2838,8 @@ MonoBehaviour: ...@@ -2771,6 +2838,8 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: -1, y: 1} mapPos: {x: -1, y: 1}
isPassed: 0
isGoalFloor: 0
--- !u!1 &8683807963293059402 --- !u!1 &8683807963293059402
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -2838,6 +2907,7 @@ MeshRenderer: ...@@ -2838,6 +2907,7 @@ MeshRenderer:
m_ProbeAnchor: {fileID: 0} m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1 m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0 m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
...@@ -2876,6 +2946,8 @@ MonoBehaviour: ...@@ -2876,6 +2946,8 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: 0, y: 2} mapPos: {x: 0, y: 2}
isPassed: 0
isGoalFloor: 0
--- !u!1 &8695425579486219508 --- !u!1 &8695425579486219508
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -2943,6 +3015,7 @@ MeshRenderer: ...@@ -2943,6 +3015,7 @@ MeshRenderer:
m_ProbeAnchor: {fileID: 0} m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1 m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0 m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
...@@ -2981,6 +3054,8 @@ MonoBehaviour: ...@@ -2981,6 +3054,8 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: 2, y: 2} mapPos: {x: 2, y: 2}
isPassed: 0
isGoalFloor: 0
--- !u!1 &8852115476851130467 --- !u!1 &8852115476851130467
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -3048,6 +3123,7 @@ MeshRenderer: ...@@ -3048,6 +3123,7 @@ MeshRenderer:
m_ProbeAnchor: {fileID: 0} m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1 m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0 m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
...@@ -3086,6 +3162,8 @@ MonoBehaviour: ...@@ -3086,6 +3162,8 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: 0, y: -1} mapPos: {x: 0, y: -1}
isPassed: 0
isGoalFloor: 0
--- !u!1 &9046791506793280589 --- !u!1 &9046791506793280589
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -3153,6 +3231,7 @@ MeshRenderer: ...@@ -3153,6 +3231,7 @@ MeshRenderer:
m_ProbeAnchor: {fileID: 0} m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1 m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0 m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
...@@ -3191,6 +3270,8 @@ MonoBehaviour: ...@@ -3191,6 +3270,8 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: -1, y: -2} mapPos: {x: -1, y: -2}
isPassed: 0
isGoalFloor: 0
--- !u!1 &9206324191454810788 --- !u!1 &9206324191454810788
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -3258,6 +3339,7 @@ MeshRenderer: ...@@ -3258,6 +3339,7 @@ MeshRenderer:
m_ProbeAnchor: {fileID: 0} m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1 m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0 m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
...@@ -3296,3 +3378,5 @@ MonoBehaviour: ...@@ -3296,3 +3378,5 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: 2, y: -1} mapPos: {x: 2, y: -1}
isPassed: 0
isGoalFloor: 0
...@@ -9,6 +9,7 @@ GameObject: ...@@ -9,6 +9,7 @@ GameObject:
serializedVersion: 6 serializedVersion: 6
m_Component: m_Component:
- component: {fileID: 52444459818764335} - component: {fileID: 52444459818764335}
- component: {fileID: 2122327709}
m_Layer: 0 m_Layer: 0
m_Name: GameManager m_Name: GameManager
m_TagString: Untagged m_TagString: Untagged
...@@ -30,3 +31,18 @@ Transform: ...@@ -30,3 +31,18 @@ Transform:
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 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
...@@ -52,15 +52,15 @@ MonoBehaviour: ...@@ -52,15 +52,15 @@ MonoBehaviour:
- {fileID: 2534561534465535505, guid: 0b323beb318071144aef94132be66541, type: 3} - {fileID: 2534561534465535505, guid: 0b323beb318071144aef94132be66541, type: 3}
- {fileID: 6001025753464815805, guid: df6f1d8b9377ec346af4255abe290fbb, type: 3} - {fileID: 6001025753464815805, guid: df6f1d8b9377ec346af4255abe290fbb, type: 3}
- {fileID: 33432975985984805, guid: ec20e06c4a993924791d02d7a4c9375c, 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, truthBullet: {fileID: 7554112578236620015, guid: bfe2c93abf5421b4a9b142f60d689533,
type: 3} type: 3}
fakeBullet: {fileID: 5866539243986221368, guid: a1830defb592fe841ab1732fd18f73a1, fakeBullet: {fileID: 5866539243986221368, guid: a1830defb592fe841ab1732fd18f73a1,
type: 3} type: 3}
mirrorBullet: {fileID: 3200095709359611570, guid: bb70103aa487bc346a6df423335477a2, mirrorBullet: {fileID: 3200095709359611570, guid: bb70103aa487bc346a6df423335477a2,
type: 3} type: 3}
players: []
player: {fileID: 494213313239918027, guid: 449b2ca4d925da541bb45c84b63aab98, type: 3}
currentMap: {fileID: 0}
surface: {fileID: 0}
stage:
- {fileID: 2496973653136699540, guid: dbb2e09c19fe5ad49b11a6b95e5ac9e8, type: 3}
...@@ -802,11 +802,6 @@ PrefabInstance: ...@@ -802,11 +802,6 @@ PrefabInstance:
m_Modification: m_Modification:
m_TransformParent: {fileID: 0} m_TransformParent: {fileID: 0}
m_Modifications: m_Modifications:
- target: {fileID: 7277015661519863741, guid: 20dee07e28273f049a9093ae4453912f,
type: 3}
propertyPath: m_NavMeshData
value:
objectReference: {fileID: 0}
- target: {fileID: 7277015661519863740, guid: 20dee07e28273f049a9093ae4453912f, - target: {fileID: 7277015661519863740, guid: 20dee07e28273f049a9093ae4453912f,
type: 3} type: 3}
propertyPath: m_Name propertyPath: m_Name
...@@ -817,6 +812,11 @@ PrefabInstance: ...@@ -817,6 +812,11 @@ PrefabInstance:
propertyPath: m_IsActive propertyPath: m_IsActive
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7277015661519863741, guid: 20dee07e28273f049a9093ae4453912f,
type: 3}
propertyPath: m_NavMeshData
value:
objectReference: {fileID: 0}
- target: {fileID: 7277015661519863742, guid: 20dee07e28273f049a9093ae4453912f, - target: {fileID: 7277015661519863742, guid: 20dee07e28273f049a9093ae4453912f,
type: 3} type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
......
...@@ -20,7 +20,8 @@ public class Briefcase : MonoBehaviour, IObject, IPlayerInteractor ...@@ -20,7 +20,8 @@ public class Briefcase : MonoBehaviour, IObject, IPlayerInteractor
public void Init(Floor floor) public void Init(Floor floor)
{ {
this.floor = floor; if (GameManager.aCase >= 0) MapManager.inst.currentMap.clearConditions[GameManager.aCase].goal++;
this.floor = floor;
PlayerController.inst.OnPlayerMove += Interact; PlayerController.inst.OnPlayerMove += Interact;
} }
...@@ -29,7 +30,16 @@ public class Briefcase : MonoBehaviour, IObject, IPlayerInteractor ...@@ -29,7 +30,16 @@ public class Briefcase : MonoBehaviour, IObject, IPlayerInteractor
Debug.Log(Position + " " + position); Debug.Log(Position + " " + position);
if (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); Destroy(gameObject);
} }
} }
......
...@@ -7,26 +7,38 @@ public class GameManager : SingletonBehaviour<GameManager> ...@@ -7,26 +7,38 @@ public class GameManager : SingletonBehaviour<GameManager>
{ {
public Material mirrorMaterial; public Material mirrorMaterial;
public int[] clearIndex = new int[9];
/* public int clearCounter = 0;
private List<IPlayerInteractor> playerInteractors; public static int nFloor, nTurret, nCase, nPlayer, aFloor, aTurret, aCase, white, black;
public void UpdateInteractorList() public void SetClearIndex(Map map)
{ {
playerInteractors = FindObjectsOfType<MonoBehaviour>().OfType<IPlayerInteractor>().ToList(); for (int i = 0; i < 9; i++) clearIndex[i] = -1;
foreach (var child in map.clearConditions)
{
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) // Start is called before the first frame update
{ void Start()
foreach (var interactor in playerInteractors) {
{ if (!MapManager.inst.isMapEditingOn)
interactor.Interact(pos); MapManager.inst.LoadMap(MapManager.inst.stage[0]);
} }
}
*/
} }
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();
}
}
}
}
fileFormatVersion: 2
guid: 4899567b2a08a374da0108b53f6d6683
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
...@@ -8,6 +8,8 @@ public class Floor : MonoBehaviour ...@@ -8,6 +8,8 @@ public class Floor : MonoBehaviour
/// Position of this floor at the map. /// Position of this floor at the map.
/// </summary> /// </summary>
public Vector2Int mapPos; public Vector2Int mapPos;
public bool isPassed;
public bool isGoalFloor = false;
// Start is called before the first frame update // Start is called before the first frame update
void Start() void Start()
......
...@@ -5,7 +5,7 @@ using System.IO; ...@@ -5,7 +5,7 @@ using System.IO;
public class Map : MonoBehaviour public class Map : MonoBehaviour
{ {
public int testInputSizeX, testInputSizeY; [Header("Map Data")]
public int maxMapSize; public int maxMapSize;
public Dictionary<Vector2Int, Floor> floorGrid; public Dictionary<Vector2Int, Floor> floorGrid;
public Dictionary<Vector2, Wall> wallGrid; public Dictionary<Vector2, Wall> wallGrid;
...@@ -15,6 +15,8 @@ public class Map : MonoBehaviour ...@@ -15,6 +15,8 @@ public class Map : MonoBehaviour
public GameObject objects; public GameObject objects;
public List<Floor> startFloors; public List<Floor> startFloors;
public List<ClearCondition> clearConditions;
/// <summary> /// <summary>
/// Get floor at position. /// Get floor at position.
/// </summary> /// </summary>
...@@ -57,6 +59,9 @@ public class Map : MonoBehaviour ...@@ -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.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].mapPos = pos;
floorGrid[pos].isPassed = false;
if (GameManager.aFloor >= 0)
MapManager.inst.currentMap.clearConditions[GameManager.aFloor].goal++;
StartCoroutine(MapManager.inst.Rebaker()); StartCoroutine(MapManager.inst.Rebaker());
} }
else else
......
...@@ -7,16 +7,17 @@ using UnityEngine.AI; ...@@ -7,16 +7,17 @@ using UnityEngine.AI;
public class MapManager : SingletonBehaviour<MapManager> public class MapManager : SingletonBehaviour<MapManager>
{ {
public bool isMapEditingOn; public bool isMapEditingOn;
[Header("Instances")]
public Floor floor; public Floor floor;
public NormalWall normalWall; public NormalWall normalWall;
public Mirror mirror; public Mirror mirror;
public GameObject[] objects; public GameObject[] objects;
public GameObject truthBullet, fakeBullet, mirrorBullet;
public List<GameObject> players; public List<GameObject> players;
public GameObject player; public GameObject player;
public Map currentMap; public Map currentMap;
public NavMeshSurface surface; public NavMeshSurface surface;
public Map[] stage; public Map[] stage;
public GameObject truthBullet, fakeBullet, mirrorBullet;
public BulletFactory bulletFactory; public BulletFactory bulletFactory;
public void LoadMap(Map _newMap) public void LoadMap(Map _newMap)
...@@ -26,8 +27,9 @@ public class MapManager : SingletonBehaviour<MapManager> ...@@ -26,8 +27,9 @@ public class MapManager : SingletonBehaviour<MapManager>
currentMap = Instantiate(_newMap); currentMap = Instantiate(_newMap);
currentMap.transform.position = new Vector3(0, 0, 0); currentMap.transform.position = new Vector3(0, 0, 0);
surface.BuildNavMesh(); surface.BuildNavMesh();
GameManager.inst.SetClearIndex(currentMap);
for (int i = 0; i < currentMap.startFloors.Count; i++) 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() public IEnumerator Rebaker()
{ {
...@@ -44,8 +46,7 @@ public class MapManager : SingletonBehaviour<MapManager> ...@@ -44,8 +46,7 @@ public class MapManager : SingletonBehaviour<MapManager>
// Start is called before the first frame update // Start is called before the first frame update
void Start() void Start()
{ {
if(!isMapEditingOn)
LoadMap(stage[0]);
} }
// Update is called once per frame // Update is called once per frame
......
...@@ -15,6 +15,8 @@ public class Player : MonoBehaviour ...@@ -15,6 +15,8 @@ public class Player : MonoBehaviour
public GameObject shootingArm; public GameObject shootingArm;
Animator anim; Animator anim;
public Floor currentFloor;
/// <summary> /// <summary>
/// Set this player as the current player. /// Set this player as the current player.
/// </summary> /// </summary>
...@@ -55,9 +57,7 @@ public class Player : MonoBehaviour ...@@ -55,9 +57,7 @@ public class Player : MonoBehaviour
GetComponent<NavMeshAgent>().SetDestination(destination); GetComponent<NavMeshAgent>().SetDestination(destination);
} }
else else
{
Debug.Log("Destination is not reachable."); Debug.Log("Destination is not reachable.");
}
} }
/// <summary> /// <summary>
/// Check if player is arrived at the destination. /// Check if player is arrived at the destination.
...@@ -68,10 +68,10 @@ public class Player : MonoBehaviour ...@@ -68,10 +68,10 @@ public class Player : MonoBehaviour
{ {
anim.SetBool("isWalking", true); anim.SetBool("isWalking", true);
while (Mathf.Abs(transform.position.x - destination.x) > 0.01f || Mathf.Abs(transform.position.z - destination.z) > 0.01f) while (Mathf.Abs(transform.position.x - destination.x) > 0.01f || Mathf.Abs(transform.position.z - destination.z) > 0.01f)
{
yield return null; yield return null;
}
transform.position = new Vector3(destination.x, transform.position.y, destination.z); 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); anim.SetBool("isWalking", false);
PlayerController.inst.isPlayerMoving = false; PlayerController.inst.isPlayerMoving = false;
} }
......
...@@ -27,6 +27,42 @@ public class PlayerController : SingletonBehaviour<PlayerController> ...@@ -27,6 +27,42 @@ public class PlayerController : SingletonBehaviour<PlayerController>
public event Action<Vector2Int> OnPlayerMove; 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() public string GetCurrentBullet()
{ {
return bulletList.Count > 0 ? bulletList[bulletCount].ToString() : null; return bulletList.Count > 0 ? bulletList[bulletCount].ToString() : null;
...@@ -58,7 +94,7 @@ public class PlayerController : SingletonBehaviour<PlayerController> ...@@ -58,7 +94,7 @@ public class PlayerController : SingletonBehaviour<PlayerController>
{ {
if (prePos != MapPos) if (prePos != MapPos)
{ {
Debug.Log(MapPos); //Debug.Log(MapPos);
OnPlayerMove?.Invoke(MapPos); OnPlayerMove?.Invoke(MapPos);
prePos = MapPos; prePos = MapPos;
} }
...@@ -80,13 +116,13 @@ public class PlayerController : SingletonBehaviour<PlayerController> ...@@ -80,13 +116,13 @@ public class PlayerController : SingletonBehaviour<PlayerController>
currentPlayer = hit.transform.gameObject.GetComponent<Player>(); currentPlayer = hit.transform.gameObject.GetComponent<Player>();
StartCoroutine(currentPlayer.SetCurrentPlayer()); StartCoroutine(currentPlayer.SetCurrentPlayer());
StartCoroutine(currentPlayer.CountPlayerClick(Time.time)); 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")) else if (Physics.Raycast(mouseRay, out hit) && hit.collider.gameObject.tag.Equals("floor"))
{ {
if (currentPlayer != null) if (currentPlayer != null)
currentPlayer.MovePlayer(hit.collider.gameObject.transform.position); currentPlayer.MovePlayer(hit.collider.gameObject.transform.position);
Debug.Log(hit.collider.gameObject.tag); //Debug.Log(hit.collider.gameObject.tag);
} }
else if (hit.collider == null) else if (hit.collider == null)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment