public void Begin(cscript_plane_game controller) { this.controller = controller; this.GUIMaster = GameObject.FindGameObjectWithTag ("GUI Master").GetComponent<cscript_GUI_master>(); ScrollingBackground.gameObject.SetActive(true); ScrollingBackground.renderer.material.mainTextureOffset = Vector2.zero; Running = true; }
// 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() { GUIMaster = GameObject.FindGameObjectWithTag ("GUI Master").GetComponent<cscript_GUI_master>(); BackButton = new FancyButton("Back To Menu", Screen.width / 2 - 250, Screen.height / 2 + 310, 500, 60, 0.5f, 2); }
// 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..."; } }
// Use this for initialization void Start() { background = game.background; GUIMaster = GameObject.FindGameObjectWithTag ("GUI Master").GetComponent<cscript_GUI_master>(); }