Пример #1
0
 public void OnBeginDrag(PointerEventData eventData)
 {
     if (m_AdjustTween != null)
     {
         m_AdjustTween.Kill();
         m_AdjustTween = null;
     }
 }
        public void OnBeginDrag(PointerEventData eventData)
        {
            if (m_AdjustTween != null)
            {
                m_AdjustTween.Kill();
                m_AdjustTween = null;
            }

            m_BeginPosition = eventData.position;
        }
Пример #3
0
    private void Turn(int stopIndex)
    {
        Debug.LogFormat("Turn({0})", stopIndex);

        const int  rotateNum = 8;
        float      endPos    = 360f * -rotateNum + (360 / 8 * (stopIndex + 1));
        long       win       = winTable[Type - 1, stopIndex];
        GameObject parentObj = transform.parent.gameObject;

        tween.Kill();
        tween = WheelObject.transform.DORotate(new Vector3(0f, 0f, -360f * 8), 7, RotateMode.FastBeyond360);
        tween.ChangeEndValue(new Vector3(0f, 0f, endPos), transform.rotation.eulerAngles.z).OnComplete(() =>
        {
            // show result
            //GameObject objMoney = Instantiate(money_prefab, transform.parent);
            //objMoney.transform.Find("Money_text/8").GetComponent<TextMeshProUGUI>().text = win.ToString("#,#");
            //objMoney.SetActive(true);

            //GameObject objResult;
            //if (Type == 4)
            //{
            //    objResult = Instantiate(result2_prefab, transform.parent);
            //}
            //else
            //{
            //    objResult = Instantiate(result1_prefab, transform.parent);
            //}
            //objResult.SetActive(true);

            Observable.Timer(TimeSpan.FromSeconds(5)).Subscribe(_ =>
            {
                // 동전올라가는 소리 추가
                //Sound.Play("meta_coin_2", false);
                //Profile.instance.UpdateCoinAnimation(win + UserInfoManager.Point.Coin, Profile.AniType.SPREAD, parentObj.transform);


                //Destroy(objMoney);
                //Destroy(objResult);

                //	AniController.Create("meta/Prefab/Coin_Collect", parentObj.transform);

                if (_queueBonusWheel.IsNullOrEmpty())
                {
                    Close();
                }
                else
                {
                    Working = false;
                    SetUp(_queueBonusWheel.Dequeue().ToString());
                }

                //LobbyLogic.DoNextDailyBonus();
            });
        });
    }