void Awake() { LocScr.setLaguage(Application.systemLanguage.ToString()); instance = this; roomIdx = 0; MyConst.init(); }
public static void PopulateQuestion(IQuestionProvider provider) { questionList.Clear(); wrongChoices.Clear(); questionList = provider.GetQuestionList(); wrongChoices = MyConst.GetWrongChoices(); }
void Start() { if (isDebug) { MyConst.Init(); IQuestionProvider provider = new QuestionCSVProvider(); QuestionBuilder.PopulateQuestion(provider); debugUI.SetActive(true); debugUI.transform.position = Vector3.zero; } }
void OnMouseDrag() { vec = roomCamera.instance.cam.ScreenToWorldPoint(Input.mousePosition); vec.z = 0; vec.y += 0.5f; transform.position = vec; if (MyConst.equal(vec, fin, 0.6f)) { gameObject.SetActive(false); RoomUI.instance.b_right.SetActive(true); } }
// Update is called once per frame void Update() { if (Input.GetKeyDown(KeyCode.Escape)) { Application.Quit(); } if (MyConst.minRoud((pl_tr.position.x + 8) / 16f) != roomIdx) { roomIdx = MyConst.minRoud((pl_tr.position.x + 8) / 16f); roomCamera.instance.moveToId(roomIdx, 0); } }
void OnMouseDrag() { if (!can) { return; } Vector3 vec = roomCamera.instance.cam.ScreenToWorldPoint(Input.mousePosition); vec.z = 0; vec.y += 0.5f; transform.position = vec; if (MyConst.equal(vec, fin, 0.6f)) { gameObject.SetActive(false); RoomUI.instance.b_left.SetActive(true); roomScr.instance.didProgress(); } }
void Update() { vec = Input.mousePosition; //vec.y += CS; //CS = Screen.width / 16; /* * if (Input.GetMouseButtonDown(0)) * { * flag = MyConst.equal(leftButton.transform.position, vec, CS); * dx = leftButton.transform.position.x - vec.x; * dy = leftButton.transform.position.y - vec.y; * }*/ if (flag) { vec.y += dy; vec.x += dx; if (MyConst.equal(vec, pos2, CS * 0.7f) && !flag2) { flag2 = true; upButton.SetActive(true); leftButton.SetActive(false); } else { da = (MyConst.dist(pos2, leftButton.transform.position) / allD); da = (da < 0) ? 0 : (da > 1) ? 1: da; da = 1 - da; da *= -90; leftButton.transform.rotation = Quaternion.Euler(new Vector3(0, 0, da)); leftButton.transform.position = vec; } } if (Input.GetMouseButtonUp(0)) { flag = false; } }
void Start() { MyConst.Init(); playerName.text = PlayerPrefs.GetString("PlayerInputName", ""); MyConst.SetPlayerName(playerName.text); }
public void StartButton() { MyConst.SetPlayerName(playerName.text); PlayerPrefs.SetString("PlayerInputName", playerName.text); SystemScreenController.Instance.ShowScreen("ScreenMainMenu"); }
/// Load skill list from parsed CSV public static List <CharacterModel> GetCharacterList() { List <CharacterModel> characterList = MyConst.GetCharacterList(); return(characterList); }
public List <QuestionRowModel> GetQuestionList() { return(MyConst.GetQuestionList()); }