public void OnClickInfo() { skillOverViewScreen.SetActive(true); TweenController.TweenScaleToLarge(skillOverViewScreen.transform, new Vector3(1, 1, 1), 0.2f); skillSprite.GetComponentInChildren <Image>().sprite = currentSelectedButton.transform.GetChild(2).GetComponentInChildren <Image> ().sprite; switch (currentSelectedButton.name) { case "BicPunch": skillOverViewDesc.GetComponentInChildren <Text> ().text = SkillManager.Instance.skillList[0].skillDescription; skillDamage.GetComponentInChildren <Text> ().text = "9"; skillHeal.GetComponentInChildren <Text> ().text = "0"; skillGp.GetComponentInChildren <Text> ().text = "3"; skillName.GetComponentInChildren <Text> ().text = SkillManager.Instance.skillList[0].skillName.ToString(); break; case "Sunder": skillOverViewDesc.GetComponentInChildren <Text> ().text = SkillManager.Instance.skillList[1].skillDescription; skillDamage.GetComponentInChildren <Text> ().text = "10"; skillHeal.GetComponentInChildren <Text> ().text = "5"; skillGp.GetComponentInChildren <Text> ().text = "9"; skillName.GetComponentInChildren <Text> ().text = SkillManager.Instance.skillList[1].skillName.ToString(); break; case "Rejuvenation": skillOverViewDesc.GetComponentInChildren <Text> ().text = SkillManager.Instance.skillList[2].skillDescription; skillDamage.GetComponentInChildren <Text> ().text = "0"; skillHeal.GetComponentInChildren <Text> ().text = "8"; skillGp.GetComponentInChildren <Text> ().text = "4"; skillName.GetComponentInChildren <Text> ().text = SkillManager.Instance.skillList[2].skillName.ToString(); break; } Destroy(EventSystem.current.currentSelectedGameObject.transform.parent.gameObject); }
public void OnClickSkillItem() { if (previousSelectedButton != null) { Destroy(GameObject.Find("SkillNav")); } currentSelectedButton = EventSystem.current.currentSelectedGameObject; previousSelectedButton = previousSelectedButton == null ? EventSystem.current.currentSelectedGameObject: currentSelectedButton; GameObject answerPrefab = Instantiate(Resources.Load("Prefabs/SkillNav")) as GameObject; answerPrefab.transform.SetParent(EventSystem.current.currentSelectedGameObject.transform, false); TweenController.TweenScaleToSmall(previousSelectedButton.transform, new Vector3(1.0f, 1.0f, 1.0f), 0.5f); TweenController.TweenScaleToLarge(EventSystem.current.currentSelectedGameObject.transform, new Vector3(1.10f, 1.10f, 1.10f), 0.5f); answerPrefab.name = "SkillNav"; answerPrefab.transform.localPosition = new Vector3(53, EventSystem.current.currentSelectedGameObject.transform.localPosition.y, 0); answerPrefab.transform.SetAsFirstSibling(); answerPrefab.transform.GetChild(1).GetComponent <Button> ().onClick.AddListener(() => { OnClickInfo(); }); answerPrefab.transform.GetChild(2).GetComponent <Button> ().onClick.AddListener(() => { OnClickUse(); }); //TweenController.TweenMoveTo (answerPrefab.transform,),0.5f); //_scrollRect.content.GetChild(0).transform.SetAsLastSibling(); }
public void LerpToMatch(Button match) { TweenController.TweenMoveTo(viewGroup.transform, -matchView.transform.localPosition, 0.5f); TweenController.TweenMoveTo(menuIndicator.transform, matchButton.transform.localPosition, 0.3f); colorToDefault(); match.gameObject.GetComponentInChildren <Image> ().color = new Color32(66, 135, 199, 255); TweenController.TweenScaleToLarge(match.transform.GetChild(0).transform, new Vector3(1.3f, 1.3f, 1.3f), 0.2f); }
public void LerpBackToHome(Button home) { TweenController.TweenMoveTo(viewGroup.transform, new Vector2(0, 0), 0.5f); TweenController.TweenMoveTo(menuIndicator.transform, homeButton.transform.localPosition, 0.3f); colorToDefault(); home.gameObject.GetComponentInChildren <Image> ().color = new Color32(66, 135, 199, 255); TweenController.TweenScaleToLarge(home.transform.GetChild(0).transform, new Vector3(1.3f, 1.3f, 1.3f), 0.2f); }
public void ShowGestureButtons(Transform button) { if (!gestureButtonContainer.activeInHierarchy) { gestureButtonContainer.SetActive(true); TweenController.TweenScaleToLarge(gestureButtonContainer.transform, new Vector3(1, 1, 1), 0.4f); button.gameObject.GetComponent <Image> ().sprite = closeImage; } else { // TweenController.TweenScaleToLarge (gestureButtonContainer.transform, new Vector3(1,1,1), 0.2f); button.gameObject.GetComponent <Image> ().sprite = gestureImage; Invoke("ScaleToSmall", 0.05f); } }
public void SelectSkill(int skillNumber) { if (activateAutoSkill) { skillButtonToggleOn [skillNumber - 1] = !skillButtonToggleOn [skillNumber - 1]; ActivateSkillIndicator(skillNumber); } else { if (skillButton [skillNumber - 1].interactable) { TweenController.TweenScaleToLarge(EventSystem.current.currentSelectedGameObject.transform, Vector3.one, 0.3f); SelectSkillReduce(skillNumber); } } }