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
b06be162
Commit
b06be162
authored
Jul 16, 2019
by
18손재민
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
버그 수정함
parent
3abc3364
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
15 deletions
+10
-15
CameraTurret.cs
Assets/Scripts/Interactors/CameraTurret.cs
+1
-2
Mannequin.cs
Assets/Scripts/Interactors/Mannequin.cs
+3
-6
MapManager.cs
Assets/Scripts/Managers/MapManager.cs
+1
-3
ClearCondition.cs
Assets/Scripts/Map/ClearCondition.cs
+3
-2
Map.cs
Assets/Scripts/Map/Map.cs
+2
-2
No files found.
Assets/Scripts/Interactors/CameraTurret.cs
View file @
b06be162
...
...
@@ -27,14 +27,13 @@ public class CameraTurret : MonoBehaviour, IObject, IBreakable, IPlayerInteracto
public
void
Interact
(
Vector2Int
pos
)
{
if
(!
GameManager
.
inst
.
isGameOver
)
if
(!
GameManager
.
inst
.
isGameOver
&&
PlayerController
.
inst
.
currentPlayer
!=
null
)
{
if
(
Position
.
IsInAdjacentArea
(
pos
,
1
)
&&
MapManager
.
inst
.
currentMap
.
GetWallAtPos
((
Vector2
)(
Position
+
pos
)
/
2
)
==
null
)
{
GameManager
.
inst
.
isGameOver
=
true
;
StartCoroutine
(
GameManager
.
inst
.
RestartStage
());
GameManager
.
inst
.
uiGenerator
.
ResetAllClearUIs
();
//TODO : Restart Level
}
}
...
...
Assets/Scripts/Interactors/Mannequin.cs
View file @
b06be162
...
...
@@ -70,18 +70,15 @@ public class Mannequin : MonoBehaviour, IObject, IBulletInteractor
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
);
//
if (GameManager.white >= 0) MapManager.inst.currentMap.clearConditions[GameManager.white].IsDone(1);
}
public
void
SetColor
(
bool
isWhite
)
{
Color
=
isWhite
?
Color
.
white
:
Color
.
black
;
this
.
isWhite
=
isWhite
;
if
(
GameManager
.
black
>=
0
&&
!
isWhite
)
{
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
black
].
count
++;
if
(
GameManager
.
white
>=
0
)
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
white
].
count
--;
}
if
(
GameManager
.
black
>=
0
&&
!
isWhite
)
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
black
].
count
++;
if
(
GameManager
.
white
>=
0
&&
isWhite
)
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
white
].
count
++;
}
#
region
IObject
Override
...
...
Assets/Scripts/Managers/MapManager.cs
View file @
b06be162
...
...
@@ -90,15 +90,13 @@ public class MapManager : SingletonBehaviour<MapManager>
if
(!
child
.
GetComponent
<
Mannequin
>().
isWhite
&&
GameManager
.
black
>=
0
)
currentMap
.
clearConditions
[
GameManager
.
black
].
IsDone
(
1
);
}
}
for
(
int
i
=
0
;
i
<
currentMap
.
startFloors
.
Count
;
i
++)
PlayerController
.
inst
.
CreatePlayer
(
currentMap
.
startFloors
[
i
]);
for
(
int
i
=
0
;
i
<
loadedMapData
.
bullets
.
Count
;
i
++)
PlayerController
.
inst
.
AddBullet
(
loadedMapData
.
bullets
[
i
]);
}
public
IEnumerator
Rebaker
()
{
yield
return
null
;
...
...
Assets/Scripts/Map/ClearCondition.cs
View file @
b06be162
...
...
@@ -25,14 +25,15 @@ public class ClearCondition
count
+=
_count
;
goal
+=
_goal
;
assignedClearUI
.
RefreshClearCondition
();
if
(
goal
<=
count
&&
!
isDone
)
if
(
(
type
==
ClearType
.
White
||
type
==
ClearType
.
Black
)
?
goal
==
count
:
goal
<=
count
&&
!
isDone
)
{
GameManager
.
inst
.
clearCounter
--;
isDone
=
true
;
Debug
.
Log
(
GameManager
.
inst
.
clearCounter
);
if
(
GameManager
.
inst
.
clearCounter
==
0
)
GameManager
.
inst
.
StartCoroutine
(
GameManager
.
inst
.
ClearStage
());
}
else
if
(
goal
>
count
)
else
if
(
(
type
==
ClearType
.
White
||
type
==
ClearType
.
Black
)
?
goal
!=
count
:
goal
>
count
&&
isDone
)
{
GameManager
.
inst
.
clearCounter
++;
isDone
=
false
;
...
...
Assets/Scripts/Map/Map.cs
View file @
b06be162
...
...
@@ -265,9 +265,9 @@ public class Map : MonoBehaviour
else
if
(
objectGrid
[
pos
].
GetType
()
==
ObjType
.
Mannequin
)
{
if
(
objectGrid
[
pos
].
GetObject
().
GetComponent
<
Mannequin
>().
isWhite
&&
GameManager
.
white
>=
0
)
clearConditions
[
GameManager
.
white
].
IsDone
(
0
,
-
1
);
clearConditions
[
GameManager
.
white
].
IsDone
(-
1
);
else
if
(!
objectGrid
[
pos
].
GetObject
().
GetComponent
<
Mannequin
>().
isWhite
&&
GameManager
.
black
>=
0
)
clearConditions
[
GameManager
.
black
].
IsDone
(
0
,
-
1
);
clearConditions
[
GameManager
.
black
].
IsDone
(-
1
);
}
if
(
objectGrid
[
pos
].
GetType
()
!=
ObjType
.
Mannequin
)
PlayerController
.
inst
.
OnPlayerMove
-=
objectGrid
[
pos
].
GetObject
().
GetComponent
<
IPlayerInteractor
>().
Interact
;
...
...
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