void Start() { Debug.Log(isFirstTime); Application.runInBackground = true; StartCoroutine(playVideo()); webdata = FindObjectOfType <WebData>(); missionStatus = FindObjectOfType <MissionStatus>(); updateWaktuTest(); }
void Start() { if (isFirstTime) { StartCoroutine(completeTest()); } else { float scaleFactor = 1; if (canvas) { scaleFactor = canvas.scaleFactor; } float pageWidth = (BookPanel.rect.width * scaleFactor - 1) / 2; float pageHeight = BookPanel.rect.height * scaleFactor; Left.gameObject.SetActive(false); Right.gameObject.SetActive(false); UpdateSprites(); Vector3 globalsb = BookPanel.transform.position + new Vector3(0, -pageHeight / 2); sb = transformPoint(globalsb); Vector3 globalebr = BookPanel.transform.position + new Vector3(pageWidth, -pageHeight / 2); ebr = transformPoint(globalebr); Vector3 globalebl = BookPanel.transform.position + new Vector3(-pageWidth, -pageHeight / 2); ebl = transformPoint(globalebl); Vector3 globalst = BookPanel.transform.position + new Vector3(0, pageHeight / 2); st = transformPoint(globalst); radius1 = Vector2.Distance(sb, ebr); float scaledPageWidth = pageWidth / scaleFactor; float scaledPageHeight = pageHeight / scaleFactor; radius2 = Mathf.Sqrt(scaledPageWidth * scaledPageWidth + scaledPageHeight * scaledPageHeight); ClippingPlane.rectTransform.sizeDelta = new Vector2(scaledPageWidth * 2, scaledPageHeight + scaledPageWidth * 2); Shadow.rectTransform.sizeDelta = new Vector2(scaledPageWidth, scaledPageHeight + scaledPageWidth * 0.6f); ShadowLTR.rectTransform.sizeDelta = new Vector2(scaledPageWidth, scaledPageHeight + scaledPageWidth * 0.6f); NextPageClip.rectTransform.sizeDelta = new Vector2(scaledPageWidth, scaledPageHeight + scaledPageWidth * 0.6f); } webdata = FindObjectOfType <WebData>(); missionStatus = FindObjectOfType <MissionStatus>(); updateWaktuTest(); totalpoin = 0; }
void Start() { Debug.Log(isFirstTime); Debug.Log(isStoreData); webdata = FindObjectOfType <WebData>(); missionStatus = FindObjectOfType <MissionStatus>(); if (isFirstTime) { StartCoroutine(completeTest()); } else { StartCoroutine(playInfografis()); updateWaktuTest(); } //"http://heszhost.com/dashboard/infografis/Kemiskinan.jpeg" }