// Start is called before the first frame update void Start() { Debug.Log("PERSISTENT:" + Application.persistentDataPath); if (!isTutorial) { setting.SetActive(false); instruction.SetActive(false); } // myCameraState = CameraState.Subway; myAppState = AppState.Mainpage; CameraMovement = transform.gameObject.GetComponent <CameraMovement>(); InstagramController = GameObject.Find("---InstagramController").GetComponent <InstagramController>(); RatingSys = GameObject.Find("FloatingUI").GetComponent <RatingSystem>(); inventorySlotMgt = GameObject.Find("---InventoryController").GetComponent <InventorySlotMgt>(); FishBossNotification = GameObject.Find("FishBossUI").GetComponent <FishBossNotification>(); BagsController = GameObject.Find("---BagsController").GetComponent <BagsController>(); FishTextManager = GameObject.Find("---FishTextManager").GetComponent <FishTextManager>(); FishBossNotification.HideFish(); fishTalk.SetActive(false); Hide(frontPage); Hide(TakePhoto); Posture.SetActive(false); fishTalkText = fishTalk.gameObject.GetComponentInChildren <TextMeshPro>(); Hide(Inventory); Hide(fishShoutCG); ChapterOneEnd = false; alreadyClothUI = false; }
// Update is called once per frame void Update() { ChapterEndChecker(); if (TouchController.isSwiping == true) { isSwipping = true; } else { isSwipping = false; } if (isSwipping && !machineOpen) { Debug.Log("????"); CancelAllUI(false); } ////print(CameraMovement.CurrentPage); //change camera state to page number if (myCameraState == CameraState.Subway && !isSwipping) { CheckScreenNum(); if (transform.position.x < 5 && transform.position.x > -5 && FishBossNotification.isActive) { FishBossNotification.HideFish(); } else if (transform.position.x > 5 & FishBossNotification.isActive) { //FishBossNotification.ShowFish(); } //Show(subwayBackground); } else if (myCameraState != CameraState.Subway && FishBossNotification.isActive) { FishBossNotification.HideFish(); } //if changing clothes, don't show some UIs if (myCameraState == CameraState.Map || myCameraState == CameraState.App || myCameraState == CameraState.Ad) { if (myCameraState == CameraState.App) { Hide(inventory); //Hide(basicUI); Show(appBackground); } else { Hide(inventory); //Hide(basicUI); Hide(appBackground); } } else if (myCameraState == CameraState.Closet) { Show(inventory); //Hide(basicUI); //Hide(subwayBackground); Hide(appBackground); } else { Hide(inventory); //Show(basicUI); Hide(appBackground); } //如果没到达30fo if (chapterOneFail) { StartCoroutine(ChapterOneFailComic()); PlayerPrefs.SetInt("ongoingChapter", 1); PlayerPrefs.SetInt("skipInstruction", 0); PlayerPrefs.Save(); } }