// Use this for initialization void Start() { background = game.background; GUIMaster = GameObject.FindGameObjectWithTag ("GUI Master").GetComponent<cscript_GUI_master>(); soundMaster = GameObject.FindGameObjectWithTag ("Sound Master").GetComponent<cscript_sound_master>(); NewQuestion(); correctAnswers = new Answer[currentQuestion.answers.Length]; incorrectAnswers = new Answer[currentQuestion.answers.Length]; for(int i = 0; i < currentQuestion.answers.Length; i++) { if(currentQuestion.answers[i].correct == true) { correctAnswers[correctTotal] = currentQuestion.answers[i]; correctTotal++; } else { incorrectAnswers[incorrectTotal] = currentQuestion.answers[i]; incorrectTotal++; } } QuestionSeed = UnityEngine.Random.Range(1,3); CurrentSet = new Answer[3]; currentFootballLoc = new Vector2(50,Screen.height/2 - 50); destinationFootballLoc = currentFootballLoc; GoalBallPos = new Vector2(Screen.width/2 - 50,Screen.height - 200); GoalBallVelocity = Vector2.zero; }
// Use this for initialization void Start() { background = game.background; GUIMaster = GameObject.FindGameObjectWithTag ("GUI Master").GetComponent<cscript_GUI_master>(); soundMaster = GameObject.FindGameObjectWithTag ("Sound Master").GetComponent<cscript_sound_master>(); photoGroup = new Texture2D[6]; stringGroup = new string[6]; for(int i = 0; i < 6; i++) { photoGroup[i] = GUIMaster.photoIcon; stringGroup[i] = "Add Text Here..."; } }