Commit d652b654 authored by gstuitje's avatar gstuitje
Browse files

Bavaria song now finishes.

parent 29e0f6a7
......@@ -233,7 +233,8 @@ MonoBehaviour:
songFile: {fileID: 4900000, guid: 2009ec12e81114ee1acd4caadc2602c4, type: 3}
arrowPrefab: {fileID: 1765769401102260, guid: 72656df34da634e679741c24832b3f36,
type: 2}
skip: 0
skip: 57
volumeFade: 0.2
--- !u!82 &89139957
AudioSource:
m_ObjectHideFlags: 0
......@@ -258,7 +259,7 @@ AudioSource:
Pan2D: 0
rolloffMode: 0
BypassEffects: 0
BypassListenerEffects: 0
BypassListenerEffects: 1
BypassReverbZones: 0
rolloffCustomCurve:
serializedVersion: 2
......@@ -578,7 +579,7 @@ BoxCollider2D:
adaptiveTiling: 0
m_AutoTiling: 0
serializedVersion: 2
m_Size: {x: 0.9, y: 0.15}
m_Size: {x: 0.9, y: 0.3}
m_EdgeRadius: 0
--- !u!1 &519420028
GameObject:
......@@ -1263,7 +1264,7 @@ Prefab:
objectReference: {fileID: 0}
- target: {fileID: 4145066122545122, guid: 72656df34da634e679741c24832b3f36, type: 2}
propertyPath: m_LocalPosition.y
value: -3.994
value: -3.81
objectReference: {fileID: 0}
- target: {fileID: 4145066122545122, guid: 72656df34da634e679741c24832b3f36, type: 2}
propertyPath: m_LocalPosition.z
......@@ -1289,6 +1290,11 @@ Prefab:
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
- target: {fileID: 61597912326454196, guid: 72656df34da634e679741c24832b3f36,
type: 2}
propertyPath: m_Size.y
value: 0.001
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 72656df34da634e679741c24832b3f36, type: 2}
m_IsPrefabAsset: 0
......@@ -1644,7 +1650,7 @@ BoxCollider2D:
adaptiveTiling: 0
m_AutoTiling: 0
serializedVersion: 2
m_Size: {x: 0.9, y: 0.6}
m_Size: {x: 0.9, y: 1}
m_EdgeRadius: 0
--- !u!1 &1795598300
GameObject:
......@@ -1698,5 +1704,5 @@ BoxCollider2D:
adaptiveTiling: 0
m_AutoTiling: 0
serializedVersion: 2
m_Size: {x: 0.9, y: 8}
m_Size: {x: 0.9, y: 3}
m_EdgeRadius: 0
......@@ -8,9 +8,12 @@ public class SpawnKeys : MonoBehaviour {
public TextAsset songFile;
public GameObject arrowPrefab;
public float skip;
public float volumeFade;
private string song = "default";
private float startTime;
private bool endSong = false;
private AudioSource music;
Queue<string[]> songKeys = new Queue<string[]>();
string[] nextKey;
......@@ -68,18 +71,23 @@ public class SpawnKeys : MonoBehaviour {
//plays the song after the first arrow reaches a barrier.
private IEnumerator playSong(AudioClip musicClip, float waitTime){
yield return new WaitForSeconds(waitTime);
AudioSource music = transform.GetComponent<AudioSource>();
music = transform.GetComponent<AudioSource>();
music.clip = musicClip;
music.Play();
music.time = skip;
}
}
// Update is called once per frame
private IEnumerator testNote(string arrow){
yield return new WaitForSeconds(songWaitTime);
TriggerManager tester = GameObject.FindWithTag("TriggerManager").GetComponent<TriggerManager>();
tester.test(arrow);
}
void Update () {
if(endSong == true){
music.volume -= (volumeFade * Time.deltaTime);
}
while (nextKey != null && Time.time > startTime + float.Parse(nextKey[1]) - skip)
{
if (float.Parse(nextKey[1]) >= skip)
......@@ -130,6 +138,7 @@ public class SpawnKeys : MonoBehaviour {
{
//no more keys
nextKey = null;
endSong = true;
}
}
}
......
......@@ -20,4 +20,114 @@ down 10.4
down 11.3
down 11.6
up 11.9
right 12.3
\ No newline at end of file
right 12.3
left 13.2
down 14.2
left 15.1
up 15.45
down 15.75
right 16
left 17.03
right 17.97
left 18.9
up 19.25
down 19.53
right 19.83
left 20.8
right 21.7
left 22.65
up 22.95
down 23.3
right 23.6
left 24.55
right 25.5
left 26.3
right 26.4
down 26.7
up 27
left 27.35
right 28.3
down 29.25
up 29.6
left 29.85
right 30.2
left 31.1
up 31.44
down 31.6
up 31.75
down 31.9
right 32.05
up 32.4
left 33.2
right 34
down 34.3
up 34.65
left 34.9
up 35.23
down 35.4
up 35.54
down 35.7
right 35.85
left 36.82
right 37.7
down 38.1
up 38.4
left 38.7
up 39
down 39.15
up 39.311
down 39.44
right 39.62
left 40.55
right 41.5
down 41.85
up 42.15
left 42.48
up 42.75
down 42.9
up 43.05
down 43.2
right 43.37
left 44.3
right 45.25
left 45.64
right 45.92
up 46.4
down 46.55
up 46.7
down 46.85
left 47.15
right 48.1
left 49
up 49.35
down 49.7
right 50
up 50.3
down 50.45
up 50.6
down 50.75
left 50.95
right 51.85
left 52.8
down 53.1
up 53.5
right 53.75
up 54.05
down 54.2
up 54.35
down 54.5
left 54.7
right 55.6
left 56.6
down 56.9
up 57.2
right 57.5
up 57.84
down 58.0
up 58.15
down 58.3
left 58.5
right 59.4
down 59.75
up 60.05
left 60.35
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment