private IEnumerator WordRepLoadResources() { Msg.text = "Loading resources..."; yield return(new WaitForSeconds(0.5f)); extRes.LoadMemoryGameResources(); activityChosen = (int)MainLogging.ActivityType.Repetition; }
// Use this for initialization void Start() { //Find the objects containing the game data and the profile information gameData = GameObject.Find("GameData").GetComponent <GameDataScript>(); logInfo = GameObject.Find("ProfileInfo").GetComponent <LogInfo>(); extRes = GameObject.Find("LoadExternalResources").GetComponent <LoadExternalResources>(); quitButton = GameObject.Find("QuitButton").GetComponent <Button>(); //goButton = GameObject.Find("GoButton").GetComponent<Button>(); restartBtn = GameObject.Find("RestartButton").GetComponent <Button>(); // move the loading resources to here to hide loading time // only load if not loaded if (!extRes.IsLoaded()) { resourcesLoaded = false; startTime = Time.realtimeSinceStartup; extRes.LoadMemoryGameResources(); restartBtn.interactable = false; goButton.interactable = false; } else { goButton.interactable = true; restartBtn.interactable = true; } //Quit the application if the player has reached the last level if (gameData.Iteration > gameData.TotalLevel) { QuitApp(); } if (gameData.Iteration == 1) { restartBtn.gameObject.SetActive(false); } else { restartBtn.gameObject.SetActive(true); } //Display the name of the user TextWritten.text = logInfo.PlayerName; #if UNITY_ANDROID && !UNITY_EDITOR //Get Opie to look down at its tummy to observe progress Opie.instance().head().set_eye_type(EyeType.NEUTRAL, Opie.Head.instant_action()); Opie.instance().head().set_linked_pose_and_eye_position(0.5f, 0.0f, Opie.Head.transition_action()); #endif }