void Start() { //Find all the necessary the Game Objects logInfo = GameObject.Find("ProfileInfo").GetComponent <LogInfo>(); originalStar = GameObject.Find("Star").GetComponent <Star>(); extRes = GameObject.Find("LoadExternalResources").GetComponent <LoadExternalResources>(); wrps = GameObject.Find("WordRepPlaySound").GetComponent <WordRepPlaySound>(); quitButton = GameObject.Find("QuitButton").GetComponent <Button>(); mainLog = GameObject.Find("MainLogging").GetComponent <MainLogging>(); //Set language name and load resources for it language = logInfo.LanguageName; images = extRes.MemoryImages; sounds = extRes.MemorySounds; words = extRes.MemoryWords; /* * questions = Enumerable.Range(0, images.Length).ToArray(); * Shuffle(questions); */ questions = WordsStats.GetOrderingPerformanceBased(mainLog.GetRepetitionSeenWordsStats(), extRes.MemoryWords, totalLevel); Vector3 startPosStar = originalStar.transform.position; stars = new List <Star>(); for (int i = 0; i < totalLevel; i++) { Star star; if (i == 0) { star = originalStar; } else { star = Instantiate(originalStar) as Star; } float posXstar = ((offsetX + star.GetComponent <BoxCollider2D>().bounds.size.y) * i) + startPosStar.x; star.transform.position = new Vector3(posXstar, startPosStar.y, startPosStar.z); stars.Add(star); } NextQuestion(); }
public void GetNewOrdering() { Ordering = WordsStats.GetOrderingPerformanceBased(mainLog.GetRecallSeenWordsStats(), extRes.MemoryWords, NRows * NCols / 2); }