public static void FindError() { PrepareAllData(); InitAllWordList(); for (int i = 0; i < wordList.Count; i++) { var str = wordList.ElementAt(i).Value.Value[(int)Index.answer]; if (i >= 132 && i <= 826) { continue; } Debug.Log(i); UIStaticManager.TrimDesc(wordList.ElementAt(i).Value.Value[(int)Index.answer], "false"); } }
public void CreateCard() { if (destroyCard) { Destroy(destroyCard); } if (OX_DataLoader.IsIndexOutOfRange()) { Debug.Log("<color=red> DataLoader.cs : CreateCard : index out of range.</color>"); return; } if (bg.GetComponent <BackgroundController>().timeup.gameObject.activeSelf) // 타임 업이 보이면, 더 이상 함수를 진행하지않는다. { return; } if (GameModeManager.IsGameFinished()) // 다 풀었다! 게임 끝! { return; } var s = OX_DataLoader.GetCurrentOXData(); var o = Instantiate(card); { o.transform.position = Vector3.zero; o.transform.localPosition = Vector3.zero; o.transform.SetParent(bg.transform, false); o.transform.Find("Panel").GetComponent <CardFormatter>().SetVocab(s.Key); o.transform.SetAsFirstSibling(); } bg.transform.Find("X").SetSiblingIndex(1); bg.transform.Find("O").SetSiblingIndex(2); GetComponent <CanvasGroup>().DOFade(0f, 0f); if (s.Value.Value[(int)OX_DataLoader.Index.isTrick].Equals("true")) // set trick { string trick = OX_DataLoader.OX_GetTrick(s.Key); var dic = UIStaticManager.TrimDesc(trick, s.Value.Value[(int)OX_DataLoader.Index.isTrick]); o.transform.Find("Panel").GetComponent <CardMove>().isTrickCard = true; o.transform.Find("Panel").GetComponent <CardFormatter>().SetDescList(dic); // set trick desc } else { var dic = UIStaticManager.TrimDesc(s.Value.Value[(int)OX_DataLoader.Index.answer], s.Value.Value[(int)OX_DataLoader.Index.isTrick]); o.transform.Find("Panel").GetComponent <CardMove>().isTrickCard = false; o.transform.Find("Panel").GetComponent <CardFormatter>().SetDescList(dic); } //if (OX_DataLoader.IsBonusTurn()) //{ // o.transform.Find("Panel").transform.Find("Bonus").gameObject.SetActive(true); // o.transform.Find("Panel").GetComponent<CardMove>().isBonusTimeCard = true; //} #if TEST if (o.transform.Find("Panel").transform.Find("Number").gameObject.activeSelf == false) { o.transform.Find("Panel").transform.Find("Number").gameObject.SetActive(true); } o.transform.Find("Panel").transform.Find("Number").GetComponent <Text>().text = OX_DataLoader.GetVocabIndex(s.Key).ToString(); #endif tbar.GetComponent <TimeController>().StartOXTimer(o); if (GameModeManager.IsTurnBaseMode()) { tbar.GetComponent <TimeController>().timeLeft = 0; } destroyCard = o; OX_DataLoader.NextOXCard(); int currentIndex = OX_DataLoader.GetCurrentOXIndex(); GameModeManager.SetGameFinished(currentIndex); }