void ChangeCursor() { audio.PlayOneShot(switchSound); cursor = columns[currentColumn][currentRow]; StartCoroutine(ZoomAnimation.Zoom(cursor)); LauncherInterface.selection = cursor.GetComponent <Action>().action; }
IEnumerator Start() { // Recreate the appslist columns.Clear(); columns.Add(new List <GameObject> ()); // Standard Apps foreach (GameObject g in standardApps) { if (columns[columns.Count - 1].Count == 3) { columns.Add(new List <GameObject> ()); } Vector3 appPos = new Vector3((columns.Count - 1) * 17 - 29, -(columns[columns.Count - 1].Count - 1) * 10, 0); obj = null; if (g != developerTile) { obj = (GameObject)Instantiate(g, appPos, Quaternion.identity); } else if (Settings.developer) { obj = (GameObject)Instantiate(g, appPos, Quaternion.identity); } if (obj != null) { columns[columns.Count - 1].Add(obj); } } // Add Stub Apps to list // TODO Real Apps for (int i = 0; i < stubApps; i++) { if (columns[columns.Count - 1].Count == 3) { columns.Add(new List <GameObject> ()); } Vector3 appPos = new Vector3((columns.Count - 1) * 17 - 29, -(columns[columns.Count - 1].Count - 1) * 10, 0); obj = (GameObject)Instantiate(stubApp, appPos, Quaternion.identity); columns[columns.Count - 1].Add(obj); } // Set Cursor Position currentRow = 0; currentColumn = 0; cursor = columns[currentColumn][currentRow]; StartCoroutine(ZoomAnimation.Zoom(cursor)); // Wait For Wallpaper while (Settings.wallpaper == null) { yield return(null); } // Set Wallpaper for (int i = 0; i < columns.Count; i++) { foreach (GameObject g in columns[i]) { g.renderer.material.SetTexture("_Wallpaper", Settings.wallpaper); } } }