public Puzzle(START_TYPE type, MainWindow parent) { this.winParent = parent; buildManhattan(); /* * for (int x = 0; x<16; ++x) * { * for (int y = 0; y<16; ++y) * { * print(manhattanDistance[x,y] + " "); * } * print("\r"); * } */ //PUZZLE GENERATION TYPES switch (type) { case START_TYPE.NORMALIZED: startPos(); break; case START_TYPE.RANDOM: randomize(); break; } }
public void GameStart(START_TYPE startType) { StopMainBGM(); ContinueCount = CommonData.GAME_CONTINUE_MAX_COUNT; StartType = startType; ResetGame(); //InGameEffect_Start.SetActive(true); if (startType == START_TYPE.FIRST) { Animator ani = InGameEffect_Start.GetComponent <Animator>(); ani.SetTrigger("Start"); } else { Animator ani = InGameEffect_Start.GetComponent <Animator>(); ani.Rebind(); InGameEffect_Start.SetActive(false); } SkillManager.Instance.UseSkinSlotSkill(); mGameUIPage.RefreshShieldItemUI(); mGameUIPage.RefreshItemSkillUI(); mNoteSystem.GameStart(); mDoorSystem.GameStart(); StartCoroutine(UpdateGamePlay()); }
public static extern IntPtr CreateService(IntPtr SC_HANDLE, string lpSvcName, string lpDisplayName, SERVICE_DESIRED_ACCESS dwDesiredAccess, SERVICE_TYPE dwServiceType, START_TYPE dwStartType, ERROR_CONTROL_TYPE dwErrorControl, string lpPathName, string lpLoadOrderGroup, int lpdwTagId, string lpDependencies, string lpServiceStartName, string lpPassword);
IEnumerator UpdateGamePlay() { while (true) { if (StartType == START_TYPE.FIRST) { yield return(new WaitForSecondsRealtime(3.5f)); StartType = START_TYPE.NONE; } else if (StartType == START_TYPE.RESTART) { InGameEffect_Start.SetActive(true); Animator ani = InGameEffect_Start.GetComponent <Animator>(); ani.SetTrigger("Start"); yield return(new WaitForSecondsRealtime(1.8f)); StartType = START_TYPE.NONE; } if (IsGamePause) { yield return(null); continue; } var time = Time.deltaTime; if (Click) { var door = mDoorSystem.DoorList[(int)ClickLine]; var delete = mNoteSystem.NoteDeleteCheck(door); mPlayerChar.ActionDoorClose(door); SetDoorState(door.NoteLineType, Door.DOOR_STATE.CLOSE, delete); PlayDoorSound(door.NoteLineType); } Click = false; if (SkillManager.Instance.IsSkillEnable(SkillManager.SKILL_TYPE.SPEED_DOWN)) { var skill = SkillManager.Instance.GetGameSkill(SkillManager.SKILL_TYPE.SPEED_DOWN) as GameSkill_SpeedDown; if (skill != null) { mNoteSystem.NoteUpdate(time, skill.ConvertSpeed(time)); } } else { mNoteSystem.NoteUpdate(time, time); } SkillManager.Instance.UpdateSkill(time); mGameUIPage.RefreshItemSkillUI(); mGameUIPage.RefreshCharMsgUI(time); GetUserTouchEvent(); ShowDDong(time); yield return(null); } }