void Start() { //Find all the necessary the Game Objects gameData = GameObject.Find("GameData").GetComponent <GameDataScript>(); logInfo = GameObject.Find("ProfileInfo").GetComponent <LogInfo>(); originalCard = GameObject.Find("Memory Card").GetComponent <MemoryCardRecall>(); originalStar = GameObject.Find("Star").GetComponent <Star>(); extRes = GameObject.Find("LoadExternalResources").GetComponent <LoadExternalResources>(); rps = GameObject.Find("RecallPlaySound").GetComponent <RecallPlaySound>(); quitButton = GameObject.Find("QuitButton").GetComponent <Button>(); mainLog = GameObject.Find("MainLogging").GetComponent <MainLogging>(); #if UNITY_ANDROID && !UNITY_EDITOR //Opie looks up with NEUTRAL emotion Opie.instance().head().set_eye_type(EyeType.NEUTRAL, Opie.Head.instant_action()); Opie.instance().head().set_linked_pose_and_eye_position(0.5f, 0.5f, Opie.Head.transition_action()); #endif //Retrieve ordering of the images, all the resources should have already been loaded ordering = gameData.Ordering; images = extRes.MemoryImages; sounds = extRes.MemorySounds; words = extRes.MemoryWords; noOfCard = gameData.NRows * gameData.NCols / 2; //Shuffle the order of the cards to be Question questions = Enumerable.Range(0, noOfCard).ToArray(); Shuffle(questions); answers = new int[noOfCard]; for (int i = 0; i < noOfCard; i++) { answers[i] = ordering[questions[i]]; } CardsSetup(); //Initializing the vectors of correct and incorrect answers correct = new List <string>(); incorrect = new List <string>(); oneShotCorrect = new List <string>(); //mcbn.GetComponent<Button>().interactable = false; DeactivateAllCards(); //Present the first word (sound + transcription) NextQuestion(); }
void Start() { #if UNITY_ANDROID Opie.instance().head().set_eye_type(EyeType.NEUTRAL, Opie.Head.instant_action()); Opie.instance().head().set_linked_pose_and_eye_position(0.5f, 0.5f, Opie.Head.transition_action()); #endif //Find all the necessary the Game Objects gameData = GameObject.Find("GameData").GetComponent <GameDataScript>(); gameInfo = GameObject.Find("GameInfo").GetComponent <GameInfo>(); recallResults = GameObject.Find("RecallResults").GetComponent <RecallResults>(); recallResults.Reset(); originalCard = GameObject.Find("Memory Card").GetComponent <MemoryCardRecall>(); //originalStar = GameObject.Find("Star").GetComponent<Star>(); rps = GameObject.Find("RecallPlaySound").GetComponent <RecallPlaySound>(); quitButton = GameObject.Find("QuitButton").GetComponent <Button>(); //Retrieve ordering of the images, all the resources should have already been loaded ordering = gameData.Ordering; images = gameInfo.Images; sounds = gameInfo.Sounds; words = gameInfo.Words; no_of_card = gameData.N_rows * gameData.N_cols / 2; //Shuffle the order of the cards to be Question questions = Enumerable.Range(0, no_of_card).ToArray(); Shuffle(questions); answers = new int[no_of_card]; for (int i = 0; i < no_of_card; i++) { answers[i] = ordering[questions[i]]; } CardsSetup(); DeactivateAllCards(); //Present the first word (sound + transcription) NextQuestion(); }