Exemplo n.º 1
0
        void Scale(bool scale)
        {
            if (scale)
            {
                inLight.SetActive(true);
                uTweenAlpha tw1 = uTweenAlpha.Begin <uTweenAlpha>(inLight, inDuration);
                tw1.from     = 1f;
                tw1.to       = 0f;
                tw1.duration = inDuration;

                outLight.SetActive(true);
                uTweenAlpha tw2 = uTweenAlpha.Begin <uTweenAlpha>(outLight, outDuration);
                tw2.from     = 1f;
                tw2.to       = 0f;
                tw2.duration = outDuration;
                tw2.delay    = outDelay;

                uTweenScale tw3 = uTweenScale.Begin(outLight, from, to, outDuration, outDelay);
            }
        }
Exemplo n.º 2
0
    public uTweenScale ShowTweenScale(Vector3 from, Vector3 to, float time, EaseType method, UnityAction callback)
    {
        TweenCallback = callback;

        if (tweenTrans)
        {
            tweenTrans.localScale = from;
            uTweenScale tween = uTweenScale.Begin(tweenTrans.gameObject, from, to, time);
            tween.method = method;

            UnityEvent callmethod = new UnityEvent();
            callmethod.AddListener(OpenFinishedTweenDoCallMethod);
            tween.SetOnFinished(callmethod);
            return(tween);
        }
        else
        {
            Debug.Log("not found child name tween transform ");
        }

        return(null);
    }
Exemplo n.º 3
0
    public void ShowTweenScale(UnityAction callback, float delay = 0)
    {
        TweenCallback = callback;

        if (tweenTrans)
        {
            tweenTrans.localScale = Vector3.zero;
            uTweenScale tween = uTweenScale.Begin(tweenTrans.gameObject, Vector3.zero, Vector3.one, _tweenSpeed);
            tween.delay  = delay;
            tween.method = EaseType.easeOutExpo;
            tween.RemoveAllFinished();

            UnityEvent callmethod = new UnityEvent();
            callmethod.AddListener(OpenFinishedTweenDoCallMethod);

            tween.SetOnFinished(callmethod);
        }
        else
        {
            Debug.Log("not found child name tween transform ");
        }
    }
Exemplo n.º 4
0
    // Token: 0x06002254 RID: 8788 RVA: 0x0040643C File Offset: 0x0040463C
    private void LoadByKey(ushort Key)
    {
        this.NowData = this.GM.LoadingTalkTable.GetRecordByKey(Key);
        if (this.NowData.ID != 0)
        {
            if (this.NowType != (eLoadingTalkType)this.NowData.TalkType)
            {
                switch (this.NowType)
                {
                case eLoadingTalkType.Knight3DL:
                    this.BackT.gameObject.SetActive(false);
                    this.ActorT[0].gameObject.SetActive(false);
                    break;

                case eLoadingTalkType.Knight3DR:
                    this.BackT.gameObject.SetActive(false);
                    this.ActorT[1].gameObject.SetActive(false);
                    break;

                case eLoadingTalkType.Knight3Dl2DR:
                    this.BackT.gameObject.SetActive(false);
                    this.ActorT[0].gameObject.SetActive(false);
                    break;

                case eLoadingTalkType.Priest3D:
                    this.BackT.gameObject.SetActive(false);
                    this.ActorT[2].gameObject.SetActive(false);
                    break;

                case eLoadingTalkType.GetKnight:
                case eLoadingTalkType.GetSecond:
                case eLoadingTalkType.GetCrystal:
                    this.GM.CloseLoadingTalk_TBox();
                    break;
                }
                this.NowType = (eLoadingTalkType)this.NowData.TalkType;
                switch (this.NowType)
                {
                case eLoadingTalkType.Knight3DL:
                    this.BackT.gameObject.SetActive(true);
                    this.ActorT[0].gameObject.SetActive(true);
                    break;

                case eLoadingTalkType.Knight3DR:
                    this.BackT.gameObject.SetActive(true);
                    this.ActorT[1].gameObject.SetActive(true);
                    break;

                case eLoadingTalkType.Knight3Dl2DR:
                    this.BackT.gameObject.SetActive(true);
                    this.ActorT[0].gameObject.SetActive(true);
                    break;

                case eLoadingTalkType.Priest3D:
                    this.BackT.gameObject.SetActive(true);
                    this.ActorT[2].gameObject.SetActive(true);
                    break;

                case eLoadingTalkType.GetKnight:
                case eLoadingTalkType.GetSecond:
                case eLoadingTalkType.GetCrystal:
                    this.GM.OpenLoadingTalk_TBox((int)((byte)this.NowType - 1), 0);
                    AudioManager.Instance.PlayUISFX(UIKind.DominanceLevelup);
                    break;
                }
            }
            if (this.NowType == eLoadingTalkType.GetKnight || this.NowType == eLoadingTalkType.GetSecond || this.NowType == eLoadingTalkType.GetCrystal)
            {
                this.NowTextRC.gameObject.SetActive(false);
                this.HideQuestBtn();
            }
            else
            {
                this.NowTextRC.gameObject.SetActive(false);
                switch (this.NowData.TalkType)
                {
                case 1:
                case 3:
                case 6:
                    this.NowText   = this.TalkTextL;
                    this.NowTextRC = this.TalkTextLRC;
                    break;

                case 2:
                case 4:
                case 5:
                    this.NowText   = this.TalkTextR;
                    this.NowTextRC = this.TalkTextRRC;
                    break;
                }
                this.NowType = (eLoadingTalkType)this.NowData.TalkType;
                this.NowTextRC.gameObject.SetActive(true);
                if (this.NowData.Kind == 2)
                {
                    AudioManager.Instance.PlayUISFX(UIKind.BuildUp);
                    this.QuestBtn1.SetActive(true);
                    uTweenScale uTweenScale = uTweenScale.Begin(this.QuestBtn1, Vector3.zero, Vector3.one, 1.3f, 0f);
                    if (uTweenScale)
                    {
                        uTweenScale.easeType = EaseType.easeOutBounce;
                    }
                    this.bWaitSelect      = true;
                    this.WaitSelectTime   = 0.8f;
                    this.NowText.text     = this.DM.mStringTable.GetStringByID((uint)this.NowData.StringID);
                    this.SelectText1.text = this.DM.mStringTable.GetStringByID((uint)this.NowData.Select[0].StringID);
                    this.SelectText2.text = this.DM.mStringTable.GetStringByID((uint)this.NowData.Select[1].StringID);
                    switch (this.NowData.TalkType)
                    {
                    case 1:
                        this.NowTextRC.anchoredPosition  = new Vector2(138.5f, 57.5f);
                        this.QuestionRC.anchoredPosition = new Vector2(157.5f, -124.5f);
                        break;

                    case 3:
                    case 6:
                        this.NowTextRC.anchoredPosition  = new Vector2(118.5f, 87.5f);
                        this.QuestionRC.anchoredPosition = new Vector2(137.5f, -94.5f);
                        break;

                    case 4:
                        this.NowTextRC.anchoredPosition  = new Vector2(-116.5f, 87.5f);
                        this.QuestionRC.anchoredPosition = new Vector2(-133.5f, -94.5f);
                        break;
                    }
                }
                else
                {
                    this.HideQuestBtn();
                    this.NowText.text = this.DM.mStringTable.GetStringByID((uint)this.NowData.StringID);
                    switch (this.NowData.TalkType)
                    {
                    case 1:
                        this.NowTextRC.anchoredPosition = new Vector2(143.5f, -19.5f);
                        break;

                    case 2:
                    case 5:
                        this.NowTextRC.anchoredPosition = new Vector2(-69.5f, 184.5f);
                        break;

                    case 3:
                    case 6:
                        this.NowTextRC.anchoredPosition = new Vector2(118.5f, 87.5f);
                        break;

                    case 4:
                        this.NowTextRC.anchoredPosition = new Vector2(-116.5f, 87.5f);
                        break;
                    }
                }
            }
            this.WaitTime = (float)this.NowData.WaitTime;
            if ((int)Key == this.GM.LoadingTalkTable.TableCount)
            {
                this.bCheckWaitTime = false;
            }
            else
            {
                this.bCheckWaitTime = true;
            }
        }
        else
        {
            this.bCheckWaitTime = false;
        }
    }
