// Use this for initialization void Start () { clipSender = GetComponent<AudioSource>(); lenghtSong = (int)(clipSender.clip.length); time.text = ""+lenghtSong; timeLeft = lenghtSong; socketio = socketioObject.GetComponent<teSocket>(); }
// Use this for initialization void Start() { menu.transform.position = Vector3.zero; audioSource = GetComponent <AudioSource> (); croudSource = croud.GetComponent <AudioSource> (); socketio = socketioObject.GetComponent <teSocket>(); }
// Use this for initialization void Start() { clipSender = GetComponent <AudioSource>(); lenghtSong = (int)(clipSender.clip.length); time.text = "" + lenghtSong; timeLeft = lenghtSong; socketio = socketioObject.GetComponent <teSocket>(); }
// Use this for initialization void Start () { menu.transform.position = Vector3.zero; audioSource = GetComponent<AudioSource> (); croudSource = croud.GetComponent<AudioSource> (); socketio = socketioObject.GetComponent<teSocket>(); }
void Start() { //Random generator -- TO AVOID /* * for(int i=0; i<50; i++){ * string s = ((int)(Random.Range((i+1)*0.5f-0.2f, (i+1)*0.5f+0.2f))*1000+2000)+","+(int)Random.Range(1,4.999f); * notesPreSpawn.Add(s); * Debug.Log(s); * } */ /* * int start = 2000; * int[][] s = { * new int[]{56, 1}, * new int[]{56, 4}, * new int[]{136, 2}, * new int[]{304, 3}, * new int[]{384, 2}, * new int[]{272, 2}, * new int[]{184, 1}, * new int[]{56, 4}, * }; */ socketio = socketioObject.GetComponent <teSocket> (); lag = socketio.lag; songPlayer = GameObject.Find("gameflowManager"); songData = songPlayer.GetComponent <myMenuManager> ().songData; multiplayer = songPlayer.GetComponent <myMenuManager> ().online; string[] lines = songData.text.Split('\n'); foreach (string s in lines) { if (s.Length > 0) { //Debug.Log (s); string[] data = s.Split(','); int time = 0; if (int.TryParse(data[0], out time)) { time += (int)songStartDataDelay; //int time = (int)(int.Parse(data[0])+songStartDataDelay); notesPreSpawn.Add(time + "," + data[1]); } else { notesPreSpawn.Add(data[0] + "," + data[1]); } } } arrows [0] = arrowLEFT; arrows [1] = arrowUP; arrows [2] = arrowDOWN; arrows [3] = arrowRIGHT; arrowsMove [0] = arrowLEFT_Moves; arrowsMove [1] = arrowUP_Moves; arrowsMove [2] = arrowDOWN_Moves; arrowsMove [3] = arrowRIGHT_Moves; spawnPreTime = 1000 * zArrowSpawn / zArrowSpeed; audioSource = songPlayer.GetComponent <AudioSource> (); ok.enabled = false; good.enabled = false; perfect.enabled = false; missed.enabled = false; wrong.enabled = false; combo_10.enabled = false; }
void Start () { //Random generator -- TO AVOID /* for(int i=0; i<50; i++){ string s = ((int)(Random.Range((i+1)*0.5f-0.2f, (i+1)*0.5f+0.2f))*1000+2000)+","+(int)Random.Range(1,4.999f); notesPreSpawn.Add(s); Debug.Log(s); } */ /* int start = 2000; int[][] s = { new int[]{56, 1}, new int[]{56, 4}, new int[]{136, 2}, new int[]{304, 3}, new int[]{384, 2}, new int[]{272, 2}, new int[]{184, 1}, new int[]{56, 4}, }; */ socketio = socketioObject.GetComponent<teSocket> (); lag = socketio.lag; songPlayer = GameObject.Find ("gameflowManager"); songData = songPlayer.GetComponent<myMenuManager> ().songData; multiplayer = songPlayer.GetComponent<myMenuManager> ().online; string[] lines = songData.text.Split('\n'); foreach (string s in lines) { if(s.Length > 0){ //Debug.Log (s); string[] data = s.Split(','); int time = 0; if(int.TryParse(data[0], out time)){ time += (int)songStartDataDelay; //int time = (int)(int.Parse(data[0])+songStartDataDelay); notesPreSpawn.Add(time+","+data[1]); } else{ notesPreSpawn.Add(data[0]+","+data[1]); } } } arrows [0] = arrowLEFT; arrows [1] = arrowUP; arrows [2] = arrowDOWN; arrows [3] = arrowRIGHT; arrowsMove [0] = arrowLEFT_Moves; arrowsMove [1] = arrowUP_Moves; arrowsMove [2] = arrowDOWN_Moves; arrowsMove [3] = arrowRIGHT_Moves; spawnPreTime = 1000 * zArrowSpawn / zArrowSpeed; audioSource = songPlayer.GetComponent<AudioSource> (); ok.enabled = false; good.enabled = false; perfect.enabled = false; missed.enabled = false; wrong.enabled = false; combo_10.enabled = false; }