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
d052546b
Commit
d052546b
authored
Oct 01, 2018
by
18강현모
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CameraController, GameState 등 코드 넣음. TetrisMap scale 동기화, UI 요소들 Canvas에 담음.
parent
f7585de5
Changes
18
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
365 additions
and
106 deletions
+365
-106
TetriminoBoss.prefab
Assets/Prefabs/Tetrimino/TetriminoBoss.prefab
+2
-2
TetriminoI.prefab
Assets/Prefabs/Tetrimino/TetriminoI.prefab
+5
-5
TetriminoJ.prefab
Assets/Prefabs/Tetrimino/TetriminoJ.prefab
+5
-5
TetriminoL.prefab
Assets/Prefabs/Tetrimino/TetriminoL.prefab
+5
-5
TetriminoO.prefab
Assets/Prefabs/Tetrimino/TetriminoO.prefab
+5
-5
TetriminoS.prefab
Assets/Prefabs/Tetrimino/TetriminoS.prefab
+5
-5
TetriminoT.prefab
Assets/Prefabs/Tetrimino/TetriminoT.prefab
+5
-5
TetriminoZ.prefab
Assets/Prefabs/Tetrimino/TetriminoZ.prefab
+5
-5
PlayScene.unity
Assets/Scenes/PlayScene.unity
+218
-47
CameraController.cs
Assets/Scripts/CameraController.cs
+54
-0
CameraController.cs.meta
Assets/Scripts/CameraController.cs.meta
+11
-0
Player.cs
Assets/Scripts/Characters/Player.cs
+1
-1
PlayerController.cs
Assets/Scripts/Characters/PlayerController.cs
+22
-3
GameManager.cs
Assets/Scripts/GameManager.cs
+12
-4
MapManager.cs
Assets/Scripts/TetrisMap/MapManager.cs
+4
-8
LifeCrystalUI.cs
Assets/Scripts/UI/LifeCrystalUI.cs
+1
-1
TetrisBackground.png.meta
Assets/Sprites/TetrisBackground.png.meta
+4
-4
InputManager.asset
ProjectSettings/InputManager.asset
+1
-1
No files found.
Assets/Prefabs/Tetrimino/TetriminoBoss.prefab
View file @
d052546b
...
@@ -52,7 +52,7 @@ Transform:
...
@@ -52,7 +52,7 @@ Transform:
m_GameObject
:
{
fileID
:
1690644780631946
}
m_GameObject
:
{
fileID
:
1690644780631946
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
-4.3699484
,
y
:
1.660439
,
z
:
0
}
m_LocalPosition
:
{
x
:
-4.3699484
,
y
:
1.660439
,
z
:
0
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_LocalScale
:
{
x
:
24
,
y
:
24
,
z
:
1
}
m_Children
:
m_Children
:
-
{
fileID
:
4653007209432888
}
-
{
fileID
:
4653007209432888
}
m_Father
:
{
fileID
:
0
}
m_Father
:
{
fileID
:
0
}
...
@@ -82,7 +82,7 @@ MonoBehaviour:
...
@@ -82,7 +82,7 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Name
:
m_Name
:
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
map
Location
:
{
x
:
0
,
y
:
0
,
z
:
0
}
map
Coord
:
{
x
:
0
,
y
:
0
,
z
:
0
}
doorInfo
:
doorInfo
:
stage
:
0
stage
:
0
roomConcept
:
0
roomConcept
:
0
...
...
Assets/Prefabs/Tetrimino/TetriminoI.prefab
View file @
d052546b
...
@@ -129,7 +129,7 @@ Transform:
...
@@ -129,7 +129,7 @@ Transform:
m_GameObject
:
{
fileID
:
1986824515730090
}
m_GameObject
:
{
fileID
:
1986824515730090
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
7.85
,
y
:
2.58
,
z
:
0
}
m_LocalPosition
:
{
x
:
7.85
,
y
:
2.58
,
z
:
0
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_LocalScale
:
{
x
:
24
,
y
:
24
,
z
:
1
}
m_Children
:
m_Children
:
-
{
fileID
:
4959807369913172
}
-
{
fileID
:
4959807369913172
}
-
{
fileID
:
4417427676875474
}
-
{
fileID
:
4417427676875474
}
...
@@ -175,7 +175,7 @@ MonoBehaviour:
...
@@ -175,7 +175,7 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Name
:
m_Name
:
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
map
Location
:
{
x
:
0
,
y
:
0
,
z
:
0
}
map
Coord
:
{
x
:
0
,
y
:
0
,
z
:
0
}
doorInfo
:
doorInfo
:
stage
:
0
stage
:
0
roomConcept
:
0
roomConcept
:
0
...
@@ -192,7 +192,7 @@ MonoBehaviour:
...
@@ -192,7 +192,7 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Name
:
m_Name
:
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
map
Location
:
{
x
:
0
,
y
:
0
,
z
:
0
}
map
Coord
:
{
x
:
0
,
y
:
0
,
z
:
0
}
doorInfo
:
doorInfo
:
stage
:
0
stage
:
0
roomConcept
:
0
roomConcept
:
0
...
@@ -209,7 +209,7 @@ MonoBehaviour:
...
@@ -209,7 +209,7 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Name
:
m_Name
:
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
map
Location
:
{
x
:
0
,
y
:
0
,
z
:
0
}
map
Coord
:
{
x
:
0
,
y
:
0
,
z
:
0
}
doorInfo
:
doorInfo
:
stage
:
0
stage
:
0
roomConcept
:
0
roomConcept
:
0
...
@@ -247,7 +247,7 @@ MonoBehaviour:
...
@@ -247,7 +247,7 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Name
:
m_Name
:
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
map
Location
:
{
x
:
0
,
y
:
0
,
z
:
0
}
map
Coord
:
{
x
:
0
,
y
:
0
,
z
:
0
}
doorInfo
:
doorInfo
:
stage
:
0
stage
:
0
roomConcept
:
0
roomConcept
:
0
...
...
Assets/Prefabs/Tetrimino/TetriminoJ.prefab
View file @
d052546b
...
@@ -155,7 +155,7 @@ Transform:
...
@@ -155,7 +155,7 @@ Transform:
m_GameObject
:
{
fileID
:
1058256109692646
}
m_GameObject
:
{
fileID
:
1058256109692646
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
2.15
,
y
:
-0.97
,
z
:
0
}
m_LocalPosition
:
{
x
:
2.15
,
y
:
-0.97
,
z
:
0
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_LocalScale
:
{
x
:
24
,
y
:
24
,
z
:
1
}
m_Children
:
m_Children
:
-
{
fileID
:
4770256559059570
}
-
{
fileID
:
4770256559059570
}
-
{
fileID
:
4403275080892776
}
-
{
fileID
:
4403275080892776
}
...
@@ -175,7 +175,7 @@ MonoBehaviour:
...
@@ -175,7 +175,7 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Name
:
m_Name
:
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
map
Location
:
{
x
:
0
,
y
:
0
,
z
:
0
}
map
Coord
:
{
x
:
0
,
y
:
0
,
z
:
0
}
doorInfo
:
doorInfo
:
stage
:
0
stage
:
0
roomConcept
:
0
roomConcept
:
0
...
@@ -192,7 +192,7 @@ MonoBehaviour:
...
@@ -192,7 +192,7 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Name
:
m_Name
:
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
map
Location
:
{
x
:
0
,
y
:
0
,
z
:
0
}
map
Coord
:
{
x
:
0
,
y
:
0
,
z
:
0
}
doorInfo
:
doorInfo
:
stage
:
0
stage
:
0
roomConcept
:
0
roomConcept
:
0
...
@@ -209,7 +209,7 @@ MonoBehaviour:
...
@@ -209,7 +209,7 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Name
:
m_Name
:
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
map
Location
:
{
x
:
0
,
y
:
0
,
z
:
0
}
map
Coord
:
{
x
:
0
,
y
:
0
,
z
:
0
}
doorInfo
:
doorInfo
:
stage
:
0
stage
:
0
roomConcept
:
0
roomConcept
:
0
...
@@ -226,7 +226,7 @@ MonoBehaviour:
...
@@ -226,7 +226,7 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Name
:
m_Name
:
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
map
Location
:
{
x
:
0
,
y
:
0
,
z
:
0
}
map
Coord
:
{
x
:
0
,
y
:
0
,
z
:
0
}
doorInfo
:
doorInfo
:
stage
:
0
stage
:
0
roomConcept
:
0
roomConcept
:
0
...
...
Assets/Prefabs/Tetrimino/TetriminoL.prefab
View file @
d052546b
...
@@ -142,7 +142,7 @@ Transform:
...
@@ -142,7 +142,7 @@ Transform:
m_GameObject
:
{
fileID
:
1409840693504816
}
m_GameObject
:
{
fileID
:
1409840693504816
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
2.77
,
y
:
3.1
,
z
:
0
}
m_LocalPosition
:
{
x
:
2.77
,
y
:
3.1
,
z
:
0
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_LocalScale
:
{
x
:
24
,
y
:
24
,
z
:
1
}
m_Children
:
m_Children
:
-
{
fileID
:
4480540641426352
}
-
{
fileID
:
4480540641426352
}
-
{
fileID
:
4890462092246654
}
-
{
fileID
:
4890462092246654
}
...
@@ -175,7 +175,7 @@ MonoBehaviour:
...
@@ -175,7 +175,7 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Name
:
m_Name
:
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
map
Location
:
{
x
:
0
,
y
:
0
,
z
:
0
}
map
Coord
:
{
x
:
0
,
y
:
0
,
z
:
0
}
doorInfo
:
doorInfo
:
stage
:
0
stage
:
0
roomConcept
:
0
roomConcept
:
0
...
@@ -192,7 +192,7 @@ MonoBehaviour:
...
@@ -192,7 +192,7 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Name
:
m_Name
:
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
map
Location
:
{
x
:
0
,
y
:
0
,
z
:
0
}
map
Coord
:
{
x
:
0
,
y
:
0
,
z
:
0
}
doorInfo
:
doorInfo
:
stage
:
0
stage
:
0
roomConcept
:
0
roomConcept
:
0
...
@@ -209,7 +209,7 @@ MonoBehaviour:
...
@@ -209,7 +209,7 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Name
:
m_Name
:
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
map
Location
:
{
x
:
0
,
y
:
0
,
z
:
0
}
map
Coord
:
{
x
:
0
,
y
:
0
,
z
:
0
}
doorInfo
:
doorInfo
:
stage
:
0
stage
:
0
roomConcept
:
0
roomConcept
:
0
...
@@ -226,7 +226,7 @@ MonoBehaviour:
...
@@ -226,7 +226,7 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Name
:
m_Name
:
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
map
Location
:
{
x
:
0
,
y
:
0
,
z
:
0
}
map
Coord
:
{
x
:
0
,
y
:
0
,
z
:
0
}
doorInfo
:
doorInfo
:
stage
:
0
stage
:
0
roomConcept
:
0
roomConcept
:
0
...
...
Assets/Prefabs/Tetrimino/TetriminoO.prefab
View file @
d052546b
...
@@ -103,7 +103,7 @@ Transform:
...
@@ -103,7 +103,7 @@ Transform:
m_GameObject
:
{
fileID
:
1599875259397162
}
m_GameObject
:
{
fileID
:
1599875259397162
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
5.6
,
y
:
-0.21
,
z
:
0
}
m_LocalPosition
:
{
x
:
5.6
,
y
:
-0.21
,
z
:
0
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_LocalScale
:
{
x
:
24
,
y
:
24
,
z
:
1
}
m_Children
:
m_Children
:
-
{
fileID
:
4959495535370206
}
-
{
fileID
:
4959495535370206
}
-
{
fileID
:
4534782373203126
}
-
{
fileID
:
4534782373203126
}
...
@@ -175,7 +175,7 @@ MonoBehaviour:
...
@@ -175,7 +175,7 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Name
:
m_Name
:
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
map
Location
:
{
x
:
0
,
y
:
0
,
z
:
0
}
map
Coord
:
{
x
:
0
,
y
:
0
,
z
:
0
}
doorInfo
:
doorInfo
:
stage
:
0
stage
:
0
roomConcept
:
0
roomConcept
:
0
...
@@ -192,7 +192,7 @@ MonoBehaviour:
...
@@ -192,7 +192,7 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Name
:
m_Name
:
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
map
Location
:
{
x
:
0
,
y
:
0
,
z
:
0
}
map
Coord
:
{
x
:
0
,
y
:
0
,
z
:
0
}
doorInfo
:
doorInfo
:
stage
:
0
stage
:
0
roomConcept
:
0
roomConcept
:
0
...
@@ -230,7 +230,7 @@ MonoBehaviour:
...
@@ -230,7 +230,7 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Name
:
m_Name
:
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
map
Location
:
{
x
:
0
,
y
:
0
,
z
:
0
}
map
Coord
:
{
x
:
0
,
y
:
0
,
z
:
0
}
doorInfo
:
doorInfo
:
stage
:
0
stage
:
0
roomConcept
:
0
roomConcept
:
0
...
@@ -247,7 +247,7 @@ MonoBehaviour:
...
@@ -247,7 +247,7 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Name
:
m_Name
:
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
map
Location
:
{
x
:
0
,
y
:
0
,
z
:
0
}
map
Coord
:
{
x
:
0
,
y
:
0
,
z
:
0
}
doorInfo
:
doorInfo
:
stage
:
0
stage
:
0
roomConcept
:
0
roomConcept
:
0
...
...
Assets/Prefabs/Tetrimino/TetriminoS.prefab
View file @
d052546b
...
@@ -142,7 +142,7 @@ Transform:
...
@@ -142,7 +142,7 @@ Transform:
m_GameObject
:
{
fileID
:
1051411815441030
}
m_GameObject
:
{
fileID
:
1051411815441030
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
10.24
,
y
:
0.14
,
z
:
0
}
m_LocalPosition
:
{
x
:
10.24
,
y
:
0.14
,
z
:
0
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_LocalScale
:
{
x
:
24
,
y
:
24
,
z
:
1
}
m_Children
:
m_Children
:
-
{
fileID
:
4996993573163862
}
-
{
fileID
:
4996993573163862
}
-
{
fileID
:
4153319652066896
}
-
{
fileID
:
4153319652066896
}
...
@@ -175,7 +175,7 @@ MonoBehaviour:
...
@@ -175,7 +175,7 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Name
:
m_Name
:
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
map
Location
:
{
x
:
0
,
y
:
0
,
z
:
0
}
map
Coord
:
{
x
:
0
,
y
:
0
,
z
:
0
}
doorInfo
:
doorInfo
:
stage
:
0
stage
:
0
roomConcept
:
0
roomConcept
:
0
...
@@ -192,7 +192,7 @@ MonoBehaviour:
...
@@ -192,7 +192,7 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Name
:
m_Name
:
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
map
Location
:
{
x
:
0
,
y
:
0
,
z
:
0
}
map
Coord
:
{
x
:
0
,
y
:
0
,
z
:
0
}
doorInfo
:
doorInfo
:
stage
:
0
stage
:
0
roomConcept
:
0
roomConcept
:
0
...
@@ -209,7 +209,7 @@ MonoBehaviour:
...
@@ -209,7 +209,7 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Name
:
m_Name
:
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
map
Location
:
{
x
:
0
,
y
:
0
,
z
:
0
}
map
Coord
:
{
x
:
0
,
y
:
0
,
z
:
0
}
doorInfo
:
doorInfo
:
stage
:
0
stage
:
0
roomConcept
:
0
roomConcept
:
0
...
@@ -247,7 +247,7 @@ MonoBehaviour:
...
@@ -247,7 +247,7 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Name
:
m_Name
:
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
map
Location
:
{
x
:
0
,
y
:
0
,
z
:
0
}
map
Coord
:
{
x
:
0
,
y
:
0
,
z
:
0
}
doorInfo
:
doorInfo
:
stage
:
0
stage
:
0
roomConcept
:
0
roomConcept
:
0
...
...
Assets/Prefabs/Tetrimino/TetriminoT.prefab
View file @
d052546b
...
@@ -142,7 +142,7 @@ Transform:
...
@@ -142,7 +142,7 @@ Transform:
m_GameObject
:
{
fileID
:
1216064749225226
}
m_GameObject
:
{
fileID
:
1216064749225226
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
14.87
,
y
:
0.76
,
z
:
0
}
m_LocalPosition
:
{
x
:
14.87
,
y
:
0.76
,
z
:
0
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_LocalScale
:
{
x
:
24
,
y
:
24
,
z
:
1
}
m_Children
:
m_Children
:
-
{
fileID
:
4373465258801912
}
-
{
fileID
:
4373465258801912
}
-
{
fileID
:
4268777523006110
}
-
{
fileID
:
4268777523006110
}
...
@@ -175,7 +175,7 @@ MonoBehaviour:
...
@@ -175,7 +175,7 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Name
:
m_Name
:
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
map
Location
:
{
x
:
0
,
y
:
0
,
z
:
0
}
map
Coord
:
{
x
:
0
,
y
:
0
,
z
:
0
}
doorInfo
:
doorInfo
:
stage
:
0
stage
:
0
roomConcept
:
0
roomConcept
:
0
...
@@ -192,7 +192,7 @@ MonoBehaviour:
...
@@ -192,7 +192,7 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Name
:
m_Name
:
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
map
Location
:
{
x
:
0
,
y
:
0
,
z
:
0
}
map
Coord
:
{
x
:
0
,
y
:
0
,
z
:
0
}
doorInfo
:
doorInfo
:
stage
:
0
stage
:
0
roomConcept
:
0
roomConcept
:
0
...
@@ -209,7 +209,7 @@ MonoBehaviour:
...
@@ -209,7 +209,7 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Name
:
m_Name
:
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
map
Location
:
{
x
:
0
,
y
:
0
,
z
:
0
}
map
Coord
:
{
x
:
0
,
y
:
0
,
z
:
0
}
doorInfo
:
doorInfo
:
stage
:
0
stage
:
0
roomConcept
:
0
roomConcept
:
0
...
@@ -226,7 +226,7 @@ MonoBehaviour:
...
@@ -226,7 +226,7 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Name
:
m_Name
:
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
map
Location
:
{
x
:
0
,
y
:
0
,
z
:
0
}
map
Coord
:
{
x
:
0
,
y
:
0
,
z
:
0
}
doorInfo
:
doorInfo
:
stage
:
0
stage
:
0
roomConcept
:
0
roomConcept
:
0
...
...
Assets/Prefabs/Tetrimino/TetriminoZ.prefab
View file @
d052546b
...
@@ -116,7 +116,7 @@ Transform:
...
@@ -116,7 +116,7 @@ Transform:
m_GameObject
:
{
fileID
:
1597348377621660
}
m_GameObject
:
{
fileID
:
1597348377621660
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
11.8
,
y
:
3.97
,
z
:
0
}
m_LocalPosition
:
{
x
:
11.8
,
y
:
3.97
,
z
:
0
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_LocalScale
:
{
x
:
24
,
y
:
24
,
z
:
1
}
m_Children
:
m_Children
:
-
{
fileID
:
4665049468911534
}
-
{
fileID
:
4665049468911534
}
-
{
fileID
:
4244611340582260
}
-
{
fileID
:
4244611340582260
}
...
@@ -175,7 +175,7 @@ MonoBehaviour:
...
@@ -175,7 +175,7 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Name
:
m_Name
:
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
map
Location
:
{
x
:
0
,
y
:
0
,
z
:
0
}
map
Coord
:
{
x
:
0
,
y
:
0
,
z
:
0
}
doorInfo
:
doorInfo
:
stage
:
0
stage
:
0
roomConcept
:
0
roomConcept
:
0
...
@@ -213,7 +213,7 @@ MonoBehaviour:
...
@@ -213,7 +213,7 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Name
:
m_Name
:
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
map
Location
:
{
x
:
0
,
y
:
0
,
z
:
0
}
map
Coord
:
{
x
:
0
,
y
:
0
,
z
:
0
}
doorInfo
:
doorInfo
:
stage
:
0
stage
:
0
roomConcept
:
0
roomConcept
:
0
...
@@ -230,7 +230,7 @@ MonoBehaviour:
...
@@ -230,7 +230,7 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Name
:
m_Name
:
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
map
Location
:
{
x
:
0
,
y
:
0
,
z
:
0
}
map
Coord
:
{
x
:
0
,
y
:
0
,
z
:
0
}
doorInfo
:
doorInfo
:
stage
:
0
stage
:
0
roomConcept
:
0
roomConcept
:
0
...
@@ -247,7 +247,7 @@ MonoBehaviour:
...
@@ -247,7 +247,7 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Script
:
{
fileID
:
11500000
,
guid
:
f935789f55ec07f4ca6b334fba78ddb1
,
type
:
3
}
m_Name
:
m_Name
:
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
map
Location
:
{
x
:
0
,
y
:
0
,
z
:
0
}
map
Coord
:
{
x
:
0
,
y
:
0
,
z
:
0
}
doorInfo
:
doorInfo
:
stage
:
0
stage
:
0
roomConcept
:
0
roomConcept
:
0
...
...
Assets/Scenes/PlayScene.unity
View file @
d052546b
This diff is collapsed.
Click to expand it.
Assets/Scripts/CameraController.cs
0 → 100644
View file @
d052546b
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
public
class
CameraController
:
MonoBehaviour
{
GameManager
.
GameState
lastGameState
;
Vector3
destination
;
// Use this for initialization
void
Start
()
{
lastGameState
=
GameManager
.
GameState
.
Ingame
;
destination
=
transform
.
position
;
}
// Update is called once per frame
void
Update
()
{
if
(
lastGameState
!=
GameManager
.
gameState
)
{
StartCoroutine
(
"ChangeScene"
);
lastGameState
=
GameManager
.
gameState
;
}
else
if
(
lastGameState
==
GameManager
.
GameState
.
Ingame
)
{
SetDestination
();
}
GotoDestination
();
}
IEnumerator
ChangeScene
()
{
yield
return
null
;
}
void
SetDestination
()
{
}
void
GotoDestination
()
{
}
}
Assets/Scripts/CameraController.cs.meta
0 → 100644
View file @
d052546b
fileFormatVersion: 2
guid: 6ef4279cf32e10f4dbc71e2206514212
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Assets/Scripts/Characters/Player.cs
View file @
d052546b
...
@@ -3,7 +3,7 @@ using System.Collections.Generic;
...
@@ -3,7 +3,7 @@ using System.Collections.Generic;
using
UnityEngine
;
using
UnityEngine
;
public
class
Player
:
MonoBehaviour
{
public
class
Player
:
MonoBehaviour
{
public
LifeCrystalUI
LCUI
;
// Use this for initialization
// Use this for initialization
void
Start
()
{
void
Start
()
{
...
...
Assets/Scripts/Characters/PlayerController.cs
View file @
d052546b
...
@@ -7,18 +7,24 @@ public class PlayerController : MonoBehaviour {
...
@@ -7,18 +7,24 @@ public class PlayerController : MonoBehaviour {
// Speeds of player
// Speeds of player
[
SerializeField
]
[
SerializeField
]
private
float
maxSpeed
;
[
SerializeField
]
private
float
speed
;
private
float
speed
;
[
SerializeField
]
[
SerializeField
]
private
float
speedAir
;
[
SerializeField
]
private
float
jumpSpeed
;
private
float
jumpSpeed
;
[
SerializeField
]
[
SerializeField
]
private
float
doubleJumpSpeed
;
private
float
doubleJumpSpeed
;
// Bool values for jump & doublejump
// Bool values for jump & doublejump
private
bool
isGrounded
=
true
;
private
bool
isGrounded
=
true
;
private
bool
isJumpable
=
true
;
// Can player jump or doublejump?
private
bool
isJumpable
=
true
;
// Can player jump or doublejump?
// Inputs
// Inputs
private
float
horizontal
=
0
;
private
float
horizontal
=
0
;
private
float
horizontalRaw
=
0
;
private
bool
jump
=
false
;
private
bool
jump
=
false
;
// Variables for IsGrounded()
// Variables for IsGrounded()
...
@@ -35,6 +41,8 @@ public class PlayerController : MonoBehaviour {
...
@@ -35,6 +41,8 @@ public class PlayerController : MonoBehaviour {
// Update is called once per frame
// Update is called once per frame
void
Update
()
{
void
Update
()
{
horizontal
=
Input
.
GetAxis
(
"Horizontal"
);
horizontal
=
Input
.
GetAxis
(
"Horizontal"
);
horizontalRaw
=
Input
.
GetAxisRaw
(
"Horizontal"
);
if
(
Input
.
GetButtonDown
(
"Jump"
))
if
(
Input
.
GetButtonDown
(
"Jump"
))
{
{
jump
=
true
;
jump
=
true
;
...
@@ -60,10 +68,21 @@ public class PlayerController : MonoBehaviour {
...
@@ -60,10 +68,21 @@ public class PlayerController : MonoBehaviour {
isJumpable
=
false
;
isJumpable
=
false
;
}
}
}
}
rb
.
velocity
=
new
Vector2
(
horizontal
*
speed
*
Time
.
fixedDeltaTime
,
vertical
);
//rb.velocity = new Vector2(horizontal * speed * Time.fixedDeltaTime, vertical);
// rb.velocity = new Vector2(rb.velocity.x, vertical);
rb
.
AddForce
(
horizontalRaw
*
speed
*
Time
.
fixedDeltaTime
*
Vector2
.
right
);
if
(((
horizontalRaw
==
0
)
||
(
rb
.
velocity
.
x
>
0
&&
horizontalRaw
<
0
)
||
(
rb
.
velocity
.
x
<
0
&&
horizontalRaw
>
0
))
&&(
isGrounded
))
{
rb
.
AddForce
(
rb
.
velocity
.
x
*
(-
10f
)
*
Vector2
.
right
);
}
rb
.
velocity
=
new
Vector2
(
Mathf
.
Clamp
(
rb
.
velocity
.
x
,
-
maxSpeed
*
Time
.
fixedDeltaTime
,
maxSpeed
*
Time
.
fixedDeltaTime
),
vertical
);
jump
=
false
;
jump
=
false
;
}
}
bool
IsGrounded
()
// Is player grounded?
bool
IsGrounded
()
// Is player grounded?
{
{
RaycastHit2D
hit
=
Physics2D
.
Raycast
(
transform
.
position
,
Vector2
.
down
,
rayDistance
,
groundLayer
);
RaycastHit2D
hit
=
Physics2D
.
Raycast
(
transform
.
position
,
Vector2
.
down
,
rayDistance
,
groundLayer
);
...
...
Assets/Scripts/GameManager.cs
View file @
d052546b
...
@@ -4,10 +4,18 @@ using UnityEngine;
...
@@ -4,10 +4,18 @@ using UnityEngine;
public
class
GameManager
:
MonoBehaviour
{
public
class
GameManager
:
MonoBehaviour
{
// Use this for initialization
public
enum
GameState
{
MainMenu
,
Ingame
,
Tetris
,
Pause
,
Inventory
}
void
Start
()
{
/// <summary>
}
/// Which state this game is.
/// change later
/// </summary>
public
static
GameState
gameState
;
// Use this for initialization
void
Start
()
{
gameState
=
GameState
.
Ingame
;
}
// Update is called once per frame
// Update is called once per frame
void
Update
()
{
void
Update
()
{
...
...
Assets/Scripts/TetrisMap/MapManager.cs
View file @
d052546b
...
@@ -7,11 +7,7 @@ public class MapManager : MonoBehaviour {
...
@@ -7,11 +7,7 @@ public class MapManager : MonoBehaviour {
/*
/*
* variables
* variables
* */
* */
/// <summary>
/// If camera is at tetris map, it is true.
/// If camera is at player, it is false.
/// </summary>
public
bool
inTetris
;
/// <summary>
/// <summary>
/// Tetris map's size.
/// Tetris map's size.
/// </summary>
/// </summary>
...
@@ -206,14 +202,14 @@ public class MapManager : MonoBehaviour {
...
@@ -206,14 +202,14 @@ public class MapManager : MonoBehaviour {
}*/
}*/
public
void
TetriminoMove
(
Tetrimino
TE
)
public
void
TetriminoMove
(
Tetrimino
TE
)
{
{
if
(
Input
.
GetKeyDown
(
KeyCode
.
LeftArrow
)
&&
in
Tetris
)
if
(
Input
.
GetKeyDown
(
KeyCode
.
LeftArrow
)
&&
GameManager
.
gameState
==
GameManager
.
GameState
.
Tetris
)
{
{
TE
.
mapCoord
+=
new
Vector3
(-
1
,
0
,
0
);
TE
.
mapCoord
+=
new
Vector3
(-
1
,
0
,
0
);
SetRoomMapCoord
(
currentTetrimino
);
SetRoomMapCoord
(
currentTetrimino
);
if
(
IsRightTetrimino
(
TE
)
!=
0
)
if
(
IsRightTetrimino
(
TE
)
!=
0
)
TE
.
mapCoord
+=
new
Vector3
(
1
,
0
,
0
);
TE
.
mapCoord
+=
new
Vector3
(
1
,
0
,
0
);
}
}
else
if
(
Input
.
GetKeyDown
(
KeyCode
.
RightArrow
)
&&
in
Tetris
)
else
if
(
Input
.
GetKeyDown
(
KeyCode
.
RightArrow
)
&&
GameManager
.
gameState
==
GameManager
.
GameState
.
Tetris
)
{
{
TE
.
mapCoord
+=
new
Vector3
(
1
,
0
,
0
);
TE
.
mapCoord
+=
new
Vector3
(
1
,
0
,
0
);
SetRoomMapCoord
(
currentTetrimino
);
SetRoomMapCoord
(
currentTetrimino
);
...
@@ -244,7 +240,7 @@ public class MapManager : MonoBehaviour {
...
@@ -244,7 +240,7 @@ public class MapManager : MonoBehaviour {
// Use this for initialization
// Use this for initialization
void
Start
()
{
void
Start
()
{
inTetris
=
true
;
}
}
// Update is called once per frame
// Update is called once per frame
...
...
Assets/Scripts/UI/LifeCrystalUI.cs
View file @
d052546b
...
@@ -228,7 +228,7 @@ public class LifeCrystalUI : MonoBehaviour
...
@@ -228,7 +228,7 @@ public class LifeCrystalUI : MonoBehaviour
/// </summary>
/// </summary>
void
FixedUpdate
()
void
FixedUpdate
()
{
{
textUI
.
text
=
"Life: "
+
lifeCount
+
", Gold: "
+
goldCount
;
//
textUI.text = "Life: " + lifeCount + ", Gold: " + goldCount;
}
}
////////////////////////////////////////////////// Hidden functions
////////////////////////////////////////////////// Hidden functions
/// <summary>
/// <summary>
...
...
Assets/Sprites/TetrisBackground.png.meta
View file @
d052546b
...
@@ -31,7 +31,7 @@ TextureImporter:
...
@@ -31,7 +31,7 @@ TextureImporter:
maxTextureSize: 2048
maxTextureSize: 2048
textureSettings:
textureSettings:
serializedVersion: 2
serializedVersion: 2
filterMode:
-1
filterMode:
0
aniso: -1
aniso: -1
mipBias: -100
mipBias: -100
wrapU: 1
wrapU: 1
...
@@ -63,7 +63,7 @@ TextureImporter:
...
@@ -63,7 +63,7 @@ TextureImporter:
maxTextureSize: 2048
maxTextureSize: 2048
resizeAlgorithm: 0
resizeAlgorithm: 0
textureFormat: -1
textureFormat: -1
textureCompression:
1
textureCompression:
0
compressionQuality: 50
compressionQuality: 50
crunchedCompression: 0
crunchedCompression: 0
allowsAlphaSplitting: 0
allowsAlphaSplitting: 0
...
@@ -74,7 +74,7 @@ TextureImporter:
...
@@ -74,7 +74,7 @@ TextureImporter:
maxTextureSize: 2048
maxTextureSize: 2048
resizeAlgorithm: 0
resizeAlgorithm: 0
textureFormat: -1
textureFormat: -1
textureCompression:
1
textureCompression:
0
compressionQuality: 50
compressionQuality: 50
crunchedCompression: 0
crunchedCompression: 0
allowsAlphaSplitting: 0
allowsAlphaSplitting: 0
...
@@ -85,7 +85,7 @@ TextureImporter:
...
@@ -85,7 +85,7 @@ TextureImporter:
maxTextureSize: 2048
maxTextureSize: 2048
resizeAlgorithm: 0
resizeAlgorithm: 0
textureFormat: -1
textureFormat: -1
textureCompression:
1
textureCompression:
0
compressionQuality: 50
compressionQuality: 50
crunchedCompression: 0
crunchedCompression: 0
allowsAlphaSplitting: 0
allowsAlphaSplitting: 0
...
...
ProjectSettings/InputManager.asset
View file @
d052546b
...
@@ -90,7 +90,7 @@ InputManager:
...
@@ -90,7 +90,7 @@ InputManager:
descriptiveName
:
descriptiveName
:
descriptiveNegativeName
:
descriptiveNegativeName
:
negativeButton
:
negativeButton
:
positiveButton
:
space
positiveButton
:
up
altNegativeButton
:
altNegativeButton
:
altPositiveButton
:
altPositiveButton
:
gravity
:
1000
gravity
:
1000
...
...
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