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
34405def
Commit
34405def
authored
Jun 23, 2019
by
18손재민
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'interact'
# Conflicts: # Assets/Scripts/Interactors/Mannequin.cs
parents
6e8b713f
6db8638a
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
140 additions
and
77 deletions
+140
-77
mirror.prefab
Assets/Prefabs/MapObjects/mirror.prefab
+1
-1
wall.prefab
Assets/Prefabs/MapObjects/wall.prefab
+1
-1
camera.prefab
Assets/Prefabs/Objects/camera.prefab
+15
-0
Mannequin.cs
Assets/Scripts/Interactors/Mannequin.cs
+2
-0
Mirror.cs
Assets/Scripts/Map/Mirror.cs
+110
-47
Wall.cs
Assets/Scripts/Map/Wall.cs
+4
-16
Player.cs
Assets/Scripts/Player.cs
+2
-2
PlayerController.cs
Assets/Scripts/PlayerController.cs
+5
-10
No files found.
Assets/Prefabs/MapObjects/mirror.prefab
View file @
34405def
...
...
@@ -92,7 +92,7 @@ BoxCollider:
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1244481854748732982
}
m_Material
:
{
fileID
:
0
}
m_IsTrigger
:
1
m_IsTrigger
:
0
m_Enabled
:
1
serializedVersion
:
2
m_Size
:
{
x
:
1.0000005
,
y
:
1.0000002
,
z
:
0.080003634
}
...
...
Assets/Prefabs/MapObjects/wall.prefab
View file @
34405def
...
...
@@ -89,7 +89,7 @@ BoxCollider:
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
337530617404887312
}
m_Material
:
{
fileID
:
0
}
m_IsTrigger
:
1
m_IsTrigger
:
0
m_Enabled
:
1
serializedVersion
:
2
m_Size
:
{
x
:
1.0000005
,
y
:
1.0000002
,
z
:
0.080003634
}
...
...
Assets/Prefabs/Objects/camera.prefab
View file @
34405def
...
...
@@ -89,6 +89,7 @@ GameObject:
-
component
:
{
fileID
:
6001025753464593565
}
-
component
:
{
fileID
:
439939669
}
-
component
:
{
fileID
:
896145114
}
-
component
:
{
fileID
:
3778247420154791817
}
m_Layer
:
0
m_Name
:
camera
m_TagString
:
Untagged
...
...
@@ -144,6 +145,20 @@ MonoBehaviour:
m_Name
:
m_EditorClassIdentifier
:
floor
:
{
fileID
:
0
}
---
!u!136
&3778247420154791817
CapsuleCollider
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
6001025753464815805
}
m_Material
:
{
fileID
:
0
}
m_IsTrigger
:
1
m_Enabled
:
1
m_Radius
:
0.25
m_Height
:
0.03
m_Direction
:
1
m_Center
:
{
x
:
0
,
y
:
0.45
,
z
:
0
}
---
!u!1
&6001025753464815807
GameObject
:
m_ObjectHideFlags
:
0
...
...
Assets/Scripts/Interactors/Mannequin.cs
View file @
34405def
...
...
@@ -38,6 +38,7 @@ public class Mannequin : MonoBehaviour, IObject, IBulletInteractor
_color
=
value
;
}
}
public
bool
isWhite
;
public
void
Interact
(
Bullet
bullet
)
{
...
...
@@ -69,6 +70,7 @@ public class Mannequin : MonoBehaviour, IObject, IBulletInteractor
public
void
SetColor
(
bool
isWhite
)
{
Color
=
isWhite
?
Color
.
white
:
Color
.
black
;
this
.
isWhite
=
isWhite
;
if
(
GameManager
.
white
>=
0
&&
isWhite
)
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
white
].
IsDone
(
1
);
if
(
GameManager
.
black
>=
0
&&
!
isWhite
)
...
...
Assets/Scripts/Map/Mirror.cs
View file @
34405def
This diff is collapsed.
Click to expand it.
Assets/Scripts/Map/Wall.cs
View file @
34405def
...
...
@@ -15,13 +15,13 @@ public class Wall : MonoBehaviour
/// Position of this floor at the map.
/// </summary>
public
Vector2
mapPos
;
public
Vector2
Int
ldPos
// left down pos
public
Vector2
ldPos
// left down pos
{
get
{
return
new
Vector2
Int
((
int
)
mapPos
.
x
,
(
int
)
mapPos
.
y
);
}
get
{
return
new
Vector2
(
dir
?
mapPos
.
x
-
0.5f
:
mapPos
.
x
,
!
dir
?
mapPos
.
y
-
0.5f
:
mapPos
.
y
);
}
}
public
Vector2
Int
rdPos
// right down pos
public
Vector2
rdPos
// right down pos
{
get
{
return
ldPos
+
(
dir
?
new
Vector2
Int
(
len
,
0
)
:
new
Vector2Int
(
0
,
len
));
}
get
{
return
ldPos
+
(
dir
?
new
Vector2
(
len
,
0
)
:
new
Vector2
(
0
,
len
));
}
}
public
bool
dir
// false: ver, true: hor
{
...
...
@@ -29,16 +29,4 @@ public class Wall : MonoBehaviour
}
public
int
len
=
1
;
// length of wall
public
WallType
type
;
// Start is called before the first frame update
void
Start
()
{
}
// Update is called once per frame
void
Update
()
{
}
}
Assets/Scripts/Player.cs
View file @
34405def
...
...
@@ -5,9 +5,9 @@ using UnityEngine.AI;
public
class
Player
:
MonoBehaviour
{
public
Vector2
Int
pos
public
Vector2
pos
{
get
{
return
new
Vector2
Int
((
int
)
transform
.
position
.
x
,
(
int
)
transform
.
position
.
y
);
}
get
{
return
new
Vector2
(
currentFloor
.
mapPos
.
x
,
currentFloor
.
mapPos
.
y
);
}
}
Coroutine
playerArrivalCheck
;
...
...
Assets/Scripts/PlayerController.cs
View file @
34405def
...
...
@@ -70,21 +70,16 @@ public class PlayerController : SingletonBehaviour<PlayerController>
void
Start
()
{
prePos
=
MapPos
;
bulletList
.
Add
(
BulletCode
.
True
);
bulletList
.
Add
(
BulletCode
.
True
);
bulletList
.
Add
(
BulletCode
.
True
);
bulletList
.
Add
(
BulletCode
.
True
);
bulletList
.
Add
(
BulletCode
.
True
);
bulletList
.
Add
(
BulletCode
.
False
);
bulletList
.
Add
(
BulletCode
.
False
);
bulletList
.
Add
(
BulletCode
.
False
);
bulletList
.
Add
(
BulletCode
.
False
);
bulletList
.
Add
(
BulletCode
.
False
);
bulletList
.
Add
(
BulletCode
.
Mirror
);
bulletList
.
Add
(
BulletCode
.
False
);
bulletList
.
Add
(
BulletCode
.
Mirror
);
bulletList
.
Add
(
BulletCode
.
False
);
bulletList
.
Add
(
BulletCode
.
Mirror
);
bulletList
.
Add
(
BulletCode
.
False
);
bulletList
.
Add
(
BulletCode
.
Mirror
);
bulletList
.
Add
(
BulletCode
.
False
);
bulletList
.
Add
(
BulletCode
.
Mirror
);
bulletList
.
Add
(
BulletCode
.
False
);
}
// Update is called once per frame
...
...
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