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
3d7c5622
Commit
3d7c5622
authored
Feb 19, 2019
by
18손재민
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
타이틀 씬 만듬
parent
f2d60d26
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
717 additions
and
5 deletions
+717
-5
PlayerIcon.prefab
Assets/Prefabs/TetrisMap/PlayerIcon.prefab
+1
-1
TitleScene.unity
Assets/Scenes/TitleScene.unity
+662
-0
TitleScene.unity.meta
Assets/Scenes/TitleScene.unity.meta
+7
-0
GameManager.cs
Assets/Scripts/GameManager.cs
+12
-3
MenuManager.cs
Assets/Scripts/MenuManager.cs
+22
-0
MenuManager.cs.meta
Assets/Scripts/MenuManager.cs.meta
+11
-0
Portal.cs
Assets/Scripts/TetrisMap/Portal.cs
+2
-1
No files found.
Assets/Prefabs/TetrisMap/PlayerIcon.prefab
View file @
3d7c5622
...
...
@@ -34,7 +34,7 @@ Transform:
m_PrefabInternal
:
{
fileID
:
100100000
}
m_GameObject
:
{
fileID
:
1704656476422024
}
m_LocalRotation
:
{
x
:
-0
,
y
:
-0
,
z
:
-0
,
w
:
1
}
m_LocalPosition
:
{
x
:
1
44
,
y
:
0
,
z
:
-2
}
m_LocalPosition
:
{
x
:
1
92
,
y
:
0
,
z
:
-2
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_Children
:
[]
m_Father
:
{
fileID
:
0
}
...
...
Assets/Scenes/TitleScene.unity
0 → 100644
View file @
3d7c5622
This diff is collapsed.
Click to expand it.
Assets/Scenes/TitleScene.unity.meta
0 → 100644
View file @
3d7c5622
fileFormatVersion: 2
guid: 1ff9b440e69e4bf4ea0467f07343403f
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/Scripts/GameManager.cs
View file @
3d7c5622
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
using
UnityEngine.SceneManagement
;
...
...
@@ -11,6 +10,9 @@ public class GameManager : Singleton<GameManager> {
/// </summary>
public
static
GameState
gameState
;
/// <summary>
/// Position where portal would spawn player.
/// </summary>
Vector3
spawnPosition
=
new
Vector3
(
2
,
1
,
0
);
public
GameObject
minimap
;
...
...
@@ -21,7 +23,11 @@ public class GameManager : Singleton<GameManager> {
// Constructor - protect calling raw constructor
protected
GameManager
()
{
}
public
IEnumerator
StartGame
()
/// <summary>
/// Ends the tutorial and start real game.
/// </summary>
/// <returns></returns>
public
IEnumerator
EndTutorial
()
{
yield
return
new
WaitForSeconds
(
1f
);
gameState
=
GameState
.
Ingame
;
...
...
@@ -32,6 +38,9 @@ public class GameManager : Singleton<GameManager> {
GameObject
.
Find
(
"Main Camera"
).
transform
.
position
=
GameObject
.
Find
(
"Player"
).
transform
.
position
+
new
Vector3
(
0
,
0
,
-
1
);
}
/// <summary>
/// Restarts the game.
/// </summary>
public
void
RestartGame
()
{
SceneManager
.
LoadScene
(
"PlayScene"
);
...
...
@@ -39,7 +48,7 @@ public class GameManager : Singleton<GameManager> {
void
Awake
()
{
//DontDestroyOnLoad(gameObject);
}
// Use this for initialization
...
...
Assets/Scripts/MenuManager.cs
0 → 100644
View file @
3d7c5622
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
using
UnityEngine.SceneManagement
;
public
class
MenuManager
:
MonoBehaviour
{
public
void
StartGame
()
{
SceneManager
.
LoadScene
(
"PlayScene"
);
}
// Use this for initialization
void
Start
()
{
}
// Update is called once per frame
void
Update
()
{
}
}
Assets/Scripts/MenuManager.cs.meta
0 → 100644
View file @
3d7c5622
fileFormatVersion: 2
guid: c29f8fff47d4559458612f7f39d777aa
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Assets/Scripts/TetrisMap/Portal.cs
View file @
3d7c5622
...
...
@@ -12,13 +12,14 @@ public class Portal : MonoBehaviour, IPlayerInteraction {
StartCoroutine
(
GameObject
.
FindGameObjectWithTag
(
"MainCamera"
).
GetComponent
<
CameraController
>().
ChangeScene
(
GameState
.
Portal
));
else
if
(
GameManager
.
gameState
==
GameState
.
Tutorial
&&
!
isPortalUsed
)
{
StartCoroutine
(
GameManager
.
Instance
.
EndTutorial
());
isPortalUsed
=
true
;
StartCoroutine
(
GameManager
.
Instance
.
StartGame
());
}
}
public
void
HighlightSwitch
(
bool
enabled
)
{
}
// Use this for initialization
...
...
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