//show pannel void ShowScroll() { OpenPondCamera(); gameState = PondGameState.animating; //ShowList(); Tween jump = girl.GetComponent <RectTransform>().DOJumpAnchorPos(new Vector2(136, 0), 50, 1, 0.5f); jump.onComplete = delegate { boy.GetComponent <RectTransform>().DOAnchorPosX(-650, 1f); girl.GetComponent <RectTransform>().DOAnchorPosX(650, 1f); }; jump.SetEase(Ease.Flash); b_pond.transform.GetComponent <Image>().DOFade(0.0f, 1.5f); b_pond.transform.DOScale(new Vector3(2.0f, 2.0f, 1.0f), 1.5f); b_pond.interactable = false; b_start.interactable = false; Tweener moveBanner = banner.rectTransform.DOAnchorPosY(900, 1.5f); Tweener moveButton = b_start.transform.GetComponent <RectTransform>().DOAnchorPosY(-600f, 1.5f); wave1.rectTransform.DOAnchorPosY(-200, 1.5f); wave2.rectTransform.DOAnchorPosY(-200, 1.5f); moveButton.onComplete = delegate { scroll.DOAnchorPosY(0, 1f); b_back.gameObject.GetComponent <RectTransform>().DOAnchorPosY(0, 1f).onComplete = delegate { b_back.interactable = true; gameState = PondGameState.pannel; }; }; }
private void Awake() { //PlayerPrefs.SetInt("FishCount", 0); //PlayerPrefs.SetFloat("Farthest", 100f); gameState = PondGameState.title; curPage = 0; defaultFishID = 0; detailWidth = detailButtons[0].GetComponent <RectTransform>().rect.width; listHeight = listButtons[0].GetComponent <RectTransform>().rect.height; }
// hide pannel void HideScroll() { OpenMainCamera(); gameState = PondGameState.animating; b_back.interactable = false; scroll.DOAnchorPosY(-1000f, 1f).onComplete = delegate { wave1.rectTransform.DOAnchorPosY(0, 1.5f); wave2.rectTransform.DOAnchorPosY(0, 1.5f); boy.rectTransform.DOAnchorPosX(-124, 0.5f); girl.rectTransform.DOAnchorPosX(136, 0.5f); Color c = b_pond.transform.GetComponent <Image>().color; b_pond.transform.GetComponent <Image>().color = new Color(c.r, c.g, c.b, 1); b_pond.transform.localScale = Vector3.one; b_pond.gameObject.GetComponent <RectTransform>().anchoredPosition = new Vector2(0, -600); Tweener moveBanner = banner.rectTransform.DOAnchorPosY(0, 1.5f); b_start.transform.GetComponent <RectTransform>().DOAnchorPosY(0, 1.5f); b_pond.transform.GetComponent <RectTransform>().DOAnchorPosY(0, 1.5f).onComplete = delegate { b_pond.interactable = true; b_start.interactable = true; gameState = PondGameState.title; }; }; b_back.gameObject.GetComponent <RectTransform>().DOAnchorPosY(190f, 1f); }