// Start is called before the first frame update void Start() { guideMusic = GameObject.Find("GuideMusic").GetComponent <GuideMusicController>(); guideMusic.playGuideMusic(guideMusic.bersiap); character = GetComponent <CharacterController>(); StartCoroutine(TimeRun()); Time.timeScale = 1; PlayerPrefs.DeleteKey("xBahuKanan"); PlayerPrefs.DeleteKey("xBahuKiri"); }
// Start is called before the first frame update void Start() { guideMusic = GameObject.Find("GuideMusic").GetComponent <GuideMusicController>(); quitImg.gameObject.SetActive(false); settImg.gameObject.SetActive(false); PlayerPrefs.DeleteKey("id"); PlayerPrefs.DeleteKey("nama"); PlayerPrefs.DeleteKey("gender"); CreateListPlayer(); CreateLeaderBoardList(); }
void Awake() { if (instance != null && instance != this) { Destroy(this.gameObject); return; } else { instance = this; } DontDestroyOnLoad(this.gameObject); }
// Start is called before the first frame update void Start() { guideMusic = GameObject.Find("GuideMusic").GetComponent <GuideMusicController>(); quesList = new int[banyakSoal]; answerList = new int[banyakSoal]; shapeChoice1List = new int[banyakSoal]; shapeChoice2List = new int[banyakSoal]; quesColor = new int[banyakSoal]; shape1ColorList = new int[banyakSoal]; shape2ColorList = new int[banyakSoal]; // Get Rendered Object Renderer rend = player.GetComponent <Renderer>(); if (PlayerPrefs.GetString("gender") == "L") { playerType1.SetActive(false); } else { playerType2.SetActive(false); } if (PlayerPrefs.GetString("gametype") == "MEDIUM") { for (int i = 0; i < banyakSoal; i++) { int shapeQ = GetShapeNum(); while (quesList.Contains(shapeQ)) { shapeQ = GetShapeNum(); } quesList[i] = shapeQ; int answer = Random.Range(0, 3); answerList[i] = answer; int shape1 = GetShapeNum(); while (shape1 == shapeQ) { shape1 = GetShapeNum(); } shapeChoice1List[i] = shape1; int shape2 = GetShapeNum(); while (shape2 == shapeQ || shape2 == shape1) { shape2 = GetShapeNum(); } shapeChoice2List[i] = shape2; quesColor[i] = 2; shape1ColorList[i] = 2; shape2ColorList[i] = 2; } } else { for (int i = 0; i < banyakSoal; i++) { int shapeQ = GetShapeNum(); int colorQ = GetRandColor(); while (quesList.Contains(shapeQ)) { shapeQ = GetShapeNum(); } quesList[i] = shapeQ; quesColor[i] = colorQ; int answer = Random.Range(0, 3); answerList[i] = answer; int shape1 = GetShapeNum(); int color1 = GetRandColor(); while (shape1 == shapeQ && color1 == colorQ) { shape1 = GetShapeNum(); color1 = GetRandColor(); } shapeChoice1List[i] = shape1; shape1ColorList[i] = color1; int shape2 = GetShapeNum(); int color2 = GetRandColor(); while ((shape2 == shapeQ && color2 == colorQ) || (shape2 == shape1 && color2 == color1)) { shape2 = GetShapeNum(); color2 = GetRandColor(); } shapeChoice2List[i] = shape2; shape2ColorList[i] = color2; } } StartGameDatabase(); }
// Start is called before the first frame update void Start() { guideMusic = GameObject.Find("GuideMusic").GetComponent <GuideMusicController>(); user = GetComponent <CharacterController>(); startTime = Time.time; }
// Start is called before the first frame update void Start() { guideMusic = GameObject.Find("GuideMusic").GetComponent <GuideMusicController>(); }
// Start is called before the first frame update void Start() { guideMusic = GameObject.Find("GuideMusic").GetComponent <GuideMusicController>(); gameObject.SetActive(false); }