/// <summary> /// 부모 패널에서 실질적인 선택이 이뤄지면 들어오는 함수 /// </summary> public void OpeningEvent(uint lowDataId, ushort amount) { ActiveCollider(false); CostGroup.SetActive(false); CardOpenEffGo.SetActive(true); TweenRotation rot = GetComponentInParent <TweenRotation>();//시작은 로테이션 rot = TweenRotation.Begin(transform.parent.gameObject, rot.duration, Quaternion.Euler(-rot.from)); rot.onFinished.Clear(); TempCoroutine.instance.FrameDelay(rot.delay + (rot.duration * 0.5f), () => { Img.spriteName = "reward_pendant_back"; ItemSlotObj.SetLowDataItemSlot(lowDataId, amount); RewardGroup.SetActive(true); CostGroup.SetActive(false); }); //EventDelegate.Set(rot.onFinished, delegate () { // ItemSlotObj.SetLowDataItemSlot(lowDataId, amount); // RewardGroup.SetActive(true); // CostGroup.SetActive(false); //}); rot.ResetToBeginning(); rot.Play(true); }
/// <summary> 보상 세팅 </summary> public void SetRewardCard(System.Action <int> _clickCallback, uint lowDataId, uint amount, int arr) { GameObject slot = Instantiate(ItemSlotPrefab) as GameObject; slot.transform.parent = RewardGroup.transform; slot.transform.localPosition = Vector3.zero; slot.transform.localScale = Vector3.one; ItemSlotObj = slot.GetComponent <InvenItemSlotObject>(); CardArray = arr; ClickCallback = _clickCallback; UIEventListener.Get(gameObject).onClick = CardClickEvent; CostGroup.SetActive(false); ActiveCollider(false); PlayTween = GetComponentInParent <UIPlayTween>(); Img.spriteName = "reward_pendant_back"; CardOpenEffGo.SetActive(false); ItemSlotObj.SetLowDataItemSlot(lowDataId, amount); CostLabel.text = string.Format("{0}", _LowDataMgr.instance.GetEtcTableValue <int>(EtcID.PassCard)); }
public void CostShowEvent() { CostGroup.SetActive(true); }