Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
ButtonPusher
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
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
Button Pusher
ButtonPusher
Commits
84f0cd39
You need to sign in or sign up before continuing.
Commit
84f0cd39
authored
Mar 03, 2018
by
16이상민
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove Singleton Game Script
parent
576bdb3b
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
23 additions
and
53 deletions
+23
-53
InGame.unity
Assets/Scene/InGame.unity
+0
-13
SetSelect.unity
Assets/Scene/SetSelect.unity
+0
-13
AllSceneManager.cs
Assets/Script/AllSceneManager.cs
+10
-0
EndGame.cs
Assets/Script/EndGame.cs
+1
-1
GameManager.cs
Assets/Script/GameManager.cs
+1
-14
InGameManager.cs
Assets/Script/InGameManager.cs
+7
-7
ScoreDisplayManager.cs
Assets/Script/ScoreDisplayManager.cs
+1
-1
TitleManager.cs
Assets/Script/TitleManager.cs
+1
-1
TrackManager.cs
Assets/Script/TrackManager.cs
+2
-2
ProjectSettings.asset
ProjectSettings/ProjectSettings.asset
+0
-1
No files found.
Assets/Scene/InGame.unity
View file @
84f0cd39
...
...
@@ -1519,7 +1519,6 @@ GameObject:
m_Component
:
-
component
:
{
fileID
:
750753103
}
-
component
:
{
fileID
:
750753105
}
-
component
:
{
fileID
:
750753106
}
-
component
:
{
fileID
:
750753107
}
-
component
:
{
fileID
:
750753108
}
-
component
:
{
fileID
:
750753109
}
...
...
@@ -1571,18 +1570,6 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
6e697643158480b4ba850d906eac1bc2
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
---
!u!114
&750753106
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_PrefabParentObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
750753102
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
a9d22e7eb4921ca47b18c68e43c0eb6e
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
defaultSound
:
$
---
!u!114
&750753107
MonoBehaviour
:
m_ObjectHideFlags
:
0
...
...
Assets/Scene/SetSelect.unity
View file @
84f0cd39
...
...
@@ -488,7 +488,6 @@ GameObject:
serializedVersion
:
5
m_Component
:
-
component
:
{
fileID
:
609057691
}
-
component
:
{
fileID
:
609057690
}
-
component
:
{
fileID
:
609057689
}
m_Layer
:
0
m_Name
:
Managers
...
...
@@ -519,18 +518,6 @@ MonoBehaviour:
-
{
fileID
:
2800000
,
guid
:
70208bf410b6ec2429bfba715fc33842
,
type
:
3
}
Artist
:
{
fileID
:
1505678207
}
BPM
:
{
fileID
:
1378665695
}
---
!u!114
&609057690
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_PrefabParentObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
609057688
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
a9d22e7eb4921ca47b18c68e43c0eb6e
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
defaultSound
:
{
fileID
:
0
}
---
!u!4
&609057691
Transform
:
m_ObjectHideFlags
:
0
...
...
Assets/Script/AllSceneManager.cs
View file @
84f0cd39
using
JudgeModule
;
using
System.Collections.Generic
;
using
TrackAnalysis
;
using
UnityEngine.SceneManagement
;
public
static
class
AllSceneManager
{
...
...
@@ -44,6 +46,9 @@ public static class AllSceneManager
}
}
public
static
TrackInfo
CurrentTrack
=
new
TrackInfo
(
"Assets/Tracks/Tutorial/temp2.bpe"
);
public
static
void
InitJudgeResult
()
{
combo
=
0
;
...
...
@@ -51,4 +56,9 @@ public static class AllSceneManager
Score
=
0
;
Judge
.
JudgeList
.
ForEach
(
x
=>
JudgeCount
[
x
]
=
0
);
}
public
static
void
SceneTransition
(
string
sceneName
)
{
SceneManager
.
LoadScene
(
"Scene/"
+
sceneName
,
LoadSceneMode
.
Single
);
}
}
\ No newline at end of file
Assets/Script/EndGame.cs
View file @
84f0cd39
...
...
@@ -7,7 +7,7 @@ public class EndGame : MonoBehaviour
if
(
Input
.
GetKeyDown
(
KeyCode
.
P
))
{
Destroy
(
this
);
GameManager
.
Instance
.
SceneTransition
(
"Result"
);
AllSceneManager
.
SceneTransition
(
"Result"
);
}
}
}
Assets/Script/GameManager.cs
View file @
84f0cd39
...
...
@@ -14,29 +14,16 @@ public class GameManager : MonoBehaviour {
as
GameManager
;
if
(
instance
==
null
)
instance
=
new
GameObject
().
AddComponent
<
GameManager
>();
instance
.
CurrentTrack
=
new
TrackInfo
(
"Assets/Tracks/Tutorial/temp2.bpe"
);
}
return
instance
;
}
}
[
SerializeField
]
public
string
defaultSound
;
public
TrackInfo
CurrentTrack
{
get
;
set
;
}
// Use this for initialization
void
Start
()
{
DontDestroyOnLoad
(
Instance
);
}
public
void
SceneTransition
(
string
sceneName
,
bool
additive
=
false
)
{
SceneManager
.
LoadScene
(
"Scene/"
+
sceneName
,
additive
?
LoadSceneMode
.
Additive
:
LoadSceneMode
.
Single
);
}
}
Assets/Script/InGameManager.cs
View file @
84f0cd39
...
...
@@ -51,13 +51,13 @@ public class InGameManager : MonoBehaviour
{
notemanager
=
new
NoteManager
(
objects
,
GameManager
.
Instance
.
CurrentTrack
.
BPM
,
GameManager
.
Instance
.
CurrentTrack
.
LastNote
);
AllSceneManager
.
CurrentTrack
.
BPM
,
AllSceneManager
.
CurrentTrack
.
LastNote
);
judgemanager
=
new
JudgeManager
(
input
,
ShowResult
,
objects
,
GameManager
.
Instance
.
CurrentTrack
.
BPM
);
AllSceneManager
.
CurrentTrack
.
BPM
);
}
private
void
SetObjectRef
()
...
...
@@ -100,7 +100,7 @@ public class InGameManager : MonoBehaviour
baseTime
=
0f
;
IsInitTime
=
false
;
delayBase
=
(
appear
.
transform
.
position
.
x
-
offset
.
transform
.
position
.
x
)
*
GameManager
.
Instance
.
CurrentTrack
.
BPM
/
(
60
*
1000
);
*
AllSceneManager
.
CurrentTrack
.
BPM
/
(
60
*
1000
);
}
private
void
SetSound
()
...
...
@@ -109,8 +109,8 @@ public class InGameManager : MonoBehaviour
sounds
.
transform
.
Cast
<
Transform
>()
.
ToList
()
.
ForEach
(
x
=>
x
.
gameObject
.
SetActive
(
false
));
if
(
GameManager
.
Instance
.
CurrentTrack
.
BGM
!=
null
)
sounds
.
transform
.
Find
(
GameManager
.
Instance
.
CurrentTrack
.
BGM
)
if
(
AllSceneManager
.
CurrentTrack
.
BGM
!=
null
)
sounds
.
transform
.
Find
(
AllSceneManager
.
CurrentTrack
.
BGM
)
.
gameObject
.
SetActive
(
true
);
}
...
...
@@ -162,7 +162,7 @@ public class InGameManager : MonoBehaviour
Destroy
(
GetComponent
<
CoordinateMapperManager
>());
Destroy
(
this
);
GameManager
.
Instance
.
SceneTransition
(
"Result"
);
AllSceneManager
.
SceneTransition
(
"Result"
);
}
}
}
Assets/Script/ScoreDisplayManager.cs
View file @
84f0cd39
...
...
@@ -30,7 +30,7 @@ public class ScoreDisplayManager : MonoBehaviour
AllSceneManager
.
InitJudgeResult
();
Destroy
(
this
);
GameManager
.
Instance
.
SceneTransition
(
"SetSelect"
);
AllSceneManager
.
SceneTransition
(
"SetSelect"
);
return
;
}
...
...
Assets/Script/TitleManager.cs
View file @
84f0cd39
...
...
@@ -7,7 +7,7 @@ public class TitleManager : MonoBehaviour
if
(
Input
.
anyKey
)
{
Destroy
(
this
);
GameManager
.
Instance
.
SceneTransition
(
"SetSelect"
);
AllSceneManager
.
SceneTransition
(
"SetSelect"
);
return
;
}
}
...
...
Assets/Script/TrackManager.cs
View file @
84f0cd39
...
...
@@ -136,12 +136,12 @@ public class TrackManager : MonoBehaviour
{
// TODO: disable start button if nothing selected
GameManager
.
Instance
.
CurrentTrack
=
selected
.
GetComponent
<
TrackInfoHolder
>().
trackInfo
;
AllSceneManager
.
CurrentTrack
=
selected
.
GetComponent
<
TrackInfoHolder
>().
trackInfo
;
AllSceneManager
.
InitJudgeResult
();
Destroy
(
this
);
GameManager
.
Instance
.
SceneTransition
(
"InGame"
);
AllSceneManager
.
SceneTransition
(
"InGame"
);
}
private
enum
KeyDown
...
...
ProjectSettings/ProjectSettings.asset
View file @
84f0cd39
...
...
@@ -204,7 +204,6 @@ PlayerSettings:
tvOSSmallIconLayers
:
[]
tvOSSmallIconLayers2x
:
[]
tvOSLargeIconLayers
:
[]
tvOSLargeIconLayers2x
:
[]
tvOSTopShelfImageLayers
:
[]
tvOSTopShelfImageLayers2x
:
[]
tvOSTopShelfImageWideLayers
:
[]
...
...
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