void ChangeStage(STAGE_TYPE type) { //다끄자 for (int i = 0; i < (int)STAGE_TYPE.MAX; ++i) { Scenes[i].SetActive(false); } //열릴때 필요한거 넣기 switch (type) { case STAGE_TYPE.Intro: { labelStart.gameObject.SetActive(false); StopAllCoroutines(); Scenes[(int)STAGE_TYPE.Intro].SetActive(true); break; } case STAGE_TYPE.Main: { //모든 스테이지 정보 초기화 Scenes[(int)STAGE_TYPE.Main].SetActive(true); UITetrisBlockManager.Instance.Init(); UIBackgroundManager.Instance.init(); StartCoroutine(StartGame()); break; } } }
private void LoadAutoCompleteFromResultFile(string fileName, STAGE_TYPE type, AutoCompleteData data) { try { XmlTextReader xtr = new XmlTextReader(fileName); while (xtr.Read()) { if (xtr.NodeType == XmlNodeType.Element) { if (xtr.LocalName.ToLower() == StringUtil.XML.Test) { for (int i = 0; i < xtr.AttributeCount; i++) { xtr.MoveToAttribute(i); if (xtr.Name.ToLower() == StringUtil.XML.Suite) { data.InsertWord(xtr.Value, type, true); } else if (xtr.Name.ToLower() == StringUtil.XML.Name) { data.InsertWord(xtr.Value, type, false); } } } xtr.Read(); } } xtr.Close(); } catch (Exception e) { } }
public void InsertWord(string word, STAGE_TYPE type, bool isSuite) { AutoCompleteNode curNode = null; switch (type) { case STAGE_TYPE.ST_1: curNode = (true == isSuite) ? stage1SuiteNode : stage1TestNode; break; case STAGE_TYPE.ST_2: curNode = (true == isSuite) ? stage2SuiteNode : stage2TestNode; break; case STAGE_TYPE.ST_3: curNode = (true == isSuite) ? stage3SuiteNode : stage3TestNode; break; case STAGE_TYPE.ST_DB: curNode = (true == isSuite) ? DBSuiteNode : DBTestNode; break; default: return; } foreach (char _char in word) { compareKey = _char; AutoCompleteNode existNode = curNode.NodeList.Find(IsEqualKeay); if (null == existNode) { curNode.NodeList.Insert(0, new AutoCompleteNode(_char)); curNode = curNode.NodeList[0]; } else { curNode = existNode; } } curNode.IsWord = true; }
public Duplex() { //TestService(); //Console.WriteLine("Duplex start"); stage = STAGE_TYPE.JOIN; ServiceHostInterface serviceHostInterface = ServiceHostInterface.GetInstance(); serviceHostInterface.SingletonInstance = this; Console.WriteLine("Instacja serwisu jest gotowa."); //callback = OperationContext.Current.GetCallbackChannel<IDuplexCallback>(); }
public void SyncClientsData() { Printer.PrintInfo("Synchronizacja danych"); if (isMatrixReady) { stage = STAGE_TYPE.DATA_SYNC; SyncAllClientsData(); } else { Console.WriteLine("Błąd macierzy"); } }
void CreateStage() { tileSize = prefabs[0].GetComponent <SpriteRenderer>().bounds.size.x; for (int x = 0; x < stageTable.GetLength(0); x++) { for (int y = 0; y < stageTable.GetLength(1); y++) { STAGE_TYPE stageType = stageTable[x, y]; GameObject obj = Instantiate(prefabs[(int)stageType]); obj.transform.position = new Vector2(y, x); } } }
public void GetWordByKeyWord(Queue <string> qWord, string strStage, string label, string keyWord) { STAGE_TYPE nStage = STAGE_TYPE.ST_NONE; if ("stage1" == strStage) { nStage = STAGE_TYPE.ST_1; } else if ("stage2" == strStage) { nStage = STAGE_TYPE.ST_2; } else if ("stage3" == strStage) { nStage = STAGE_TYPE.ST_3; } else if ("db" == strStage) { nStage = STAGE_TYPE.ST_DB; } else if ("all" == strStage) { nStage = STAGE_TYPE.ST_ALL; } else { return; } bool bSuite = false; if ("Test1" == label || "Test2" == label || "Test3" == label || "Test4" == label) { bSuite = false; } else if ("TestSuite1" == label || "TestSuite2" == label || "TestSuite3" == label || "TestSuite4" == label || "DisabledSuite1" == label || "DisabledSuite2" == label || "DisabledSuite3" == label || "DisabledSuite4" == label) { bSuite = true; } else { return; } GetWordByKeyWord(qWord, nStage, bSuite, keyWord); }
public void GetWordByStage(Queue <string> qWord, STAGE_TYPE stage, bool isSuite) { AutoCompleteNode curNode = null; switch (stage) { case STAGE_TYPE.ST_1: curNode = (true == isSuite) ? stage1SuiteNode : stage1TestNode; break; case STAGE_TYPE.ST_2: curNode = (true == isSuite) ? stage2SuiteNode : stage2TestNode; break; case STAGE_TYPE.ST_3: curNode = (true == isSuite) ? stage3SuiteNode : stage3TestNode; break; case STAGE_TYPE.ST_DB: curNode = (true == isSuite) ? DBSuiteNode : DBTestNode; break; default: return; } foreach (AutoCompleteNode childNode in curNode.NodeList) { string word = ""; GetWordByStage(qWord, word, childNode); } }
const int STAGE_Z_LINE = 50; // 2次元配列の X数 // ---------------------------------------------------------------------- // [ ステージデータ呼び出し関数 ] // ---------------------------------------------------------------------- public static int[,] GetSatgeData(STAGE_TYPE stageType) { switch (stageType) { case STAGE_TYPE.STAGE_TYPE_STAGE1: StageData = new int[STAGE_Z_LINE, STAGE_X_LINE] { { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, { 2, 1, 1, 1, 1, 1, 1, 8, 1, 1 }, { 3, 1, 1, 1, 7, 7, 1, 1, 1, 1 }, { 4, 1, 1, 1, 6, 6, 1, 1, 1, 1 }, { 5, 1, 1, 1, 6, 6, 1, 1, 1, 1 }, { 1, 1, 1, 1, 6, 6, 1, 1, 1, 1 }, { 1, 1, 1, 1, 6, 6, 1, 1, 1, 1 }, { 1, 1, 1, 1, 5, 5, 1, 1, 1, 1 }, { 1, 1, 1, 1, 5, 5, 1, 1, 1, 1 }, { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, { 2, 1, 1, 1, 1, 1, 1, 8, 1, 1 }, { 3, 1, 1, 1, 7, 7, 1, 1, 1, 1 }, { 4, 1, 1, 1, 6, 6, 1, 1, 1, 1 }, { 5, 1, 1, 1, 6, 6, 1, 1, 1, 1 }, { 1, 1, 1, 1, 6, 6, 1, 1, 1, 1 }, { 1, 1, 1, 1, 6, 6, 1, 1, 1, 1 }, { 1, 1, 1, 1, 5, 5, 1, 1, 1, 1 }, { 1, 1, 1, 1, 5, 5, 1, 1, 1, 1 }, { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, { 2, 1, 1, 1, 1, 1, 1, 8, 1, 1 }, { 3, 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, 1, 1, 1, 1, 1, 1 }, { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, }; break; } return(StageData); }
private void GetWordByKeyWord(Queue <string> qWord, STAGE_TYPE stage, bool isSuite, string keyWord) { int nIndex = 0; AutoCompleteNode curNode = null; switch (stage) { case STAGE_TYPE.ST_1: { curNode = (true == isSuite) ? stage1SuiteNode : stage1TestNode; foreach (AutoCompleteNode childNode in curNode.NodeList) { GetWordByKeyWord(qWord, keyWord, nIndex, childNode); } } break; case STAGE_TYPE.ST_2: { curNode = (true == isSuite) ? stage2SuiteNode : stage2TestNode; foreach (AutoCompleteNode childNode in curNode.NodeList) { GetWordByKeyWord(qWord, keyWord, nIndex, childNode); } } break; case STAGE_TYPE.ST_3: { curNode = (true == isSuite) ? stage3SuiteNode : stage3TestNode; foreach (AutoCompleteNode childNode in curNode.NodeList) { GetWordByKeyWord(qWord, keyWord, nIndex, childNode); } } break; case STAGE_TYPE.ST_DB: { curNode = (true == isSuite) ? DBSuiteNode : DBTestNode; foreach (AutoCompleteNode childNode in curNode.NodeList) { GetWordByKeyWord(qWord, keyWord, nIndex, childNode); } } break; case STAGE_TYPE.ST_ALL: { curNode = (true == isSuite) ? stage1SuiteNode : stage1TestNode; foreach (AutoCompleteNode childNode in curNode.NodeList) { GetWordByKeyWord(qWord, keyWord, nIndex, childNode); } curNode = (true == isSuite) ? stage2SuiteNode : stage2TestNode; foreach (AutoCompleteNode childNode in curNode.NodeList) { GetWordByKeyWord(qWord, keyWord, nIndex, childNode); } curNode = (true == isSuite) ? stage3SuiteNode : stage3TestNode; foreach (AutoCompleteNode childNode in curNode.NodeList) { GetWordByKeyWord(qWord, keyWord, nIndex, childNode); } curNode = (true == isSuite) ? DBSuiteNode : DBTestNode; foreach (AutoCompleteNode childNode in curNode.NodeList) { GetWordByKeyWord(qWord, keyWord, nIndex, childNode); } } break; default: return; } }
public void OpenForClients() { Printer.PrintInfo("Nowi klienci mogą się teraz dołączyć"); listOfClients.Clear(); stage = STAGE_TYPE.JOIN; }