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
95715b17
Commit
95715b17
authored
Jun 24, 2019
by
18손재민
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
맵에디터 수정중. 현재 맵 에디터에서 거울을 생성하면 거울이 고장나는 버그가 있음. 수정할 것.
parent
af34d9ac
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
234 additions
and
1038 deletions
+234
-1038
Goal Sign.prefab
Assets/Prefabs/MapEditor/Goal Sign.prefab
+82
-0
Goal Sign.prefab.meta
Assets/Prefabs/MapEditor/Goal Sign.prefab.meta
+1
-1
MapEditorCanvas.prefab
Assets/Prefabs/MapEditor/MapEditorCanvas.prefab
+5
-2
SavedMap_2019-05-14-22-39-32.prefab
Assets/SavedMap_2019-05-14-22-39-32.prefab
+0
-982
MapEditor.unity
Assets/Scenes/MapEditor.unity
+70
-1
GameManager.cs
Assets/Scripts/Managers/GameManager.cs
+13
-0
ClearCondition.cs
Assets/Scripts/Map/ClearCondition.cs
+16
-13
Map.cs
Assets/Scripts/Map/Map.cs
+8
-8
MapEditor.cs
Assets/Scripts/MapEditor/MapEditor.cs
+39
-31
No files found.
Assets/Prefabs/MapEditor/Goal Sign.prefab
0 → 100644
View file @
95715b17
%YAML
1.1
%TAG
!u!
tag:unity3d.com,2011:
---
!u!1
&646008409675212278
GameObject
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
serializedVersion
:
6
m_Component
:
-
component
:
{
fileID
:
5027787848459216200
}
-
component
:
{
fileID
:
841522919254151368
}
m_Layer
:
0
m_Name
:
Goal Sign
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
---
!u!4
&5027787848459216200
Transform
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
646008409675212278
}
m_LocalRotation
:
{
x
:
0.7071068
,
y
:
0
,
z
:
0
,
w
:
0.7071068
}
m_LocalPosition
:
{
x
:
0
,
y
:
0
,
z
:
2
}
m_LocalScale
:
{
x
:
2
,
y
:
2
,
z
:
1
}
m_Children
:
[]
m_Father
:
{
fileID
:
0
}
m_RootOrder
:
0
m_LocalEulerAnglesHint
:
{
x
:
90
,
y
:
0
,
z
:
0
}
---
!u!212
&841522919254151368
SpriteRenderer
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
646008409675212278
}
m_Enabled
:
1
m_CastShadows
:
0
m_ReceiveShadows
:
0
m_DynamicOccludee
:
1
m_MotionVectors
:
1
m_LightProbeUsage
:
1
m_ReflectionProbeUsage
:
1
m_RenderingLayerMask
:
1
m_RendererPriority
:
0
m_Materials
:
-
{
fileID
:
10754
,
guid
:
0000000000000000f000000000000000
,
type
:
0
}
m_StaticBatchInfo
:
firstSubMesh
:
0
subMeshCount
:
0
m_StaticBatchRoot
:
{
fileID
:
0
}
m_ProbeAnchor
:
{
fileID
:
0
}
m_LightProbeVolumeOverride
:
{
fileID
:
0
}
m_ScaleInLightmap
:
1
m_ReceiveGI
:
1
m_PreserveUVs
:
0
m_IgnoreNormalsForChartDetection
:
0
m_ImportantGI
:
0
m_StitchLightmapSeams
:
0
m_SelectedEditorRenderState
:
0
m_MinimumChartSize
:
4
m_AutoUVMaxDistance
:
0.5
m_AutoUVMaxAngle
:
89
m_LightmapParameters
:
{
fileID
:
0
}
m_SortingLayerID
:
0
m_SortingLayer
:
0
m_SortingOrder
:
0
m_Sprite
:
{
fileID
:
21300000
,
guid
:
b489da500f22d7a4b8c478cae46976ad
,
type
:
3
}
m_Color
:
{
r
:
1
,
g
:
0.99501103
,
b
:
0
,
a
:
1
}
m_FlipX
:
0
m_FlipY
:
0
m_DrawMode
:
0
m_Size
:
{
x
:
0.16
,
y
:
0.16
}
m_AdaptiveModeThreshold
:
0.5
m_SpriteTileMode
:
0
m_WasSpriteAssigned
:
1
m_MaskInteraction
:
0
m_SpriteSortPoint
:
0
Assets/
SavedMap_2019-05-14-22-39-32
.prefab.meta
→
Assets/
Prefabs/MapEditor/Goal Sign
.prefab.meta
View file @
95715b17
fileFormatVersion: 2
guid:
32ff564f49869bf40a53d07394eb081b
guid:
6801da87b9c13dc4a97e2c31d6e37ab3
PrefabImporter:
externalObjects: {}
userData:
...
...
Assets/Prefabs/MapEditor/MapEditorCanvas.prefab
View file @
95715b17
...
...
@@ -2381,10 +2381,13 @@ MonoBehaviour:
modeSign
:
{
fileID
:
153720729
}
startSign
:
{
fileID
:
1215997560627761150
,
guid
:
106914c4661964b47ad09efcc4bfba69
,
type
:
3
}
goalSign
:
{
fileID
:
646008409675212278
,
guid
:
6801da87b9c13dc4a97e2c31d6e37ab3
,
type
:
3
}
mapSizeSetter
:
{
fileID
:
8774990006778924709
}
mapEditorTiles
:
{
fileID
:
1549724121
}
editWallMat
:
{
fileID
:
2100000
,
guid
:
c741ce421701e7c43b7a48c4045a116b
,
type
:
2
}
realWallMat
:
{
fileID
:
2100000
,
guid
:
9274dfd686c38aa4f91d973c6de1c8e9
,
type
:
2
}
editNormalMat
:
{
fileID
:
2100000
,
guid
:
c741ce421701e7c43b7a48c4045a116b
,
type
:
2
}
editMirrorMat
:
{
fileID
:
2100000
,
guid
:
27bba424cd653c047a5d5f6dbd1a0da5
,
type
:
2
}
realNormalMat
:
{
fileID
:
2100000
,
guid
:
9274dfd686c38aa4f91d973c6de1c8e9
,
type
:
2
}
realMirrorMat
:
{
fileID
:
2100000
,
guid
:
d8c28898e746cd84d8503fbd26995a55
,
type
:
2
}
---
!u!1
&1444571408998523813
GameObject
:
m_ObjectHideFlags
:
0
...
...
Assets/SavedMap_2019-05-14-22-39-32.prefab
deleted
100644 → 0
View file @
af34d9ac
This diff is collapsed.
Click to expand it.
Assets/Scenes/MapEditor.unity
View file @
95715b17
...
...
@@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity
:
1
m_CustomReflection
:
{
fileID
:
0
}
m_Sun
:
{
fileID
:
0
}
m_IndirectSpecularColor
:
{
r
:
0.18028334
,
g
:
0.225713
4
,
b
:
0.30692226
,
a
:
1
}
m_IndirectSpecularColor
:
{
r
:
0.18028334
,
g
:
0.225713
28
,
b
:
0.3069217
,
a
:
1
}
m_UseRadianceAmbientProbe
:
0
---
!u!157
&3
LightmapSettings
:
...
...
@@ -501,6 +501,75 @@ PrefabInstance:
objectReference
:
{
fileID
:
0
}
m_RemovedComponents
:
[]
m_SourcePrefab
:
{
fileID
:
100100000
,
guid
:
20dee07e28273f049a9093ae4453912f
,
type
:
3
}
---
!u!1001
&1133429038
PrefabInstance
:
m_ObjectHideFlags
:
0
serializedVersion
:
2
m_Modification
:
m_TransformParent
:
{
fileID
:
0
}
m_Modifications
:
-
target
:
{
fileID
:
52444459818764334
,
guid
:
42247a938bb6e554eb00dc08303a72d6
,
type
:
3
}
propertyPath
:
m_Name
value
:
GameManager
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
52444459818764335
,
guid
:
42247a938bb6e554eb00dc08303a72d6
,
type
:
3
}
propertyPath
:
m_LocalPosition.x
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
52444459818764335
,
guid
:
42247a938bb6e554eb00dc08303a72d6
,
type
:
3
}
propertyPath
:
m_LocalPosition.y
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
52444459818764335
,
guid
:
42247a938bb6e554eb00dc08303a72d6
,
type
:
3
}
propertyPath
:
m_LocalPosition.z
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
52444459818764335
,
guid
:
42247a938bb6e554eb00dc08303a72d6
,
type
:
3
}
propertyPath
:
m_LocalRotation.x
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
52444459818764335
,
guid
:
42247a938bb6e554eb00dc08303a72d6
,
type
:
3
}
propertyPath
:
m_LocalRotation.y
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
52444459818764335
,
guid
:
42247a938bb6e554eb00dc08303a72d6
,
type
:
3
}
propertyPath
:
m_LocalRotation.z
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
52444459818764335
,
guid
:
42247a938bb6e554eb00dc08303a72d6
,
type
:
3
}
propertyPath
:
m_LocalRotation.w
value
:
1
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
52444459818764335
,
guid
:
42247a938bb6e554eb00dc08303a72d6
,
type
:
3
}
propertyPath
:
m_RootOrder
value
:
6
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
52444459818764335
,
guid
:
42247a938bb6e554eb00dc08303a72d6
,
type
:
3
}
propertyPath
:
m_LocalEulerAnglesHint.x
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
52444459818764335
,
guid
:
42247a938bb6e554eb00dc08303a72d6
,
type
:
3
}
propertyPath
:
m_LocalEulerAnglesHint.y
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
52444459818764335
,
guid
:
42247a938bb6e554eb00dc08303a72d6
,
type
:
3
}
propertyPath
:
m_LocalEulerAnglesHint.z
value
:
0
objectReference
:
{
fileID
:
0
}
m_RemovedComponents
:
[]
m_SourcePrefab
:
{
fileID
:
100100000
,
guid
:
42247a938bb6e554eb00dc08303a72d6
,
type
:
3
}
---
!u!1
&1295796961
GameObject
:
m_ObjectHideFlags
:
0
...
...
Assets/Scripts/Managers/GameManager.cs
View file @
95715b17
...
...
@@ -40,5 +40,18 @@ public class GameManager : SingletonBehaviour<GameManager>
{
if
(!
MapManager
.
inst
.
isMapEditingOn
)
MapManager
.
inst
.
LoadMap
(
MapManager
.
inst
.
stage
[
0
]);
else
{
for
(
int
i
=
0
;
i
<
9
;
i
++)
clearIndex
[
i
]
=
-
1
;
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
];
}
}
}
Assets/Scripts/Map/ClearCondition.cs
View file @
95715b17
...
...
@@ -32,20 +32,23 @@ public class ClearCondition
public
void
IsDone
(
int
_count
=
0
,
int
_goal
=
0
)
{
count
+=
_count
;
goal
+=
_goal
;
if
(
goal
<=
count
)
if
(!
MapManager
.
inst
.
isMapEditingOn
)
{
GameManager
.
inst
.
clearCounter
--;
isDone
=
true
;
Debug
.
Log
(
GameManager
.
inst
.
clearCounter
);
if
(
GameManager
.
inst
.
clearCounter
==
0
)
GameManager
.
inst
.
ClearStage
();
}
else
if
(
goal
>
count
&&
isDone
)
{
GameManager
.
inst
.
clearCounter
++;
isDone
=
false
;
count
+=
_count
;
goal
+=
_goal
;
if
(
goal
<=
count
)
{
GameManager
.
inst
.
clearCounter
--;
isDone
=
true
;
Debug
.
Log
(
GameManager
.
inst
.
clearCounter
);
if
(
GameManager
.
inst
.
clearCounter
==
0
)
GameManager
.
inst
.
ClearStage
();
}
else
if
(
goal
>
count
&&
isDone
)
{
GameManager
.
inst
.
clearCounter
++;
isDone
=
false
;
}
}
}
}
Assets/Scripts/Map/Map.cs
View file @
95715b17
...
...
@@ -61,7 +61,7 @@ public class Map : MonoBehaviour
floorGrid
[
pos
].
mapPos
=
pos
;
floorGrid
[
pos
].
isGoalFloor
=
isGoal
;
if
(
GameManager
.
aFloor
>=
0
&&
isGoal
)
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
aFloor
].
IsDone
(
0
,
1
);
clearConditions
[
GameManager
.
aFloor
].
IsDone
(
0
,
1
);
StartCoroutine
(
MapManager
.
inst
.
Rebaker
());
}
else
...
...
@@ -96,7 +96,7 @@ public class Map : MonoBehaviour
if
(
floorGrid
.
ContainsKey
(
pos
))
{
if
(
GameManager
.
aFloor
>=
0
&&
floorGrid
[
pos
].
isGoalFloor
)
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
aFloor
].
IsDone
(
0
,
-
1
);
clearConditions
[
GameManager
.
aFloor
].
IsDone
(
0
,
-
1
);
Destroy
(
floorGrid
[
pos
].
gameObject
);
floorGrid
.
Remove
(
pos
);
StartCoroutine
(
MapManager
.
inst
.
Rebaker
());
...
...
@@ -219,12 +219,12 @@ public class Map : MonoBehaviour
case
ObjType
.
Briefcase
:
objectGrid
.
Add
(
pos
,
Instantiate
(
MapManager
.
inst
.
briefCase
,
new
Vector3
(
pos
.
x
,
0
,
pos
.
y
),
Quaternion
.
identity
,
objects
.
transform
).
GetComponent
<
IObject
>());
if
(
GameManager
.
aCase
>=
0
)
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
aCase
].
IsDone
(
0
,
1
);
clearConditions
[
GameManager
.
aCase
].
IsDone
(
0
,
1
);
break
;
case
ObjType
.
Camera
:
objectGrid
.
Add
(
pos
,
Instantiate
(
MapManager
.
inst
.
cameraTurret
,
new
Vector3
(
pos
.
x
,
0
,
pos
.
y
),
Quaternion
.
identity
,
objects
.
transform
).
GetComponent
<
IObject
>());
if
(
GameManager
.
aTurret
>=
0
)
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
aTurret
].
IsDone
(
0
,
1
);
clearConditions
[
GameManager
.
aTurret
].
IsDone
(
0
,
1
);
break
;
case
ObjType
.
Mannequin
:
objectGrid
.
Add
(
pos
,
Instantiate
(
MapManager
.
inst
.
mannequins
[
Random
.
Range
(
0
,
5
)],
new
Vector3
(
pos
.
x
,
0
,
pos
.
y
),
Quaternion
.
identity
,
objects
.
transform
).
GetComponent
<
IObject
>());
...
...
@@ -246,15 +246,15 @@ public class Map : MonoBehaviour
if
(
objectGrid
.
ContainsKey
(
pos
))
{
if
(
objectGrid
[
pos
].
GetType
()
==
ObjType
.
Briefcase
&&
GameManager
.
aCase
>=
0
)
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
aCase
].
IsDone
(
0
,
-
1
);
clearConditions
[
GameManager
.
aCase
].
IsDone
(
0
,
-
1
);
else
if
(
objectGrid
[
pos
].
GetType
()
==
ObjType
.
Camera
&&
GameManager
.
aTurret
>=
0
)
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
aTurret
].
IsDone
(
0
,
-
1
);
clearConditions
[
GameManager
.
aTurret
].
IsDone
(
0
,
-
1
);
else
if
(
objectGrid
[
pos
].
GetType
()
==
ObjType
.
Mannequin
)
{
if
(
objectGrid
[
pos
].
GetObject
().
GetComponent
<
Mannequin
>().
isWhite
&&
GameManager
.
white
>=
0
)
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
white
].
IsDone
(
0
,
-
1
);
clearConditions
[
GameManager
.
white
].
IsDone
(
0
,
-
1
);
else
if
(!
objectGrid
[
pos
].
GetObject
().
GetComponent
<
Mannequin
>().
isWhite
&&
GameManager
.
black
>=
0
)
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
black
].
IsDone
(
0
,
-
1
);
clearConditions
[
GameManager
.
black
].
IsDone
(
0
,
-
1
);
}
Destroy
(
objectGrid
[
pos
].
GetObject
());
objectGrid
.
Remove
(
pos
);
...
...
Assets/Scripts/MapEditor/MapEditor.cs
View file @
95715b17
...
...
@@ -9,16 +9,13 @@ public class MapEditor : SingletonBehaviour<MapEditor>
public
Map
currentMap
;
public
Map
[]
stage
;
public
MapEditorTile
tile
;
public
enum
TileMode
{
None
,
Floor
,
Normal
Wall
,
Mirror
,
StartFloor
,
Briefcase
,
Camera
,
WMannequin
,
BMannequin
};
public
enum
TileMode
{
None
,
Floor
,
Normal
,
Mirror
,
StartFloor
,
Briefcase
,
Camera
,
WMannequin
,
BMannequin
,
goalFloor
};
TileMode
currentMode
;
public
Text
modeSign
;
public
GameObject
startSign
;
public
Dictionary
<
Floor
,
GameObject
>
startSigns
;
public
GameObject
mapSizeSetter
;
public
GameObject
mapEditorTiles
;
public
GameObject
startSign
,
goalSign
,
mapSizeSetter
,
mapEditorTiles
;
public
Dictionary
<
Floor
,
GameObject
>
startSigns
,
goalSigns
;
public
Material
editWallMat
;
public
Material
realWallMat
;
public
Material
editNormalMat
,
realNormalMat
;
bool
isEditorStarted
;
bool
isCreateMode
;
...
...
@@ -45,16 +42,14 @@ public class MapEditor : SingletonBehaviour<MapEditor>
Debug
.
Log
(
"There is no start floor."
);
else
{
foreach
(
Transform
child
in
currentMap
.
walls
.
transform
)
{
child
.
gameObject
.
GetComponent
<
MeshRenderer
>().
material
=
realWallMat
;
}
foreach
(
Transform
child
in
currentMap
.
walls
.
transform
)
if
(
child
.
GetComponent
<
Wall
>()
is
NormalWall
)
child
.
gameObject
.
GetComponent
<
MeshRenderer
>().
material
=
realNormalMat
;
PrefabUtility
.
SaveAsPrefabAsset
(
_newMap
.
gameObject
,
localPath
);
Debug
.
Log
(
"Map saved at "
+
localPath
);
foreach
(
Transform
child
in
currentMap
.
walls
.
transform
)
{
child
.
gameObject
.
GetComponent
<
MeshRenderer
>().
material
=
editWallMat
;
}
if
(
child
.
GetComponent
<
Wall
>()
is
NormalWall
)
child
.
gameObject
.
GetComponent
<
MeshRenderer
>().
material
=
editNormalMat
;
}
}
public
void
SaveCurrentMap
()
...
...
@@ -140,26 +135,14 @@ public class MapEditor : SingletonBehaviour<MapEditor>
else
currentMap
.
RemoveFloor
(
clickedPos
);
}
else
if
(
currentMode
==
TileMode
.
NormalWall
)
{
if
(
isCreateMode
)
{
Debug
.
Log
(
wallPos
);
currentMap
.
CreateWall
(
wallPos
,
WallType
.
Normal
);
if
(
currentMap
.
GetWallAtPos
(
wallPos
)
!=
null
)
currentMap
.
GetWallAtPos
(
wallPos
).
gameObject
.
GetComponent
<
MeshRenderer
>().
material
=
editWallMat
;
}
else
currentMap
.
RemoveWall
(
wallPos
);
}
else
if
(
currentMode
==
TileMode
.
Mirror
)
else
if
(
currentMode
==
TileMode
.
Normal
||
currentMode
==
TileMode
.
Mirror
)
{
if
(
isCreateMode
)
{
Debug
.
Log
(
wallPos
);
currentMap
.
CreateWall
(
wallPos
,
WallType
.
Mirror
);
if
(
currentMap
.
GetWallAtPos
(
wallPos
)
!=
null
)
currentMap
.
GetWallAtPos
(
wallPos
).
gameObject
.
GetComponent
<
MeshRenderer
>().
material
=
edit
Wal
lMat
;
currentMap
.
CreateWall
(
wallPos
,
(
WallType
)((
int
)
currentMode
-
1
)
);
if
(
currentMap
.
GetWallAtPos
(
wallPos
)
!=
null
&&
currentMap
.
GetWallAtPos
(
wallPos
).
GetComponent
<
Wall
>()
is
NormalWall
)
currentMap
.
GetWallAtPos
(
wallPos
).
gameObject
.
GetComponent
<
MeshRenderer
>().
material
=
edit
Norma
lMat
;
}
else
currentMap
.
RemoveWall
(
wallPos
);
...
...
@@ -193,7 +176,32 @@ public class MapEditor : SingletonBehaviour<MapEditor>
}
}
}
else
if
((
int
)
currentMode
>=
5
)
else
if
(
currentMode
==
TileMode
.
goalFloor
)
{
if
(
isCreateMode
)
{
if
(
currentMap
.
GetFloorAtPos
(
clickedPos
).
isGoalFloor
)
Debug
.
Log
(
"Goal floor already exists at : ("
+
clickedPos
.
x
+
", "
+
clickedPos
.
y
+
")"
);
else
{
currentMap
.
GetFloorAtPos
(
clickedPos
).
isGoalFloor
=
true
;
goalSigns
.
Add
(
currentMap
.
GetFloorAtPos
(
clickedPos
),
Instantiate
(
goalSign
));
goalSigns
[
currentMap
.
GetFloorAtPos
(
clickedPos
)].
transform
.
position
=
new
Vector3
(
clickedPos
.
x
,
2
,
clickedPos
.
y
);
}
}
else
{
if
(!
currentMap
.
GetFloorAtPos
(
clickedPos
).
isGoalFloor
)
Debug
.
Log
(
"Goal floor doesn't exist at : ("
+
clickedPos
.
x
+
", "
+
clickedPos
.
y
+
")"
);
else
{
currentMap
.
GetFloorAtPos
(
clickedPos
).
isGoalFloor
=
false
;
Destroy
(
goalSigns
[
currentMap
.
GetFloorAtPos
(
clickedPos
)].
gameObject
);
goalSigns
.
Remove
(
currentMap
.
GetFloorAtPos
(
clickedPos
));
}
}
}
else
if
((
int
)
currentMode
>=
5
&&
(
int
)
currentMode
<=
8
)
{
if
(
isCreateMode
)
{
...
...
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