public void LoadQuestionDataTest() { // Arrange. String line = "3;WHICH OF THE FOLLOWING|CHARACTERS IS A NON-SMOKER?;KRUSTY;NELSON;GRAMPA SIMPSON;MRS. KRABAPPLE;page01;02-GeneralSimpsonsTrivia.csv"; // Act. Question question = QuestionManager.LoadQuestion(line); // Assert. Assert.That(question, Is.Not.Null); }
// Use this for initialization void Start() { buttonText = new Text[4]; playerAttacks = GameObject.Find ("PlayerAttacks"); lightBeam = GameObject.Find ("LightBeam"); combo = GameObject.Find("Combo"); hpGuage = GameObject.Find("HpGuage"); panel = GameObject.Find("Panel"); startButton = GameObject.Find("StartButton"); startButton.SetActive(false); myPv = this.GetComponent<PhotonView>(); GameManager.instance.Score = 0; rtChargeGuage = playerAttacks.transform.GetChild (0).GetComponent<RectTransform> (); playerAttacks.SetActive(false); lightBeam.SetActive (false); questionManager = this.GetComponent<QuestionManager> (); questionManager.LoadQuestion (GameManager.instance.SelectLevel); questionText = GameObject.Find ("QuestionText").GetComponent<Text> (); questionText.text = "みんなの じゅんびが\nできるまで まってね"; answerText1 = GameObject.Find ("AnswerText1").GetComponent<Text> (); answerText2 = GameObject.Find ("AnswerText2").GetComponent<Text> (); answerText3 = GameObject.Find ("AnswerText3").GetComponent<Text> (); answerText4 = GameObject.Find ("AnswerText4").GetComponent<Text> (); answerButtons = new Button[4]; answerButtons [0] = GameObject.Find ("AnswerButton1").GetComponent<Button> (); answerButtons [1] = GameObject.Find ("AnswerButton2").GetComponent<Button> (); answerButtons [2] = GameObject.Find ("AnswerButton3").GetComponent<Button> (); answerButtons [3] = GameObject.Find ("AnswerButton4").GetComponent<Button> (); BUTTON_DEFAULT_COLOR = new Color (255.0f/255, 190.0f/255, 120.0f/255); foreach (Button button in answerButtons) { button.gameObject.SetActive(false); } questionIndex = 1; answerNum = -1; remainTurn = 10; remainTime = 10.0f; isAnswering = false; difficulty = GameManager.instance.difficulty; difficultyText = GameObject.Find ("DifficultyText").GetComponent<Text>(); switch (difficulty) { case 1: difficultyText.text = "レベル\nかんたん"; break; case 2: difficultyText.text = "レベル\nふつう"; break; case 3: difficultyText.text = "レベル\nむずかしい"; break; default: difficultyText.text = "レベル\nかんたん"; break; } turnText = GameObject.Find ("TurnText").GetComponent<Text> (); turnText.text = "のこり10ターン"; timeText = GameObject.Find ("TimeText").GetComponent<Text> (); timeText.text = "のこり10びょう"; joinedPlayers = GameObject.Find ("JoinedPlayers"); joinedPlayerObjectList = new List<GameObject> (); for (int i = 0; i < joinedPlayers.transform.childCount; i++) { GameObject targetObject = joinedPlayers.transform.GetChild (i).gameObject; joinedPlayerObjectList.Add (targetObject); targetObject.transform.GetChild(0).gameObject.SetActive(false); targetObject.SetActive(false); } GameManager.instance.Score = 0; enemyImage = GameObject.Find ("Enemy").GetComponent<Image>(); enemyImage.sprite = enemySprites [GameManager.instance.SelectLevel]; }
// Use this for initialization void Start() { buttonText = new Text[4]; playerAttacks = GameObject.Find("PlayerAttacks"); lightBeam = GameObject.Find("LightBeam"); combo = GameObject.Find("Combo"); hpGuage = GameObject.Find("HpGuage"); panel = GameObject.Find("Panel"); startButton = GameObject.Find("StartButton"); startButton.SetActive(false); myPv = this.GetComponent <PhotonView>(); GameManager.instance.Score = 0; rtChargeGuage = playerAttacks.transform.GetChild(0).GetComponent <RectTransform> (); playerAttacks.SetActive(false); lightBeam.SetActive(false); questionManager = this.GetComponent <QuestionManager> (); questionManager.LoadQuestion(GameManager.instance.SelectLevel); questionText = GameObject.Find("QuestionText").GetComponent <Text> (); questionText.text = "みんなの じゅんびが\nできるまで まってね"; answerText1 = GameObject.Find("AnswerText1").GetComponent <Text> (); answerText2 = GameObject.Find("AnswerText2").GetComponent <Text> (); answerText3 = GameObject.Find("AnswerText3").GetComponent <Text> (); answerText4 = GameObject.Find("AnswerText4").GetComponent <Text> (); answerButtons = new Button[4]; answerButtons [0] = GameObject.Find("AnswerButton1").GetComponent <Button> (); answerButtons [1] = GameObject.Find("AnswerButton2").GetComponent <Button> (); answerButtons [2] = GameObject.Find("AnswerButton3").GetComponent <Button> (); answerButtons [3] = GameObject.Find("AnswerButton4").GetComponent <Button> (); BUTTON_DEFAULT_COLOR = new Color(255.0f / 255, 190.0f / 255, 120.0f / 255); foreach (Button button in answerButtons) { button.gameObject.SetActive(false); } questionIndex = 1; answerNum = -1; remainTurn = 10; remainTime = 10.0f; isAnswering = false; difficulty = GameManager.instance.difficulty; difficultyText = GameObject.Find("DifficultyText").GetComponent <Text>(); switch (difficulty) { case 1: difficultyText.text = "レベル\nかんたん"; break; case 2: difficultyText.text = "レベル\nふつう"; break; case 3: difficultyText.text = "レベル\nむずかしい"; break; default: difficultyText.text = "レベル\nかんたん"; break; } turnText = GameObject.Find("TurnText").GetComponent <Text> (); turnText.text = "のこり10ターン"; timeText = GameObject.Find("TimeText").GetComponent <Text> (); timeText.text = "のこり10びょう"; joinedPlayers = GameObject.Find("JoinedPlayers"); joinedPlayerObjectList = new List <GameObject> (); for (int i = 0; i < joinedPlayers.transform.childCount; i++) { GameObject targetObject = joinedPlayers.transform.GetChild(i).gameObject; joinedPlayerObjectList.Add(targetObject); targetObject.transform.GetChild(0).gameObject.SetActive(false); targetObject.SetActive(false); } GameManager.instance.Score = 0; enemyImage = GameObject.Find("Enemy").GetComponent <Image>(); enemyImage.sprite = enemySprites [GameManager.instance.SelectLevel]; }
static void LoadProblems(object paramsInfo) { ThreadParam threadParam = (ThreadParam)paramsInfo; QuestionManager.LoadQuestion(threadParam.Start, threadParam.End); }