Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
tetra-tower
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Oenos
tetra-tower
Commits
1d9e784a
Commit
1d9e784a
authored
Feb 08, 2019
by
18손재민
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
아이템 방 구현함
parent
1f9e632d
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
301 additions
and
51 deletions
+301
-51
Room Item 1-1.prefab
Assets/Prefabs/Rooms/SpecialRoom/Room Item 1-1.prefab
+88
-38
Room Item.prefab
Assets/Prefabs/Rooms/SpecialRoom/Room Item.prefab
+81
-2
CameraController.cs
Assets/Scripts/CameraController.cs
+2
-2
GameManager.cs
Assets/Scripts/GameManager.cs
+1
-1
MapManager.cs
Assets/Scripts/TetrisMap/MapManager.cs
+128
-7
Room.cs
Assets/Scripts/TetrisMap/Room.cs
+1
-1
No files found.
Assets/Prefabs/Rooms/SpecialRoom/Room Item 1-1.prefab
View file @
1d9e784a
...
...
@@ -307,20 +307,6 @@ CompositeCollider2D:
m_ColliderPaths
:
-
m_Collider
:
{
fileID
:
2113883505704759332
}
m_ColliderPaths
:
-
-
X
:
240000000
Y
:
239843744
-
X
:
239843744
Y
:
240000000
-
X
:
130000000
Y
:
240000000
-
X
:
130000000
Y
:
230000000
-
X
:
230000000
Y
:
230000000
-
X
:
230000000
Y
:
190000000
-
X
:
240000000
Y
:
190000000
-
-
X
:
10000000
Y
:
230000000
-
X
:
110000000
...
...
@@ -335,6 +321,20 @@ CompositeCollider2D:
Y
:
190000000
-
X
:
10000000
Y
:
190000000
-
-
X
:
240000000
Y
:
239843744
-
X
:
239843744
Y
:
240000000
-
X
:
130000000
Y
:
240000000
-
X
:
130000000
Y
:
230000000
-
X
:
230000000
Y
:
230000000
-
X
:
230000000
Y
:
190000000
-
X
:
240000000
Y
:
190000000
-
-
X
:
240000000
Y
:
170000000
-
X
:
230000000
...
...
@@ -367,16 +367,6 @@ CompositeCollider2D:
Y
:
30000000
-
X
:
10000000
Y
:
30000000
-
-
X
:
240000000
Y
:
9843750
-
X
:
239843744
Y
:
10000000
-
X
:
130000000
Y
:
10000000
-
X
:
130000000
Y
:
0
-
X
:
240000000
Y
:
0
-
-
X
:
110000000
Y
:
9843750
-
X
:
109843752
...
...
@@ -387,15 +377,18 @@ CompositeCollider2D:
Y
:
0
-
X
:
110000000
Y
:
0
-
-
X
:
240000000
Y
:
9843750
-
X
:
239843744
Y
:
10000000
-
X
:
130000000
Y
:
10000000
-
X
:
130000000
Y
:
0
-
X
:
240000000
Y
:
0
m_CompositePaths
:
m_Paths
:
-
-
{
x
:
24
,
y
:
23.984375
}
-
{
x
:
23.984375
,
y
:
24
}
-
{
x
:
13
,
y
:
24
}
-
{
x
:
13
,
y
:
23
}
-
{
x
:
23
,
y
:
23
}
-
{
x
:
23
,
y
:
19
}
-
{
x
:
24
,
y
:
19
}
-
-
{
x
:
1
,
y
:
23
}
-
{
x
:
11
,
y
:
23
}
-
{
x
:
11
,
y
:
23.984375
}
...
...
@@ -403,6 +396,13 @@ CompositeCollider2D:
-
{
x
:
0
,
y
:
24
}
-
{
x
:
0
,
y
:
19
}
-
{
x
:
1
,
y
:
19
}
-
-
{
x
:
24
,
y
:
23.984375
}
-
{
x
:
23.984375
,
y
:
24
}
-
{
x
:
13
,
y
:
24
}
-
{
x
:
13
,
y
:
23
}
-
{
x
:
23
,
y
:
23
}
-
{
x
:
23
,
y
:
19
}
-
{
x
:
24
,
y
:
19
}
-
-
{
x
:
24
,
y
:
17
}
-
{
x
:
23
,
y
:
17
}
-
{
x
:
23
,
y
:
11
}
...
...
@@ -419,16 +419,16 @@ CompositeCollider2D:
-
{
x
:
0
,
y
:
9
}
-
{
x
:
0
,
y
:
3
}
-
{
x
:
1
,
y
:
3
}
-
-
{
x
:
24
,
y
:
0.984375
}
-
{
x
:
23.984375
,
y
:
1
}
-
{
x
:
13
,
y
:
1
}
-
{
x
:
13
,
y
:
0
}
-
{
x
:
24
,
y
:
0
}
-
-
{
x
:
11
,
y
:
0.984375
}
-
{
x
:
10.984375
,
y
:
1
}
-
{
x
:
0
,
y
:
1
}
-
{
x
:
0
,
y
:
0
}
-
{
x
:
11
,
y
:
0
}
-
-
{
x
:
24
,
y
:
0.984375
}
-
{
x
:
23.984375
,
y
:
1
}
-
{
x
:
13
,
y
:
1
}
-
{
x
:
13
,
y
:
0
}
-
{
x
:
24
,
y
:
0
}
m_VertexDistance
:
0.0005
---
!u!66
&66776817046886398
CompositeCollider2D
:
...
...
@@ -934,9 +934,59 @@ CompositeCollider2D:
m_GeometryType
:
0
m_GenerationType
:
0
m_EdgeRadius
:
0
m_ColliderPaths
:
[]
m_ColliderPaths
:
-
m_Collider
:
{
fileID
:
2113883506822126360
}
m_ColliderPaths
:
-
-
X
:
60000000
Y
:
210000000
-
X
:
50000000
Y
:
210000000
-
X
:
50000000
Y
:
206406256
-
X
:
60000000
Y
:
206406256
-
-
X
:
190000000
Y
:
210000000
-
X
:
180000000
Y
:
210000000
-
X
:
180000000
Y
:
206406256
-
X
:
190000000
Y
:
206406256
-
-
X
:
40000000
Y
:
80000000
-
X
:
30000000
Y
:
80000000
-
X
:
30000000
Y
:
76406248
-
X
:
40000000
Y
:
76406248
-
-
X
:
210000000
Y
:
80000000
-
X
:
200000000
Y
:
80000000
-
X
:
200000000
Y
:
76406248
-
X
:
210000000
Y
:
76406248
m_CompositePaths
:
m_Paths
:
[]
m_Paths
:
-
-
{
x
:
6
,
y
:
21
}
-
{
x
:
5
,
y
:
21
}
-
{
x
:
5
,
y
:
20.640625
}
-
{
x
:
6
,
y
:
20.640625
}
-
-
{
x
:
19
,
y
:
21
}
-
{
x
:
18
,
y
:
21
}
-
{
x
:
18
,
y
:
20.640625
}
-
{
x
:
19
,
y
:
20.640625
}
-
-
{
x
:
4
,
y
:
8
}
-
{
x
:
3
,
y
:
8
}
-
{
x
:
3
,
y
:
7.640625
}
-
{
x
:
4
,
y
:
7.640625
}
-
-
{
x
:
21
,
y
:
8
}
-
{
x
:
20
,
y
:
8
}
-
{
x
:
20
,
y
:
7.640625
}
-
{
x
:
21
,
y
:
7.640625
}
m_VertexDistance
:
0.0005
---
!u!114
&114875551757596772
MonoBehaviour
:
...
...
Assets/Prefabs/Rooms/SpecialRoom/Room Item.prefab
View file @
1d9e784a
...
...
@@ -70,6 +70,21 @@ GameObject:
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
---
!u!1
&1326135493854760
GameObject
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
serializedVersion
:
6
m_Component
:
-
component
:
{
fileID
:
4855720522592534
}
m_Layer
:
0
m_Name
:
ItemSpawnPoint
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
---
!u!1
&1370955136548852
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -224,9 +239,23 @@ Transform:
-
{
fileID
:
4552797671095560
}
-
{
fileID
:
4628846653152418
}
-
{
fileID
:
4507596403279470
}
-
{
fileID
:
4855720522592534
}
m_Father
:
{
fileID
:
0
}
m_RootOrder
:
0
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!4
&4855720522592534
Transform
:
m_ObjectHideFlags
:
1
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
m_GameObject
:
{
fileID
:
1326135493854760
}
m_LocalRotation
:
{
x
:
-0
,
y
:
-0
,
z
:
-0
,
w
:
1
}
m_LocalPosition
:
{
x
:
12
,
y
:
15
,
z
:
0
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_Children
:
[]
m_Father
:
{
fileID
:
4721597541747138
}
m_RootOrder
:
6
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!4
&4988769571006008
Transform
:
m_ObjectHideFlags
:
1
...
...
@@ -849,9 +878,59 @@ CompositeCollider2D:
m_GeometryType
:
0
m_GenerationType
:
0
m_EdgeRadius
:
0
m_ColliderPaths
:
[]
m_ColliderPaths
:
-
m_Collider
:
{
fileID
:
2113883505166204504
}
m_ColliderPaths
:
-
-
X
:
60000000
Y
:
210000000
-
X
:
50000000
Y
:
210000000
-
X
:
50000000
Y
:
206406256
-
X
:
60000000
Y
:
206406256
-
-
X
:
190000000
Y
:
210000000
-
X
:
180000000
Y
:
210000000
-
X
:
180000000
Y
:
206406256
-
X
:
190000000
Y
:
206406256
-
-
X
:
40000000
Y
:
80000000
-
X
:
30000000
Y
:
80000000
-
X
:
30000000
Y
:
76406248
-
X
:
40000000
Y
:
76406248
-
-
X
:
210000000
Y
:
80000000
-
X
:
200000000
Y
:
80000000
-
X
:
200000000
Y
:
76406248
-
X
:
210000000
Y
:
76406248
m_CompositePaths
:
m_Paths
:
[]
m_Paths
:
-
-
{
x
:
6
,
y
:
21
}
-
{
x
:
5
,
y
:
21
}
-
{
x
:
5
,
y
:
20.640625
}
-
{
x
:
6
,
y
:
20.640625
}
-
-
{
x
:
19
,
y
:
21
}
-
{
x
:
18
,
y
:
21
}
-
{
x
:
18
,
y
:
20.640625
}
-
{
x
:
19
,
y
:
20.640625
}
-
-
{
x
:
4
,
y
:
8
}
-
{
x
:
3
,
y
:
8
}
-
{
x
:
3
,
y
:
7.640625
}
-
{
x
:
4
,
y
:
7.640625
}
-
-
{
x
:
21
,
y
:
8
}
-
{
x
:
20
,
y
:
8
}
-
{
x
:
20
,
y
:
7.640625
}
-
{
x
:
21
,
y
:
7.640625
}
m_VertexDistance
:
0.0005
---
!u!66
&66477191110675372
CompositeCollider2D
:
...
...
Assets/Scripts/CameraController.cs
View file @
1d9e784a
...
...
@@ -76,7 +76,7 @@ public class CameraController : MonoBehaviour {
if
(
gameState
==
GameState
.
Ingame
)
{
GameManager
.
gameState
=
GameState
.
Ingame
;
StartCoroutine
(
mapManager
.
Room
FadeIn
(
MapManager
.
currentRoom
));
StartCoroutine
(
mapManager
.
Room
Enter
(
MapManager
.
currentRoom
));
grid
.
transform
.
position
=
new
Vector3
(
0
,
0
,
0
);
sizeDestination
=
inGameCameraSize
;
while
(
GetComponent
<
Camera
>().
orthographicSize
>
sizeDestination
+
0.01
)
...
...
@@ -97,7 +97,7 @@ public class CameraController : MonoBehaviour {
MapManager
.
mapGrid
[(
int
)
MapManager
.
portalDestination
.
x
,
(
int
)
MapManager
.
portalDestination
.
y
].
portalSurface
.
GetComponent
<
SpriteRenderer
>().
sprite
=
GameObject
.
Find
(
"MapManager"
).
GetComponent
<
MapManager
>().
portalSelected
;
}
StartCoroutine
(
mapManager
.
Room
FadeOu
t
(
MapManager
.
currentRoom
));
StartCoroutine
(
mapManager
.
Room
Exi
t
(
MapManager
.
currentRoom
));
grid
.
transform
.
position
=
new
Vector3
(
0
,
0
,
2
);
sizeDestination
=
tetrisCameraSize
;
while
(
GetComponent
<
Camera
>().
orthographicSize
<
sizeDestination
-
2
)
...
...
Assets/Scripts/GameManager.cs
View file @
1d9e784a
...
...
@@ -59,7 +59,7 @@ public class GameManager : MonoBehaviour {
gameState
=
GameState
.
Ingame
;
}
}
else
if
(
Input
.
Get
KeyDown
(
KeyCode
.
F
))
else
if
(
Input
.
Get
ButtonDown
(
"Interaction"
))
{
if
(
gameState
==
GameState
.
Portal
&&
MapManager
.
currentRoom
!=
MapManager
.
mapGrid
[(
int
)
MapManager
.
portalDestination
.
x
,
(
int
)
MapManager
.
portalDestination
.
y
])
{
...
...
Assets/Scripts/TetrisMap/MapManager.cs
View file @
1d9e784a
This diff is collapsed.
Click to expand it.
Assets/Scripts/TetrisMap/Room.cs
View file @
1d9e784a
...
...
@@ -147,7 +147,7 @@ public class Room : MonoBehaviour
/// </summary>
public
void
CreatePortal
()
{
GameObject
portal
=
roomInGame
.
transform
.
Find
(
"Portal"
).
gameObject
;
portal
=
roomInGame
.
transform
.
Find
(
"Portal"
).
gameObject
;
if
(
specialRoomType
!=
RoomType
.
Normal
)
{
portal
.
SetActive
(
true
);
...
...
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