Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
gstuitje
RingMaster
Commits
7029adbb
Commit
7029adbb
authored
Jan 31, 2019
by
mmaluschnig
Browse files
scene changes to daytime at the end of mime mime
parent
72bf9a12
Changes
3
Hide whitespace changes
Inline
Side-by-side
RingMaster/RingMaster/.vs/RingMaster/xs/UserPrefs.xml
View file @
7029adbb
<Properties
StartupConfiguration=
"{67A4F128-F6AC-CD88-DA35-F29416A0792A}|"
>
<MonoDevelop.Ide.ItemProperties.Assembly-CSharp
PreferredExecutionTarget=
"Unity.Editor"
/>
<MonoDevelop.Ide.Workbench
ActiveDocument=
"Assets/Scripts/
DaytimeScripts/Daytime
Manager.cs"
>
<MonoDevelop.Ide.Workbench
ActiveDocument=
"Assets/Scripts/
Level
Manager.cs"
>
<Files>
<File
FileName=
"Assets/TextFiles/TestMultiples.txt"
Line=
"1"
Column=
"1"
/>
<File
FileName=
"Assets/Scripts/SpawnKeys.cs"
Line=
"98"
Column=
"33"
/>
<File
FileName=
"Assets/Scripts/Key.cs"
Line=
"17"
Column=
"18"
/>
<File
FileName=
"Assets/Scripts/TriggerManager.cs"
Line=
"1"
Column=
"1"
/>
<File
FileName=
"Assets/TextFiles/Bavaria.txt"
Line=
"5"
Column=
"9"
/>
<File
FileName=
"Assets/Scripts/SimonScripts/SimonScript.cs"
Line=
"58"
Column=
"34"
/>
<File
FileName=
"Assets/Scripts/SimonScripts/NoteManager.cs"
Line=
"31"
Column=
"10"
/>
<File
FileName=
"Assets/Scripts/SimonScripts/SimonGameManager.cs"
Line=
"20"
Column=
"57"
/>
<File
FileName=
"Assets/Scripts/SimonScripts/Note.cs"
Line=
"8"
Column=
"33"
/>
<File
FileName=
"Assets/Scripts/MenuScripts/PauseMenu.cs"
Line=
"1"
Column=
"1"
/>
<File
FileName=
"Assets/Scripts/DaytimeScripts/DaytimeManager.cs"
Line=
"1"
Column=
"1"
/>
<File
FileName=
"Assets/Scripts/LevelManager.cs"
Line=
"22"
Column=
"9"
/>
</Files>
</MonoDevelop.Ide.Workbench>
<MonoDevelop.Ide.Workspace
ActiveConfiguration=
"Debug"
/>
...
...
RingMaster/RingMaster/Assets/Scripts/LevelManager.cs
View file @
7029adbb
...
...
@@ -2,19 +2,30 @@
using
System.Collections.Generic
;
using
UnityEngine
;
using
UnityEngine.UI
;
using
UnityEngine.SceneManagement
;
public
class
LevelManager
:
MonoBehaviour
{
public
Text
score
;
public
Text
combo
;
private
float
exitTime
;
// Use this for initialization
void
Start
()
{
exitTime
=
Mathf
.
Infinity
;
}
private
void
FixedUpdate
()
{
score
.
text
=
"Score: "
+
(
int
)
MimeMime
.
PlayerScore
;
combo
.
text
=
"Combo: "
+
MimeMime
.
Combo
;
if
(
Time
.
time
>
exitTime
){
SceneManager
.
LoadScene
(
"Daytime"
);
}
}
public
void
SongFinished
(){
//maybe meke it fade out
exitTime
=
Time
.
time
+
5
;
}
}
RingMaster/RingMaster/Assets/Scripts/SpawnKeys.cs
View file @
7029adbb
...
...
@@ -18,24 +18,16 @@ public class SpawnKeys : MonoBehaviour {
Queue
<
string
[
]>
songKeys
=
new
Queue
<
string
[
]>
();
string
[]
nextKey
;
string
[]
arrows
;
float
[]
timings
;
int
pointer
=
0
;
float
songWaitTime
;
private
LevelManager
levelManager
;
// Use this for initialization
void
Start
()
{
levelManager
=
GetComponent
<
LevelManager
>();
startTime
=
Time
.
time
;
//loads data into two side-by-side arrays one holding
//the string value of the arrowkey and the other
//holding the float value of the timestamp that
//the key should be instantiated.
print
(
"Array version"
);
string
[]
lines
=
songFile
.
text
.
Split
(
'\n'
);
arrows
=
new
string
[
lines
.
Length
-
1
];
timings
=
new
float
[
lines
.
Length
-
1
];
int
count
=
0
;
...
...
@@ -136,6 +128,9 @@ public class SpawnKeys : MonoBehaviour {
}
else
{
if
(!
endSong
){
levelManager
.
SongFinished
();
}
//no more keys
nextKey
=
null
;
endSong
=
true
;
...
...
astatham
@astatham
mentioned in commit
4266bfb2
·
Jan 31, 2019
mentioned in commit
4266bfb2
mentioned in commit 4266bfb26ea00911532be285b878caa61eefdf00
Toggle commit list
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