// Use this for initialization void Start() { // Initialize y diff to 0 yDiff = 0; thetaDiff = 0; method = 0; //Search method is using Application.DataPath numImages = 0; maxImages = 32; // Get the base prefab gameobject from the resources folder imgFrameObject = Resources.Load <GameObject>("Prefabs/ImageSpriteTemplate"); imgLoader = FindObjectOfType <FileLoader>(); guiscpt = FindObjectOfType <GUIscripts>(); // Check if we have a folderHolder. If yes, use the file information that it provides // to load images GameObject folderHolder; if ((folderHolder = GameObject.Find("folderHolder")) != null) { FolderSelectionManager fm = folderHolder.GetComponent <FolderSelectionManager>(); fileInfos = fm.selectedFiles; fm.farewell(); } else { // Otherwise use the imageloader script to get files fileInfos = imgLoader.getDirInfo(method, "ImageFolder"); // Get the image directory info, using method } placeImageFrames(); //StartCoroutine(imgLoader.LoadImgWeb("http://roesh.000webhostapp.com/Default/1.jpg",this)); }
// Use this for initialization void Start() { ic = FindObjectOfType <inputControls>(); guiScpt = FindObjectOfType <GUIscripts>(); method = 0; //Search method is using Application.DataPath #if UNITY_ANDROID || UNITY_IOS || UNITY_WP8 || UNITY_IPHONE method = 1; #endif numScores = 0; currentScore = 0; maxScores = 10; boomBox = GameObject.Find("BoomBox"); audioSource = FindObjectOfType <AudioSource>(); // Get the Audio source object from the scene scoreLoader = FindObjectOfType <FileLoader>(); // Find an imageloader script string cPath; // If the user specified a custom folder path for the images, check to see if there are music files there if ((cPath = FindObjectOfType <pathBasedLoader>().path) != null) { fileInfos = scoreLoader.getDirInfo(method, "MusicFolder", cPath); createScoreObjects(); } // If there were no valid music files in the custom path, or if a custom path was not specified if (musicObjects.Count == 0) { fileInfos = scoreLoader.getDirInfo(method, "MusicFolder"); // Get the music directory info, using method } createScoreObjects(); // Image manager now loads music as well }
// Use this for initialization void Start() { // Initialize y base, y diff and thetaDiff to 0 yBase = 0; yDiff = 0; thetaDiff = 0; numRowsPopulated = 0; method = 0; // Default Search method is using Application.DataPath #if UNITY_ANDROID || UNITY_IOS || UNITY_WP8 || UNITY_IPHONE method = 1; // Search method is using Application.persistentDataPath if on mobile #endif numImages = 0; maxImages = 32; // Default display type is cylinder. This is overridden by the default in FolderSelectionManager loadType = 1; // 0 - Spiral, 1 - cylinder // Get the base prefab gameobject from the resources folder imgFrameObject = Resources.Load <GameObject>("Prefabs/ImageSpriteTemplate"); arenaUnitObject = Resources.Load <GameObject>("Prefabs/BaseArenaUnit"); imgLoader = FindObjectOfType <FileLoader>(); guiscpt = FindObjectOfType <GUIscripts>(); ic = FindObjectOfType <inputControls>(); cControls = FindObjectOfType <CameraControls>(); // Check if we have a folderHolder. If yes, use the file information that it provides // to load images GameObject folderHolder; if ((folderHolder = GameObject.Find("folderHolder")) != null) { FolderSelectionManager fm = folderHolder.GetComponent <FolderSelectionManager>(); fileInfos = fm.selectedFiles; loadType = fm.loadType; unleashed = fm.isUnleashed; fm.farewell(); } else { // Otherwise use the imageloader script to get files fileInfos = imgLoader.getDirInfo(method, "ImageFolder"); // Get the image directory info, using method } // Initial code calls placeImageFrames and cControls adjustement in sequence /*placeImageFrames(); * cControls.adjustOsc(8, numRowsPopulated);*/ // New code calls the same functions, along with calls to other scripts to initiate them once done, in a coroutine StartCoroutine(imagePlacementRoutine()); }
// Use this for initialization void Start() { guiScpts = FindObjectOfType <GUIscripts>(); carouselKinematics = FindObjectOfType <CarouselKinematics>(); camControls = FindObjectOfType <CameraControls>(); }