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
ea184ec5
Commit
ea184ec5
authored
Jul 02, 2019
by
18신대성
Committed by
18손재민
Jul 02, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
드디어 신대성 거울에게 승리
floor에도 플레이어 정보와 오브젝트 정보를 넣음 모든 오브젝트 init시 floor에 정보 들어가게
parent
79f1cca0
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
118 additions
and
243 deletions
+118
-243
Briefcase.cs
Assets/Scripts/Interactors/Briefcase.cs
+1
-0
Floor.cs
Assets/Scripts/Map/Floor.cs
+1
-0
Mirror.cs
Assets/Scripts/Map/Mirror.cs
+112
-243
Player.cs
Assets/Scripts/Player.cs
+2
-0
PlayerController.cs
Assets/Scripts/PlayerController.cs
+2
-0
No files found.
Assets/Scripts/Interactors/Briefcase.cs
View file @
ea184ec5
...
...
@@ -35,6 +35,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 @
ea184ec5
...
...
@@ -10,6 +10,7 @@ public class Floor : MonoBehaviour
public
Vector2Int
mapPos
;
public
bool
isGoalFloor
=
false
;
public
IObject
objOnFloor
=
null
;
public
bool
isPlayerOn
=
false
;
// Start is called before the first frame update
void
Start
()
...
...
Assets/Scripts/Map/Mirror.cs
View file @
ea184ec5
This diff is collapsed.
Click to expand it.
Assets/Scripts/Player.cs
View file @
ea184ec5
...
...
@@ -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 @
ea184ec5
...
...
@@ -39,6 +39,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
)
{
...
...
@@ -68,6 +69,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