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
e74d4b08
Commit
e74d4b08
authored
Jul 23, 2019
by
18신대성
Committed by
18손재민
Jul 23, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
잡다한 오류들 싸그리 수정
(특히 all 관련 clearcond들)
parent
487461c5
Changes
14
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
67 additions
and
6177 deletions
+67
-6177
Collect All Case.prefab
Assets/Collect All Case.prefab
+0
-2758
Collect All Case.prefab.meta
Assets/Collect All Case.prefab.meta
+0
-7
Player3Test.prefab
Assets/Player3Test.prefab
+0
-3358
Player3Test.prefab.meta
Assets/Player3Test.prefab.meta
+0
-7
ClearUI.prefab
Assets/Prefabs/UIs/ClearUI.prefab
+2
-0
Briefcase.cs
Assets/Scripts/Interactors/Briefcase.cs
+6
-4
CameraTurret.cs
Assets/Scripts/Interactors/CameraTurret.cs
+0
-4
Mannequin.cs
Assets/Scripts/Interactors/Mannequin.cs
+2
-2
MapManager.cs
Assets/Scripts/Managers/MapManager.cs
+7
-17
ClearCondition.cs
Assets/Scripts/Map/ClearCondition.cs
+4
-4
Map.cs
Assets/Scripts/Map/Map.cs
+23
-12
BulletUIGenerator.cs
Assets/Scripts/UIs/BulletUIGenerator.cs
+0
-0
BulletUIGenerator.cs.meta
Assets/Scripts/UIs/BulletUIGenerator.cs.meta
+0
-0
ClearStatusUI.cs
Assets/Scripts/UIs/ClearStatusUI.cs
+23
-4
No files found.
Assets/Collect All Case.prefab
deleted
100644 → 0
View file @
487461c5
This diff is collapsed.
Click to expand it.
Assets/Collect All Case.prefab.meta
deleted
100644 → 0
View file @
487461c5
fileFormatVersion: 2
guid: 3d35fd3e6a494bc42921ce1cd03fc637
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/Player3Test.prefab
deleted
100644 → 0
View file @
487461c5
This diff is collapsed.
Click to expand it.
Assets/Player3Test.prefab.meta
deleted
100644 → 0
View file @
487461c5
fileFormatVersion: 2
guid: dbb2e09c19fe5ad49b11a6b95e5ac9e8
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/Prefabs/UIs/ClearUI.prefab
View file @
e74d4b08
...
...
@@ -255,9 +255,11 @@ MonoBehaviour:
count
:
0
goal
:
0
isDone
:
0
assignedClearUI
:
{
fileID
:
0
}
emptyBox
:
{
fileID
:
21300000
,
guid
:
66bb74902851e6f45b1dd366762222ac
,
type
:
3
}
fullBox
:
{
fileID
:
21300000
,
guid
:
05626d4bcfb37c74c927e1ee78806026
,
type
:
3
}
tooltipText
:
{
fileID
:
361559068607976195
}
slashText
:
{
fileID
:
6462260514077688296
}
goalText
:
{
fileID
:
6816787038235562072
}
statusText
:
{
fileID
:
8133949305956932585
}
doneImage
:
{
fileID
:
6431706617031002862
}
...
...
Assets/Scripts/Interactors/Briefcase.cs
View file @
e74d4b08
...
...
@@ -22,7 +22,11 @@ public class Briefcase : MonoBehaviour, IObject, IPlayerInteractor
public
void
Init
(
Floor
floor
)
{
if
(
GameManager
.
aCase
>=
0
)
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
aCase
].
IsDone
(
0
,
1
);
if
(
GameManager
.
aCase
>=
0
)
{
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
aCase
].
IsDone
(
0
,
1
);
Debug
.
Log
(
"init brief"
);
}
this
.
floor
=
floor
;
floor
.
objOnFloor
=
this
;
PlayerController
.
inst
.
OnPlayerMove
+=
Interact
;
...
...
@@ -58,12 +62,10 @@ public class Briefcase : MonoBehaviour, IObject, IPlayerInteractor
{
if
(
dropBullet
!=
BulletCode
.
None
)
PlayerController
.
inst
.
AddBullet
(
dropBullet
);
if
(
GameManager
.
aCase
>=
0
)
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
aCase
].
IsDone
(
1
);
if
(
GameManager
.
nCase
>=
0
)
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
nCase
].
IsDone
(
1
);
floor
.
objOnFloor
=
null
;
MapManager
.
inst
.
currentMap
.
RemoveObject
(
Position
,
true
);
MapManager
.
inst
.
currentMap
.
RemoveObject
(
Position
);
}
}
...
...
Assets/Scripts/Interactors/CameraTurret.cs
View file @
e74d4b08
...
...
@@ -18,10 +18,6 @@ public class CameraTurret : MonoBehaviour, IObject, IBreakable, IPlayerInteracto
public
void
Break
()
{
if
(
GameManager
.
aTurret
>=
0
)
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
aTurret
].
IsDone
(
1
);
if
(
GameManager
.
nTurret
>=
0
)
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
nTurret
].
IsDone
(
1
);
MapManager
.
inst
.
currentMap
.
RemoveObject
(
Position
);
}
...
...
Assets/Scripts/Interactors/Mannequin.cs
View file @
e74d4b08
...
...
@@ -77,8 +77,8 @@ public class Mannequin : MonoBehaviour, IObject, IBulletInteractor
{
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
&&
isWhite
)
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
white
].
count
++
;
if
(
GameManager
.
black
>=
0
&&
!
isWhite
)
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
black
].
IsDone
(
1
)
;
else
if
(
GameManager
.
white
>=
0
&&
isWhite
)
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
white
].
IsDone
(
1
)
;
}
#
region
IObject
Override
...
...
Assets/Scripts/Managers/MapManager.cs
View file @
e74d4b08
...
...
@@ -36,6 +36,13 @@ public class MapManager : SingletonBehaviour<MapManager>
PlayerController
.
inst
.
bulletList
.
Clear
();
players
.
Clear
();
currentMap
.
maxMapSize
=
(
int
)
loadedMapData
.
objects
[
0
].
xPos
;
for
(
int
i
=
0
;
i
<
loadedMapData
.
clears
.
Count
;
i
++)
{
var
temp
=
loadedMapData
.
clears
[
i
];
currentMap
.
clearConditions
.
Add
(
new
ClearCondition
(
temp
.
type
,
temp
.
goal
));
}
GameManager
.
inst
.
SetClearIndex
(
currentMap
);
GameManager
.
inst
.
uiGenerator
.
GenerateAllClearUI
();
int
casesIndex
=
0
;
for
(
int
i
=
1
;
i
<
loadedMapData
.
objects
.
Count
;
i
++)
{
...
...
@@ -74,24 +81,7 @@ public class MapManager : SingletonBehaviour<MapManager>
break
;
}
}
for
(
int
i
=
0
;
i
<
loadedMapData
.
clears
.
Count
;
i
++)
{
var
temp
=
loadedMapData
.
clears
[
i
];
currentMap
.
clearConditions
.
Add
(
new
ClearCondition
(
temp
.
type
,
temp
.
goal
));
}
GameManager
.
inst
.
SetClearIndex
(
currentMap
);
surface
.
BuildNavMesh
();
GameManager
.
inst
.
uiGenerator
.
GenerateAllClearUI
();
foreach
(
Transform
child
in
currentMap
.
objects
.
transform
)
{
if
(
child
.
GetComponent
<
IObject
>()
is
Mannequin
)
{
if
(
child
.
GetComponent
<
Mannequin
>().
isWhite
&&
GameManager
.
white
>=
0
)
currentMap
.
clearConditions
[
GameManager
.
white
].
IsDone
(
1
);
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
++)
...
...
Assets/Scripts/Map/ClearCondition.cs
View file @
e74d4b08
...
...
@@ -24,20 +24,20 @@ public class ClearCondition
{
count
+=
_count
;
goal
+=
_goal
;
assignedClearUI
.
RefreshClearCondition
();
if
((
type
==
ClearType
.
White
||
type
==
ClearType
.
Black
)
?
goal
==
count
:
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
);
//
Debug.Log(GameManager.inst.clearCounter);
if
(
GameManager
.
inst
.
clearCounter
==
0
)
GameManager
.
inst
.
StartCoroutine
(
GameManager
.
inst
.
ClearStage
());
}
else
if
((
type
==
ClearType
.
White
||
type
==
ClearType
.
Black
)
?
goal
!=
count
:
goal
>
count
&&
isDone
)
else
if
((
(
type
==
ClearType
.
White
||
type
==
ClearType
.
Black
)
?
goal
!=
count
:
goal
>
count
)
&&
isDone
)
{
GameManager
.
inst
.
clearCounter
++;
isDone
=
false
;
}
assignedClearUI
.
RefreshClearCondition
();
}
}
}
Assets/Scripts/Map/Map.cs
View file @
e74d4b08
...
...
@@ -255,23 +255,34 @@ public class Map : MonoBehaviour
/// Remove Object at position.
/// </summary>
/// <param name="pos">Position of object.</param>
public
void
RemoveObject
(
Vector2Int
pos
,
bool
isCaseInteracted
=
false
)
public
void
RemoveObject
(
Vector2Int
pos
)
{
if
(
objectGrid
.
ContainsKey
(
pos
))
{
if
(
objectGrid
[
pos
].
GetType
()
==
ObjType
.
Briefcase
&&
GameManager
.
aCase
>=
0
&&
!
isCaseInteracted
)
clearConditions
[
GameManager
.
aCase
].
IsDone
(
0
,
-
1
);
else
if
(
objectGrid
[
pos
].
GetType
()
==
ObjType
.
Camera
&&
GameManager
.
aTurret
>=
0
)
clearConditions
[
GameManager
.
aTurret
].
IsDone
(
0
,
-
1
);
else
if
(
objectGrid
[
pos
].
GetType
()
==
ObjType
.
Mannequin
)
switch
(
objectGrid
[
pos
].
GetType
())
{
if
(
objectGrid
[
pos
].
GetObject
().
GetComponent
<
Mannequin
>().
isWhite
&&
GameManager
.
white
>=
0
)
clearConditions
[
GameManager
.
white
].
IsDone
(-
1
);
else
if
(!
objectGrid
[
pos
].
GetObject
().
GetComponent
<
Mannequin
>().
isWhite
&&
GameManager
.
black
>=
0
)
clearConditions
[
GameManager
.
black
].
IsDone
(-
1
);
case
ObjType
.
Camera
:
if
(
GameManager
.
aTurret
>=
0
)
clearConditions
[
GameManager
.
aTurret
].
IsDone
(
0
,
-
1
);
if
(
GameManager
.
nTurret
>=
0
)
clearConditions
[
GameManager
.
nTurret
].
IsDone
(
1
);
PlayerController
.
inst
.
OnPlayerMove
-=
objectGrid
[
pos
].
GetObject
().
GetComponent
<
IPlayerInteractor
>().
Interact
;
break
;
case
ObjType
.
Mannequin
:
if
(
objectGrid
[
pos
].
GetObject
().
GetComponent
<
Mannequin
>().
isWhite
&&
GameManager
.
white
>=
0
)
clearConditions
[
GameManager
.
white
].
IsDone
(-
1
);
else
if
(!
objectGrid
[
pos
].
GetObject
().
GetComponent
<
Mannequin
>().
isWhite
&&
GameManager
.
black
>=
0
)
clearConditions
[
GameManager
.
black
].
IsDone
(-
1
);
break
;
case
ObjType
.
Briefcase
:
if
(
GameManager
.
aCase
>=
0
)
clearConditions
[
GameManager
.
aCase
].
IsDone
(
0
,
-
1
);
PlayerController
.
inst
.
OnPlayerMove
-=
objectGrid
[
pos
].
GetObject
().
GetComponent
<
IPlayerInteractor
>().
Interact
;
break
;
default
:
Debug
.
Log
(
"[ERR] 병신아"
);
break
;
}
if
(
objectGrid
[
pos
].
GetType
()
!=
ObjType
.
Mannequin
)
PlayerController
.
inst
.
OnPlayerMove
-=
objectGrid
[
pos
].
GetObject
().
GetComponent
<
IPlayerInteractor
>().
Interact
;
Destroy
(
objectGrid
[
pos
].
GetObject
());
objectGrid
.
Remove
(
pos
);
floorGrid
[
pos
].
objOnFloor
=
null
;
...
...
Assets/BulletUIGenerator.cs
→
Assets/
Scripts/UIs/
BulletUIGenerator.cs
View file @
e74d4b08
File moved
Assets/BulletUIGenerator.cs.meta
→
Assets/
Scripts/UIs/
BulletUIGenerator.cs.meta
View file @
e74d4b08
File moved
Assets/Scripts/UIs/ClearStatusUI.cs
View file @
e74d4b08
...
...
@@ -11,6 +11,7 @@ public class ClearStatusUI : MonoBehaviour
public
Sprite
fullBox
;
[
Header
(
"inside"
)]
public
Text
tooltipText
;
public
Text
slashText
;
public
Text
goalText
;
public
Text
statusText
;
public
Image
doneImage
;
...
...
@@ -19,16 +20,34 @@ public class ClearStatusUI : MonoBehaviour
{
assignedCondition
=
condition
;
tooltipText
.
text
=
tooltip
;
goalText
.
text
=
assignedCondition
.
goal
.
ToString
();
statusText
.
text
=
assignedCondition
.
count
.
ToString
();
if
(
condition
.
type
==
ClearType
.
AllCase
||
condition
.
type
==
ClearType
.
AllFloor
||
condition
.
type
==
ClearType
.
AllTurret
)
{
goalText
.
text
=
""
;
statusText
.
text
=
""
;
slashText
.
text
=
(
assignedCondition
.
goal
-
assignedCondition
.
count
).
ToString
();
}
else
{
goalText
.
text
=
assignedCondition
.
goal
.
ToString
();
statusText
.
text
=
assignedCondition
.
count
.
ToString
();
}
if
(
assignedCondition
.
isDone
)
doneImage
.
sprite
=
fullBox
;
else
doneImage
.
sprite
=
emptyBox
;
}
public
void
RefreshClearCondition
()
{
goalText
.
text
=
assignedCondition
.
goal
.
ToString
();
statusText
.
text
=
assignedCondition
.
count
.
ToString
();
if
(
assignedCondition
.
type
==
ClearType
.
AllCase
||
assignedCondition
.
type
==
ClearType
.
AllFloor
||
assignedCondition
.
type
==
ClearType
.
AllTurret
)
{
goalText
.
text
=
""
;
statusText
.
text
=
""
;
slashText
.
text
=
(
assignedCondition
.
goal
-
assignedCondition
.
count
).
ToString
();
}
else
{
goalText
.
text
=
assignedCondition
.
goal
.
ToString
();
statusText
.
text
=
assignedCondition
.
count
.
ToString
();
}
if
(
assignedCondition
.
isDone
)
doneImage
.
sprite
=
fullBox
;
else
doneImage
.
sprite
=
emptyBox
;
}
...
...
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