Exemplo n.º 5
0
 // Token: 0x0600224F RID: 8783 RVA: 0x00405E38 File Offset: 0x00404038
 private void Update()
 {
     if (!this.bLoadAllActor)
     {
         this.SetActor();
     }
     if (this.bCheckWaitTime)
     {
         if (this.bWaitSelect)
         {
             this.WaitSelectTime -= Time.deltaTime;
             if (this.WaitSelectTime <= 0f)
             {
                 this.QuestBtn2.SetActive(true);
                 uTweenScale uTweenScale = uTweenScale.Begin(this.QuestBtn2, Vector3.zero, Vector3.one, 1.3f, 0f);
                 if (uTweenScale)
                 {
                     uTweenScale.easeType = EaseType.easeOutBounce;
                 }
                 AudioManager.Instance.PlayUISFX(UIKind.BuildUp);
                 this.bWaitSelect     = false;
                 this.SelectCountTime = 3.5f;
                 this.bSelectCount    = false;
             }
         }
         else
         {
             if (this.NowData.Kind == 2 && this.SelectCountTime >= 0f)
             {
                 if (this.bSelectCount)
                 {
                     this.SelectCountTime2 -= Time.deltaTime;
                     if (this.SelectCountTime2 <= 0f)
                     {
                         uTweenScale.Begin(this.QuestBtn2, new Vector3(1.1f, 1.1f, 1.1f), Vector3.one, 0.5f, 0f);
                         this.bSelectCount = false;
                         AudioManager.Instance.PlayUISFX(UIKind.HeroLevelup);
                     }
                 }
                 this.SelectCountTime -= Time.deltaTime;
                 if (this.SelectCountTime <= 0f)
                 {
                     this.SelectCountTime  = 3.5f;
                     this.bSelectCount     = true;
                     this.SelectCountTime2 = 0.1f;
                     uTweenScale.Begin(this.QuestBtn1, new Vector3(1.1f, 1.1f, 1.1f), Vector3.one, 0.5f, 0f);
                     AudioManager.Instance.PlayUISFX(UIKind.HeroLevelup);
                 }
             }
             this.WaitTime -= Time.deltaTime;
             if (this.WaitTime <= 0f)
             {
                 if (this.NowData.Kind == 2)
                 {
                     this.NowKey = this.NowData.TimeUpGotoID;
                     AudioManager.Instance.PlayUISFX(UIKind.HeroEnhance);
                 }
                 else
                 {
                     this.NowKey += 1;
                     LoadingTalk recordByKey = this.GM.LoadingTalkTable.GetRecordByKey(this.NowKey);
                     while (recordByKey.ID != 0 && recordByKey.Kind >= 3)
                     {
                         this.NowKey += 1;
                         recordByKey  = this.GM.LoadingTalkTable.GetRecordByKey(this.NowKey);
                     }
                 }
                 this.LoadByKey(this.NowKey);
             }
         }
     }
 }