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
afe91c81
Commit
afe91c81
authored
May 05, 2019
by
18신대성
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Player와 Wall이 상태 정보를 가지게 만듬
parent
dbbd1473
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
Wall.cs
Assets/Scripts/Map/Wall.cs
+13
-0
Player.cs
Assets/Scripts/Player.cs
+5
-0
No files found.
Assets/Scripts/Map/Wall.cs
View file @
afe91c81
...
...
@@ -8,6 +8,19 @@ public class Wall : MonoBehaviour
/// Position of this floor at the map.
/// </summary>
public
Vector2
mapPos
;
public
Vector2Int
ldPos
// left down pos
{
get
{
return
new
Vector2Int
((
int
)
mapPos
.
x
,
(
int
)
mapPos
.
y
);
}
}
public
Vector2Int
rdPos
// right down pos
{
get
{
return
ldPos
+
(
dir
?
new
Vector2Int
(
1
,
0
)
:
new
Vector2Int
(
0
,
1
));
}
}
public
bool
dir
// false: ver, true: hor
{
get
{
return
(
int
)(
transform
.
rotation
.
eulerAngles
.
y
/
90
)
%
2
!=
1
;
}
}
public
int
len
=
1
;
// length of wall
public
void
SetmapPos
(
Vector2
pos
)
{
...
...
Assets/Scripts/Player.cs
View file @
afe91c81
...
...
@@ -5,6 +5,11 @@ using UnityEngine.AI;
public
class
Player
:
MonoBehaviour
{
public
Vector2Int
pos
{
get
{
return
new
Vector2Int
((
int
)
transform
.
position
.
x
,
(
int
)
transform
.
position
.
y
);
}
}
Coroutine
playerArrivalCheck
;
public
IEnumerator
SetCurrentPlayer
()
...
...
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