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
d37db3d0
Commit
d37db3d0
authored
Jul 02, 2019
by
15박보승
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'mirror'
# Conflicts: # Assets/2019-07-02-13-21-35.json.meta
parents
7c754168
ea184ec5
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
160 additions
and
180 deletions
+160
-180
2019-07-02-13-21-35.json
Assets/2019-07-02-13-21-35.json
+1
-0
Briefcase.cs
Assets/Scripts/Interactors/Briefcase.cs
+1
-0
Floor.cs
Assets/Scripts/Map/Floor.cs
+1
-2
Mirror.cs
Assets/Scripts/Map/Mirror.cs
+153
-178
Player.cs
Assets/Scripts/Player.cs
+2
-0
PlayerController.cs
Assets/Scripts/PlayerController.cs
+2
-0
No files found.
Assets/2019-07-02-13-21-35.json
0 → 100644
View file @
d37db3d0
{
"objects"
:[{
"tag"
:
0
,
"xPos"
:
20.0
,
"yPos"
:
0.0
},{
"tag"
:
2
,
"xPos"
:
-2.0
,
"yPos"
:
-0.5
},{
"tag"
:
2
,
"xPos"
:
-1.0
,
"yPos"
:
-0.5
},{
"tag"
:
2
,
"xPos"
:
0.5
,
"yPos"
:
-1.0
},{
"tag"
:
3
,
"xPos"
:
0.0
,
"yPos"
:
-0.5
},{
"tag"
:
3
,
"xPos"
:
1.0
,
"yPos"
:
-0.5
},{
"tag"
:
1
,
"xPos"
:
-2.0
,
"yPos"
:
1.0
},{
"tag"
:
1
,
"xPos"
:
-1.0
,
"yPos"
:
1.0
},{
"tag"
:
1
,
"xPos"
:
0.0
,
"yPos"
:
1.0
},{
"tag"
:
1
,
"xPos"
:
1.0
,
"yPos"
:
1.0
},{
"tag"
:
1
,
"xPos"
:
1.0
,
"yPos"
:
0.0
},{
"tag"
:
1
,
"xPos"
:
0.0
,
"yPos"
:
0.0
},{
"tag"
:
1
,
"xPos"
:
-1.0
,
"yPos"
:
0.0
},{
"tag"
:
1
,
"xPos"
:
-2.0
,
"yPos"
:
0.0
},{
"tag"
:
1
,
"xPos"
:
-2.0
,
"yPos"
:
-1.0
},{
"tag"
:
1
,
"xPos"
:
-1.0
,
"yPos"
:
-1.0
},{
"tag"
:
1
,
"xPos"
:
0.0
,
"yPos"
:
-1.0
},{
"tag"
:
1
,
"xPos"
:
1.0
,
"yPos"
:
-1.0
},{
"tag"
:
1
,
"xPos"
:
1.0
,
"yPos"
:
-2.0
},{
"tag"
:
1
,
"xPos"
:
0.0
,
"yPos"
:
-2.0
},{
"tag"
:
1
,
"xPos"
:
-1.0
,
"yPos"
:
-2.0
},{
"tag"
:
1
,
"xPos"
:
-2.0
,
"yPos"
:
-2.0
},{
"tag"
:
4
,
"xPos"
:
-2.0
,
"yPos"
:
-2.0
},{
"tag"
:
5
,
"xPos"
:
1.0
,
"yPos"
:
-2.0
},{
"tag"
:
6
,
"xPos"
:
1.0
,
"yPos"
:
-1.0
}],
"clears"
:[{
"type"
:
6
,
"goal"
:
1
}],
"bullets"
:[
1
,
1
]}
\ No newline at end of file
Assets/Scripts/Interactors/Briefcase.cs
View file @
d37db3d0
...
...
@@ -48,6 +48,7 @@ public class Briefcase : MonoBehaviour, IObject, IPlayerInteractor
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
aCase
].
IsDone
(
1
);
if
(
GameManager
.
nCase
>=
0
)
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
nCase
].
IsDone
(
1
);
floor
.
objOnFloor
=
null
;
Destroy
(
gameObject
);
}
}
...
...
Assets/Scripts/Map/Floor.cs
View file @
d37db3d0
...
...
@@ -10,8 +10,7 @@ public class Floor : MonoBehaviour
public
Vector2Int
mapPos
;
public
bool
isGoalFloor
=
false
;
public
IObject
objOnFloor
=
null
;
public
int
copyCounter
=
0
;
// count for mirror copy
public
bool
isPlayerOn
=
false
;
// Start is called before the first frame update
void
Start
()
...
...
Assets/Scripts/Map/Mirror.cs
View file @
d37db3d0
This diff is collapsed.
Click to expand it.
Assets/Scripts/Player.cs
View file @
d37db3d0
...
...
@@ -72,7 +72,9 @@ public class Player : MonoBehaviour
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
.
isPlayerOn
=
false
;
currentFloor
=
MapManager
.
inst
.
currentMap
.
GetFloorAtPos
(
new
Vector2Int
((
int
)
destination
.
x
,
(
int
)
destination
.
z
));
currentFloor
.
isPlayerOn
=
true
;
PlayerController
.
inst
.
CheckCurrentFloors
();
anim
.
SetBool
(
"isWalking"
,
false
);
PlayerController
.
inst
.
isPlayerMoving
=
false
;
...
...
Assets/Scripts/PlayerController.cs
View file @
d37db3d0
...
...
@@ -38,6 +38,7 @@ public class PlayerController : SingletonBehaviour<PlayerController>
}
GameObject
player
=
Instantiate
(
MapManager
.
inst
.
player
,
floor
.
transform
.
position
+
new
Vector3
(
0
,
0.1f
,
0
),
Quaternion
.
identity
);
player
.
GetComponent
<
Player
>().
currentFloor
=
floor
;
floor
.
isPlayerOn
=
true
;
MapManager
.
inst
.
players
.
Add
(
player
);
if
(
GameManager
.
nPlayer
>=
0
)
{
...
...
@@ -67,6 +68,7 @@ public class PlayerController : SingletonBehaviour<PlayerController>
{
if
(
obj
.
GetComponent
<
Player
>().
currentFloor
==
floor
)
{
floor
.
isPlayerOn
=
false
;
MapManager
.
inst
.
players
.
Remove
(
obj
);
if
(
GameManager
.
nPlayer
>=
0
)
{
...
...
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