private IEnumerator MoveCameraDecrease(Vector3 moveTo) { while (prefabUICamera.transform.position.x > moveTo.x) { //HARDCODED player preview camera swipe move speed. prefabUICamera.transform.position -= new Vector3(0.03f, 0, 0); yield return(null); } UpdateSprites(); prefabUICamera.transform.position = moveTo; isCameraMoving = false; gameManagerMaster.CallEnvetUpdateBookSkinsSelected(); yield return(new WaitForEndOfFrame()); }
public void BookSkinClicked() { if (owned) { OwnedUpdate(); } else { if (BookSkinSelect.SelectedBookSkin == (int)Name) { //Ask if want to unlock. if (NewSaveGame.Instance.pages >= UnlockCost) { ConfirmationPanel.GetComponentInChildren <Text>().text = "Spend " + UnlockCost + " pages to unlock " + Name + "?"; ConfirmationPanel.SetActive(true); StartCoroutine(WaitForUnlockConfirm()); } else { InsufficientPagesPanel.GetComponentInChildren <Text>().text = "Insufficient pages to unlock " + Name + ". You need " + UnlockCost + " Pages."; InsufficientPagesPanel.SetActive(true); StartCoroutine(HideInsufficientPagesPanel()); } } else { BookSkinSelect.SelectedBookSkin = (int)Name; gameManagerMaster.CallEnvetUpdateBookSkinsSelected(); UIPrefabs.UpdatePrefabBook(NewSaveGame.Instance.usedPrefab, (int)Name); } } }