Commit e322396a authored by astatham's avatar astatham
Browse files

Responds to both WSAD and arrow keys when WSAD is selected (but need prefabs...

Responds to both WSAD and arrow keys when WSAD is selected (but need prefabs for alternative controls), songs play at 0.8 speed and notes (roughly) match, Meatball needs tested for difficulty
parent 74e1764f
......@@ -161,10 +161,10 @@ MonoBehaviour:
W: {fileID: 1420096474736596, guid: ddb405a62d214054baf706c375a9ed2e, type: 2}
E: {fileID: 1110090660017558, guid: c1bec4cfb8c9c7e48bc68b3cbea99fcd, type: 2}
R: {fileID: 1228962705143456, guid: 352590e9c786f6b41858f33bafff05a5, type: 2}
up: {fileID: 0}
down: {fileID: 0}
left: {fileID: 0}
right: {fileID: 0}
up: {fileID: 1420096474736596, guid: ddb405a62d214054baf706c375a9ed2e, type: 2}
down: {fileID: 1110090660017558, guid: c1bec4cfb8c9c7e48bc68b3cbea99fcd, type: 2}
left: {fileID: 1454089066838800, guid: 7c9d4c7ce0894e842b903da1b51bd667, type: 2}
right: {fileID: 1228962705143456, guid: 352590e9c786f6b41858f33bafff05a5, type: 2}
skip: 0
volumeFade: 0.2
qwer: 1
......@@ -180,7 +180,7 @@ AudioSource:
m_audioClip: {fileID: 0}
m_PlayOnAwake: 1
m_Volume: 1
m_Pitch: 1
m_Pitch: 0.8
Loop: 0
Mute: 0
Spatialize: 0
......@@ -889,7 +889,9 @@ MonoBehaviour:
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Coming Soon! (this is not a song)
m_Text: 'Meatball
Parade'
--- !u!222 &448748889
CanvasRenderer:
m_ObjectHideFlags: 0
......@@ -2838,7 +2840,7 @@ Prefab:
objectReference: {fileID: 0}
- target: {fileID: 1602431506710890, guid: a6dd0ddad611645efbc5ef92c67041a7, type: 2}
propertyPath: m_IsActive
value: 0
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: a6dd0ddad611645efbc5ef92c67041a7, type: 2}
......
......@@ -118,7 +118,7 @@ public class SpawnKeys : MonoBehaviour {
if(endSong == true && music != null){
music.volume -= (volumeFade * Time.deltaTime);
}
while (nextKey != null && Time.time > startTime + float.Parse(nextKey[1]) - skip)
while (nextKey != null && Time.time > startTime + (float.Parse(nextKey[1])/0.8f) - skip)
{
if (float.Parse(nextKey[1]) >= skip)
{
......
......@@ -54,7 +54,7 @@ public class TriggerManager : MonoBehaviour
//Check which key the player presses
if (GameManager.PlayerCanDance)
{
if (Input.GetKeyDown(KeyCode.Q))
if (Input.GetKeyDown(KeyCode.Q) && GameObject.FindObjectOfType<SpawnKeys>().qwer || Input.GetKeyDown(KeyCode.A) || Input.GetKeyDown(KeyCode.LeftArrow) && !GameObject.FindObjectOfType<SpawnKeys>().qwer)
{
moveColliders((int)keys.left);
Vector3 newScale = player.transform.localScale;
......@@ -62,7 +62,7 @@ public class TriggerManager : MonoBehaviour
player.transform.localScale = newScale;
checkLowestKey();
}
if (Input.GetKeyDown(KeyCode.R))
if (Input.GetKeyDown(KeyCode.R) && GameObject.FindObjectOfType<SpawnKeys>().qwer || Input.GetKeyDown(KeyCode.D) || Input.GetKeyDown(KeyCode.RightArrow) && !GameObject.FindObjectOfType<SpawnKeys>().qwer)
{
moveColliders((int)keys.right);
Vector3 newScale = player.transform.localScale;
......@@ -70,7 +70,7 @@ public class TriggerManager : MonoBehaviour
player.transform.localScale = newScale;
checkLowestKey();
}
if (Input.GetKeyDown(KeyCode.W))
if (Input.GetKeyDown(KeyCode.W) || Input.GetKeyDown(KeyCode.UpArrow) && !GameObject.FindObjectOfType<SpawnKeys>().qwer)
{
moveColliders((int)keys.up);
Vector3 newPos = player.transform.position;
......@@ -78,7 +78,7 @@ public class TriggerManager : MonoBehaviour
player.transform.position = newPos;
checkLowestKey();
}
if (Input.GetKeyDown(KeyCode.E))
if (Input.GetKeyDown(KeyCode.E) && GameObject.FindObjectOfType<SpawnKeys>().qwer || Input.GetKeyDown(KeyCode.S) || Input.GetKeyDown(KeyCode.DownArrow) && !GameObject.FindObjectOfType<SpawnKeys>().qwer)
{
moveColliders((int)keys.down);
Vector3 newPos = player.transform.position;
......
Markdown is supported
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