Commit 08580bfc authored by mmaluschnig's avatar mmaluschnig
Browse files

Merge commit '70a2302c'

* commit '70a2302c':
  Meatball actually finishes now
  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
  Added QWER/WSAD toggle and Meatball is now a selectable song
  Finished (but not tested) Meatball

# Conflicts:
#	RingMaster/RingMaster/.vs/RingMaster/xs/UserPrefs.xml
parents 0aabccbb 70a2302c
<Properties StartupConfiguration="{67A4F128-F6AC-CD88-DA35-F29416A0792A}|">
<MonoDevelop.Ide.ItemProperties.Assembly-CSharp PreferredExecutionTarget="Unity.Editor" />
<MonoDevelop.Ide.Workbench ActiveDocument="Assets/Scripts/MimeScripts/MimeMime.cs">
<Files>
<File FileName="Assets/Scripts/MimeScripts/SpawnKeys.cs" Line="1" Column="1" />
<File FileName="Assets/Scripts/MimeScripts/TriggerManager.cs" Line="143" Column="32" />
<File FileName="Assets/Scripts/MimeScripts/MimeMime.cs" Line="1" Column="1" />
</Files>
</MonoDevelop.Ide.Workbench>
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
<MonoDevelop.Ide.DebuggingService.Breakpoints>
<BreakpointStore />
</MonoDevelop.Ide.DebuggingService.Breakpoints>
<MonoDevelop.Ide.DebuggingService.PinnedWatches />
<MultiItemStartupConfigurations />
</Properties>
\ No newline at end of file
fileFormatVersion: 2
guid: 6f6ec19d9670f164ebab9641d068403f
AudioImporter:
externalObjects: {}
serializedVersion: 6
defaultSettings:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:
{\rtf1\ansi\ansicpg1252\cocoartf1671\cocoasubrtf200
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
{\*\expandedcolortbl;;}
\margl1440\margr1440\vieww10800\viewh8400\viewkind0
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
\f0\fs24 \cf0 Meatball 8.0\
up 0\
left 0.2\
up 0.4\
right 0.6\
up 0.8\
down 1.5\
up 1.7\
left 1.9\
up 2.1\
right 2.3\
up 2.5\
down 3.1\
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
\cf0 up 3.3\
left 3.5\
up 3.7\
right 3.9\
up 4.1\
up 4.3\
left 4.6\
right 5.0\
down 6.2\
up 0\
left 0.2\
up 0.4\
right 0.6\
up 0.8\
\
\
}
\ No newline at end of file
Meatball 8.0
up 0
left 0.2
up 0.4
right 0.6
up 0.8
down 1.5
up 1.7
left 1.9
up 2.1
right 2.3
up 2.5
down 3.1
up 3.3
left 3.5
up 3.7
right 3.9
up 4.1
up 4.3
left 4.6
right 5.0
down 6.2
up 6.4
left 6.6
up 6.8
right 7.0
up 7.2
down 7.8
up 8.0
left 8.2
up 8.4
right 8.6
up 8.8
down 9.4
up 9.6
left 9.8
up 10.0
right 10.2
up 10.4
down 10.6
left 10.9
down 11.2
up 12.8
left 13.0
left 13.2
left 13.4
up 13.6
left 13.8
down 14.0
right 14.2
up 14.4
left 14.6
down 14.8
right 15.0
right 15.2
up 15.4
left 15.6
up 15.8
right 16.0
left 16.2
left 16.4
left 16.6
right 16.8
up 17.0
down 17.1
left 17.2
up 17.4
down 17.4
right 17.6
left 18.0
right 18.4
up 18.8
down 19.0
left 19.2
down 19.4
down 19.6
down 19.8
right 20.0
up 20.2
left 20.4
up 20.6
right 20.8
down 21.0
down 21.2
down 21.4
right 21.6
up 21.8
left 22.0
up 22.2
right 22.4
down 22.6
left 22.8
down 22.8
down 23.0
right 23.2
up 23.4
left 23.6
up 23.8
right 24.0
up 24.6
left 24.9
left 25.2
up 25.6
left 25.8
up 26.0
right 26.2
up 26.4
down 27.0
up 27.2
left 27.4
up 27.6
right 27.8
up 28.0
down 28.6
up 28.8
left 29.0
up 29.2
right 29.4
up 29.6
left 29.9
up 30.2
down 30.5
right 30.6
down 31.8
up 32.0
left 32.2
up 32.4
right 32.6
up 32.8
down 33.4
up 33.6
left 33.8
up 34.0
right 34.2
up 32.4
down 35.0
up 35.2
left 35.4
up 35.6
right 35.8
up 36.0
down 36.2
left 36.6
down 36.9
up 38.4
left 38.6
left 38.8
left 39.0
right 39.2
up 39.4
left 39.6
up 39.8
right 40.0
down 40.2
up 40.4
down 40.6
right 40.8
up 41.0
left 41.2
up 41.4
right 41.6
down 41.8
left 42.0
down 42.2
right 42.4
up 42.6
left 42.8
up 43.0
right 43.2
down 43.6
right 44.0
up 44.4
left 44.8
up 45.2
right 45.6
up 45.8
left 46.0
up 46.2
right 46.4
down 46.8
right 47.2
up 47.4
left 47.6
up 47.8
right 48.0
down 48.4
right 48.8
up 49.0
left 49.2
up 49.4
right 49.6
up 50.2
down 50.4
down 50.8
right 51.2
left 51.4
right 52.4
left 52.6
up 52.8
down 54.0
up 54.5
down 54.7
left 56.0
right 57.6
left 57.8
right 58.8
left 59.0
up 59.2
down 60.4
right 60.8
\ No newline at end of file
fileFormatVersion: 2
guid: abcc865c19a97934f901eab0f203caa5
guid: 2a280793464c6ac47b63653d084ebb79
TextScriptImporter:
externalObjects: {}
userData:
......
This diff is collapsed.
fileFormatVersion: 2
guid: bd2db1036e19184418ded17111bf1fd2
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
......@@ -2,13 +2,27 @@
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
public class SongSelect : MonoBehaviour {
private SpawnKeys keySpawner;
public Toggle qwerToggle, wsadToggle;
// Use this for initialization
void Start () {
keySpawner = GameObject.FindWithTag("LevelMaster").GetComponent<SpawnKeys>();
Toggle[] toggleArray = gameObject.GetComponentsInChildren<Toggle>();
if (toggleArray[0].tag == "QWER")
{
qwerToggle = toggleArray[0];
wsadToggle = toggleArray[1];
} else
{
qwerToggle = toggleArray[1];
wsadToggle = toggleArray[0];
}
qwerToggle.onValueChanged.AddListener(delegate { ToggleValueChanged(qwerToggle); });
wsadToggle.onValueChanged.AddListener(delegate { ToggleValueChanged(wsadToggle); });
}
public void playSong1(){
......@@ -18,16 +32,28 @@ public class SongSelect : MonoBehaviour {
public void playSong2()
{
keySpawner.Tarantell();
keySpawner.Tarantell();
gameObject.SetActive(false);
}
public void playSong3()
{
keySpawner.Meatball();
gameObject.SetActive(false);
}
public void BackToPerformance(){
SceneManager.LoadScene("NightMenu");
}
}
private void ToggleValueChanged(Toggle toggle)
{
if (toggle.tag == "QWER" && toggle.isOn)
{
GameObject.FindObjectOfType<SpawnKeys>().qwer = true;
} else if (toggle.tag == "WSAD" && toggle.isOn)
{
GameObject.FindObjectOfType<SpawnKeys>().qwer = false;
}
}
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class SpawnKeys : MonoBehaviour {
......@@ -10,8 +11,13 @@ public class SpawnKeys : MonoBehaviour {
public GameObject W;
public GameObject E;
public GameObject R;
public GameObject up;
public GameObject down;
public GameObject left;
public GameObject right;
public float skip;
public float volumeFade;
public bool qwer = true;
private bool songSet = false;
private string song = "default";
......@@ -30,7 +36,6 @@ public class SpawnKeys : MonoBehaviour {
// Use this for initialization
void Start () {
}
public void startTutorial()
......@@ -113,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)
{
......@@ -122,7 +127,13 @@ public class SpawnKeys : MonoBehaviour {
case "left":
//print("left");
Instantiate(Q, new Vector3(4.85f, 4f, 1f), Quaternion.identity);
if (qwer)
{
Instantiate(Q, new Vector3(4.85f, 4f, 1f), Quaternion.identity);
} else
{
Instantiate(left, new Vector3(4.85f, 4f, 1f), Quaternion.identity);
}
if(ComputerCheck == true){
StartCoroutine(testNote("Left"));
}
......@@ -131,7 +142,13 @@ public class SpawnKeys : MonoBehaviour {
break;
case "right":
//print("right");
Instantiate(R, new Vector3(8.82f, 4f, 1f), Quaternion.identity);
if (qwer)
{
Instantiate(R, new Vector3(8.82f, 4f, 1f), Quaternion.identity);
} else
{
Instantiate(right, new Vector3(8.82f, 4f, 1f), Quaternion.identity);
}
if (ComputerCheck == true)
{
StartCoroutine(testNote("Right"));
......@@ -140,7 +157,13 @@ public class SpawnKeys : MonoBehaviour {
break;
case "up":
//print("up");
Instantiate(W, new Vector3(6.18f, 4f, 1f), Quaternion.identity);
if (qwer)
{
Instantiate(W, new Vector3(6.18f, 4f, 1f), Quaternion.identity);
} else
{
Instantiate(up, new Vector3(6.18f, 4f, 1f), Quaternion.identity);
}
if (ComputerCheck == true)
{
StartCoroutine(testNote("Up"));
......@@ -149,7 +172,13 @@ public class SpawnKeys : MonoBehaviour {
break;
case "down":
//print("DOWN");
Instantiate(E, new Vector3(7.51f, 4f, 1f), Quaternion.identity);
if (qwer)
{
Instantiate(E, new Vector3(7.51f, 4f, 1f), Quaternion.identity);
} else
{
Instantiate(down, new Vector3(7.51f, 4f, 1f), Quaternion.identity);
}
if (ComputerCheck == true)
{
StartCoroutine(testNote("Down"));
......@@ -187,6 +216,12 @@ public class SpawnKeys : MonoBehaviour {
songSet = true;
}
public void Meatball()
{
songFile = Resources.Load<TextAsset>("Meatball");
songSet = true;
}
public void setVolume(float volume)
{
music.volume = volume;
......
......@@ -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;
......
......@@ -30,6 +30,8 @@ TagManager:
- BottomRight
- BottomCentre
- playerInput
- QWER
- WSAD
layers:
- Default
- TransparentFX
......
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