コード例 #1
0
ファイル: TipCtrl.cs プロジェクト: flyilxm/chessgame
        public void StopBetTip()
        {
            StopBetBg.transform.localPosition = new Vector3(-1450, 27, 0);
            Facade.Instance <MusicManager>().Play("show");

            StopBlackBg.GetComponent <UITexture>().color = new Color(0, 0, 0, 1);

            TweenPosition.Begin(StopBetBg, _gdata.UnitTime * 4, new Vector3(0, 27, 0));

            Facade.Instance <MusicManager>().Play("stop");
            StopBetBg.GetComponent <TweenPosition>().AddOnFinished(() =>
            {
                StopBetBg.GetComponent <TweenPosition>().delay = _gdata.UnitTime * 5;

                TweenPosition.Begin(StopBetBg, _gdata.UnitTime * 4, new Vector3(1450, 27, 0));

                TweenAlpha.Begin(StopBlackBg, _gdata.UnitTime * 2, 0);
                StopBlackBg.GetComponent <TweenAlpha>().delay = _gdata.UnitTime * 3;
                StopBlackBg.GetComponent <TweenAlpha>().AddOnFinished(() =>
                {
                    StopBetBg.GetComponent <TweenPosition>().onFinished.Clear();
                });
            });
        }
コード例 #2
0
ファイル: TipCtrl.cs プロジェクト: flyilxm/chessgame
        public void CompareCardTip()
        {
            CompareCard.SetActive(true);
            TweenPosition.Begin(CompareMan, _gdata.UnitTime * 3, new Vector3(-235, 75, 0));


            TweenPosition.Begin(CompareWoman, _gdata.UnitTime * 3, new Vector3(235, 85, 0));
            CompareWoman.GetComponent <TweenPosition>().onFinished.Clear();

            CompareWoman.GetComponent <TweenPosition>().AddOnFinished(() =>
            {
                CompareMan.GetComponent <TweenPosition>().delay = _gdata.UnitTime * 5;
                TweenPosition.Begin(CompareMan, _gdata.UnitTime * 4, new Vector3(-1000, 75, 0));

                CompareWoman.GetComponent <TweenPosition>().delay = _gdata.UnitTime * 5;
                TweenPosition.Begin(CompareWoman, _gdata.UnitTime * 4, new Vector3(1000, 85, 0));

                CompareWoman.GetComponent <TweenPosition>().AddOnFinished(() =>
                {
                    CompareCard.SetActive(false);
                    StartBetTip();
                });
            });
        }
コード例 #3
0
 /// <summary>
 /// 添加一张牌到牌堆
 /// </summary>
 /// <param name="item"></param>
 /// <param name="downTime"></param>
 public void AddCardToPiles(MahjongItem item, float downTime)
 {
     if (item != null)
     {
         _controlItem = item;
         if (_direct)
         {
             GameTools.AddChild(Layout.transform, _controlItem.transform, OutCardScaleX, OutCardScaleY, false, false);
             OnMoveDownFinished();
         }
         else
         {
             Vector3 nextPos = GetNextCardPosition();
             GameTools.AddChild(Layout.transform, _controlItem.transform, OutCardScaleX, OutCardScaleY, false, false);
             _downPos = TweenPosition.Begin(_controlItem.gameObject, downTime, nextPos);
             TweenScale.Begin(item.gameObject, downTime, new Vector3(ItemScaleX, ItemScaleY));
             Invoke("OnMoveDownFinished", downTime);
         }
     }
     else
     {
         Debug.LogError("打出的那张牌竟然空了,额........................");
     }
 }
コード例 #4
0
ファイル: FireActionCmd.cs プロジェクト: 741645596/batgame
    /// <summary>
    /// 撞击 左右 船板 掉落
    /// </summary>
    /// <param name="fallTime"></param>
    /// <param name="isLeft">是否是左侧甲板</param>
    public void HitFall(float fallTime, bool isLeft, Vector3 droppos)
    {
        Transform t = m_Skin.tRoot;

        t.position += droppos;
        Vector3 pos = t.localPosition;

        pos.y += -10;
        if (isLeft)
        {
            pos.x -= 5;
            t.Rotate(0, 0, -90);
        }
        else
        {
            pos.x += 8;
            t.Rotate(0, 0, 90);
        }
        TweenPosition tp = TweenPosition.Begin(t.gameObject, fallTime, pos, false);

        tp.AddOnFinished(FallEnd);
        t.localRotation = new Quaternion(0, 0, 0, 1);
        SoundPlay.Play("drop_sea", false, false);
    }
コード例 #5
0
        //开始时接牌
        public void GetCardsOnStart(JlGameCardItem jlGameCard, bool isSelf, int cardNum)
        {
            CardItemList.Add(jlGameCard);
            jlGameCard.SetCardDepth(StartCardIndex + 3);
            jlGameCard.transform.SetParent(CardsArea);
            Vector3 posTemp = CardsArea.localPosition;
            Vector3 scaleTemp;

            if (isSelf)
            {
                jlGameCard.MyCardFlag = true;
                scaleTemp             = Vector3.one;
                posTemp = new Vector3(StartCardIndex * 80f, 0, posTemp.z);
                StartCardIndex++;
            }
            else
            {
                scaleTemp = Vector3.one * 0.35f;
                posTemp   = new Vector3(0, StartCardIndex * 2.16f, posTemp.z);
                StartCardIndex++;
            }
            TweenPosition.Begin(jlGameCard.gameObject, 0.4f, posTemp);
            TweenScale.Begin(jlGameCard.gameObject, 0.4f, scaleTemp);
        }
コード例 #6
0
        private IEnumerator Peck()
        {
            CurrentState = FishrodStates.Peck;
            var bobber = _gameManager.Player.FishrodBobber;

            _pecked = true;
            TweenPosition.Begin(bobber.gameObject, 0.2f, new Vector3(bobber.localPosition.x, bobber.localPosition.y - 0.5f, bobber.localPosition.z));
            yield return(new WaitForSeconds(0.3f));

            _pecked = false;
            TweenPosition.Begin(bobber.gameObject, 0.2f, new Vector3(bobber.localPosition.x, bobber.localPosition.y + 0.5f, bobber.localPosition.z));
            yield return(new WaitForSeconds(UnityEngine.Random.Range(0.8f, 2f)));

            _pecked = true;
            TweenPosition.Begin(bobber.gameObject, 0.2f, new Vector3(bobber.localPosition.x, bobber.localPosition.y - 0.6f, bobber.localPosition.z));
            yield return(new WaitForSeconds(0.5f));

            _pecked = false;
            TweenPosition.Begin(bobber.gameObject, 0.2f, new Vector3(bobber.localPosition.x, bobber.localPosition.y + 0.6f, bobber.localPosition.z));
            yield return(new WaitForSeconds(UnityEngine.Random.Range(0.6f, 1.2f)));

            _pecked = true;
            TweenPosition.Begin(bobber.gameObject, 0.1f, new Vector3(bobber.localPosition.x, bobber.localPosition.y - 0.7f, bobber.localPosition.z));
            yield return(new WaitForSeconds(0.8f));

            _pecked = false;
            TweenPosition.Begin(bobber.gameObject, 0.2f, new Vector3(bobber.localPosition.x, bobber.localPosition.y + 0.7f, bobber.localPosition.z));
            yield return(new WaitForSeconds(0.2f));

            _pecked = false;
            if (CurrentState == FishrodStates.Peck)
            {
                CurrentState = FishrodStates.Process;
            }
            yield break;
        }
コード例 #7
0
ファイル: BetCtrl.cs プロジェクト: narakai/chessgame
        /// <summary>
        ///
        /// </summary>
        /// <param name="p"></param>
        /// <param name="localPos"></param>
        /// <param name="gold"></param>
        /// <param name="isBanker"></param>
        /// <param name="needAnimo"></param>
        public virtual void InstantiateChip(int p, Vector3 localPos, int gold, int bgId, bool isBanker = false, bool needAnimo = true)
        {
            if (bgId < 0)
            {
                return;
            }

            UIWidget widget = ChipCfg.DeskAreas[p];
            var      chip   = GetOneChip(p, isBanker);
            var      chipTs = chip.transform;

            chipTs.parent        = ChipArea;
            chipTs.localPosition = localPos;
            chipTs.localScale    = Vector3.one;
            Chipdepth           += 2;
            var data = new ChipData
            {
                Value = gold,
                //BgId = App.GetGameData<MdxGameData>().GetChipIndex(gold),
                BgId  = bgId,
                Depth = Chipdepth
            };

            chip.UpdateView(data);
            chip.gameObject.SetActive(true);
            var pos = GetClipPos(widget);

            float delayTime = needAnimo ? 0.3f : 0f;

            TweenPosition.Begin(chip.gameObject, delayTime, pos);
            var ts = chip.GetComponent <TweenScale>();

            ts.delay      = delayTime;
            ts.onFinished = null;// new List<EventDelegate>();
            TweenScale.Begin(chip.gameObject, delayTime, Vector3.one * .8f);
        }
コード例 #8
0
ファイル: Enemy.cs プロジェクト: zzxy0909/shooting1
    void Shot_Melee()
    {
        if (_AniController == null)
        {
            return;
        }

        _AniController.PlayAttackSlash1(fireRate);

        StartCoroutine(DelayAction(_AniController._SlashDelay, () =>
        {
            GameObject obj       = (GameObject)Instantiate(shot_melee, shotSpawn.position, shotSpawn.rotation);
            obj.transform.parent = shotSpawn;

            SetDamageTrigger(obj);
            GetComponent <AudioSource>().Play();

            if (_isDash)
            {
                Vector3 pos = transform.position + new Vector3(_DashValue, 0f, 0f);
                TweenPosition.Begin(this.gameObject, 0.5f, pos).method = UITweener.Method.EaseInOut;
            }
        }));
    }
コード例 #9
0
    /// <summary>
    /// Visibly highlight the specified transform by moving the highlight sprite to be over it.
    /// </summary>

    protected virtual void Highlight(UILabel lbl, bool instant)
    {
        if (mHighlight != null)
        {
            mHighlightedLabel = lbl;

            Vector3 pos = GetHighlightPosition();

            if (!instant && isAnimated)
            {
                TweenPosition.Begin(mHighlight.gameObject, 0.1f, pos).method = UITweener.Method.EaseOut;

                if (!mTweening)
                {
                    mTweening = true;
                    StartCoroutine("UpdateTweenPosition");
                }
            }
            else
            {
                mHighlight.cachedTransform.localPosition = pos;
            }
        }
    }
コード例 #10
0
ファイル: UIServerSelect.cs プロジェクト: Klanly/UnityClient
 void OnEnable()
 {
     try
     {
         TweenOffset = Screen.height;
         if (uiRoot == null)
         {
             uiRoot = NGUITools.FindInParents <UIRoot>(gameObject);
         }
         if (uiRoot != null)
         {
             if (Screen.height > uiRoot.maximumHeight)
             {
                 TweenOffset = uiRoot.maximumHeight;
             }
             if (Screen.height < uiRoot.minimumHeight)
             {
                 TweenOffset = uiRoot.minimumHeight;
             }
         }
         if (goTweenContainer != null)
         {
             TweenPosition tweenPos = TweenPosition.Begin(goTweenContainer, DurationForDown, new UnityEngine.Vector3(0, TweenOffset / 2, 0f));
             if (tweenPos != null)
             {
                 //tweenPos.style = UITweener.Style.Loop;
                 tweenPos.animationCurve = CurveForDown;
                 tweenPos.from           = new UnityEngine.Vector3(0, TweenOffset * 1.5f, 0);
             }
         }
     }
     catch (System.Exception ex)
     {
         ArkCrossEngine.LogicSystem.LogErrorFromGfx("[Error]:Exception:{0}\n{1}", ex.Message, ex.StackTrace);
     }
 }
コード例 #11
0
        public override void EnterTask()
        {
            switch (flashTask.Type)
            {
            case FlashType.FlashAlpha:
                TweenAlpha.Begin(objFlash.gameObject, 0f, Convert.ToInt32(flashTask.StartEffect));
                tween = TweenAlpha.Begin(objFlash, flashTask.During, Convert.ToInt32(flashTask.TargetEffect));
                break;

            case FlashType.FlashMove:
                tween = TweenPosition.Begin(objFlash, flashTask.During, GameMethod.ResolveToVector3(flashTask.TargetEffect, ';'));
                break;

            case FlashType.FlashScale:
                tween = TweenScale.Begin(objFlash, flashTask.During, GameMethod.ResolveToVector3(flashTask.TargetEffect, ';'));
                break;
            }
            tween.method = flashTask.EffectType;
            tween.style  = flashTask.Style;
            if (tween.style == UITweener.Style.Once)
            {
                EventDelegate.Add(tween.onFinished, FlashEnd, true);
            }
        }
コード例 #12
0
 public void SetVerticalPosition(Single p_yPos)
 {
     TweenPosition.Begin(m_entryHook.gameObject, m_scrollDuration, new Vector3(0f, p_yPos, 0f));
 }
コード例 #13
0
 public void tweenClose()
 {
     TweenAlpha.Begin(gameObject, animTime, 0);
     TweenPosition.Begin(gameObject, animTime, HidePos);
     StartCoroutine(ShowIconLightFlash(false));
 }
コード例 #14
0
 void Start()
 {
     TweenPosition.Begin(gameObject, duration, moveTo);
 }
コード例 #15
0
 IEnumerator TweenObject(GameObject thisObject)
 {
     TweenScale.Begin(thisObject, 0.5f, Vector3.one);
     TweenPosition.Begin(thisObject, 0.5f, Vector3.zero);
     yield break;
 }
コード例 #16
0
 void OnClick()
 {
     TweenPosition.Begin(privacyPolicyPanel, 0.2f, privacyPolicyStartPosition);
     TweenPosition.Begin(main_buttons, 0.2f, new Vector3(-500, 0, 0));
     TweenPosition.Begin(level_menu_buttons, 0.2f, new Vector3(-0, 0, 0));
 }
コード例 #17
0
 void ShowEff()
 {
     TweenPosition.Begin(RankAndHonourToShowEff, 0.1666f, new Vector3(0, 336, 0), new Vector3(0, 280, 0), null);
     TweenPosition.Begin(RankAndSkillBtnToShowEff, 0.1666f, new Vector3(0, -336, 0), new Vector3(0, -280, 0), null);
 }
コード例 #18
0
 void  MainBtnOpenEventHandle(object obj)
 {
     TweenPosition.Begin(gameObject, 0.16f, transform.localPosition, HidePos, null);
     TweenAlpha.Begin(gameObject, 0.16f, 0);
     m_isEnable = false;
 }
コード例 #19
0
 public void MoveToPosition(Vector3 movePosition)
 {
     transform.localPosition = new Vector3(transform.localPosition.x, transform.localPosition.y, movePosition.z);
     TweenPosition.Begin(gameObject, 0.25f, movePosition);
 }
コード例 #20
0
 public void FallAnimation(Vector3 position)
 {
     TweenPosition.Begin(gameObject, transform.localPosition, position, .5f, EaseType.EaseInQuad);
 }
コード例 #21
0
 public void MoveToAnimation(Vector3 position)
 {
     TweenPosition.Begin(gameObject, transform.localPosition, position, .2f, EaseType.EaseInOutQuad);
 }
コード例 #22
0
    public void itemReleased()
    {
        Invoke("decreaseDepth", 0.3f);

        if (obj.transform.localPosition.y > -125f && obj.transform.localPosition.y < 190f)
        {
            if (GameData.Instance.currentLevel == 1)
            {
                if (obj.transform.localPosition.x <= -140f)
                {
                    positionReleased = "Position1";
                    iDestination     = 0;
                }
                else if (obj.transform.localPosition.x > -140f && obj.transform.localPosition.x <= 150f)
                {
                    positionReleased = "Position2";
                    iDestination     = 1;
                }
                else if (obj.transform.localPosition.x > 150f)
                {
                    positionReleased = "Position3";
                    iDestination     = 2;
                }
            }
            else
            {
                if (obj.transform.localPosition.x <= -241f)
                {
                    positionReleased = "Position1";
                    iDestination     = 0;
                }
                else if (obj.transform.localPosition.x > -241f && obj.transform.localPosition.x <= -8.1f)
                {
                    positionReleased = "Position2";
                    iDestination     = 1;
                }
                else if (obj.transform.localPosition.x > -8.1f && obj.transform.localPosition.x <= 227f)
                {
                    positionReleased = "Position3";
                    iDestination     = 2;
                }
                else if (obj.transform.localPosition.x > 227f)
                {
                    positionReleased = "Position4";
                    iDestination     = 3;
                }
            }

            Debug.Log("Position Clicked : " + positionClicked + " , " + "Game object : " + gameObject.name);
            if (positionClicked == positionReleased)
            {
                TweenPosition.Begin(gameObject, 0.3f, GameObject.Find(positionClicked).transform.localPosition);
            }
            else
            {
                if (gameObject.name[5] == positionReleased[8])
                {                //good move
                    Debug.Log("Good Move");
                }
                else
                {
                    Debug.Log("Bad Move");
                }

                levelController.AddMove();

                levelController.sceneItemMovement(iSource, iDestination, positionReleased, positionClicked);
            }
        }
        else
        {
            TweenPosition.Begin(this.gameObject, 0.3f, GameObject.Find(positionClicked).transform.localPosition);
        }
    }
コード例 #23
0
 void Update()
 {
     if (setp == nextSetp)
     {
         return;
     }
     //评级
     if (setp == 0)
     {
         if (isUpdateRecord)
         {
             ratingContent.SetActive(true);
             TweenScale ts = TweenScale.Begin(recordIcon.gameObject, 0.15f, Vector3.one);
             ts.method = UITweener.Method.EaseIn;
             ts.from   = new Vector3(5, 5, 1);
             EventDelegate.Add(ts.onFinished, () =>
             {
                 iTween.ShakePosition(recordIcon.gameObject, iTween.Hash("amount", new Vector3(0.03f, 0.03f, 0.03f), "time", 0.4f));
                 iTween.ShakePosition(recordIcon.gameObject, iTween.Hash("amount", new Vector3(0.01f, 0.01f, 0.01f), "time", 0.4f));
                 StartCoroutine(Utils.DelayRun(() =>
                 {
                     NextSetp();
                 }, 0.1f));
             }, true);
         }
         else
         {
             NextSetp();
         }
     }
     else if (setp == 1)
     {
         generalAwardContent.SetActive(true);
         TweenPosition tp = TweenPosition.Begin(generalAwardContent, 0.15f, generalAwardContent.transform.localPosition);
         tp.from = new Vector3(-500, generalAwardContent.transform.localPosition.y, 0);
         EventDelegate.Add(tp.onFinished, () => {
             TweenLabelNumber tln = TweenLabelNumber.Begin(currentNumValue.gameObject, 0.15f, currentPracticePoint);
             EventDelegate.Add(tln.onFinished, () => {
                 GameObject obj              = Create3Dobj("Effect/Other/Flash").obj;
                 obj.transform.parent        = currentNumValue.transform;
                 obj.transform.localScale    = Vector3.one;
                 obj.transform.localPosition = new Vector3(0, 0, -600);
             }, true);
             tln = TweenLabelNumber.Begin(historyNumValue.gameObject, 0.15f, historyPracticeHightPoint);
             EventDelegate.Add(tln.onFinished, () => {
                 GameObject obj              = Create3Dobj("Effect/Other/Flash").obj;
                 obj.transform.parent        = historyNumValue.transform;
                 obj.transform.localScale    = Vector3.one;
                 obj.transform.localPosition = new Vector3(0, 0, -600);
             }, true);
             StartCoroutine(Utils.DelayRun(() => {
                 NextSetp();
             }, 0.15f));
         }, true);
     }
     else if (setp == 2)
     {
         closeButton.SetActive(true);
         MaskWindow.UnlockUI();
     }
     setp++;
 }
コード例 #24
0
    void PlayLeaveAnimation(float time)
    {
        TweenPosition.Begin(gameObject, time, new Vector3(m_beginPosition.x, m_beginPosition.y + 400, m_beginPosition.z));

        //tr.animationCurve = m_AnimationCurve;
    }
コード例 #25
0
 void OnClick()
 {
     TweenPosition.Begin(menuContainer, 1.0f, menuContainer.transform.localPosition + new Vector3(1000, 0, 0));
     TweenPosition.Begin(buttonContainer, 1.0f, buttonContainer.transform.localPosition + new Vector3(1000, 0, 0));
 }
コード例 #26
0
    /// <summary>
    /// 更新血脉节点
    /// </summary>
    public void updateBloodPoint()
    {
        MaskWindow.LockUI();
        for (int i = 0; i < pointContentFather.transform.childCount; i++)
        {
            DestroyImmediate(pointContentFather.transform.GetChild(i).gameObject);
            i--;
        }
        //if (choosedCard.cardBloodLevel == BloodConfigManager.Instance.getTotalItemNum(choosedCard.sid) || choosedCard.getQualityId() == QualityType.MYTH)
        //    return;
        GameObject a;
        float      y            = 0;
        int        currentIndex = 0;

        if (choosedCard.cardBloodLevel == 0)
        {
            currentIndex = 0;
        }
        else
        {
            currentIndex = choosedCard.cardBloodLevel;
        }
        //if (choosedCard.getQualityId() == QualityType.MYTH)
        //    currentIndex = 50;
        for (int k = 0; k < totalMap.Length; k++)
        {
            if (isPressed)
            {
                if (k == currentIndex)
                {
                    y = (k - 1) * 134;
                    break;
                }
            }
            else
            {
                if (k == currentIndex)
                {
                    y = k * 134;
                    break;
                }
            }
        }
        if (choosedCard.cardBloodLevel == totalMap.Length && choosedCard.getQualityId() == QualityType.MYTH)
        {
            if (isPressed)
            {
                y = (totalMap.Length - 2) * 134;
            }
            else
            {
                y = (totalMap.Length - 1) * 134;
            }
        }
        pontFatherContentForEffect.transform.localPosition             = Vector3.zero;
        pontFatherContentForEffect.GetComponent <UIPanel>().clipOffset = new Vector2(0f, 0f);
        int[] colorList = BloodConfigManager.Instance.getBloodItemColor(choosedCard.sid, choosedCard.cardBloodLevel);
        for (int i = 0; i < totalMap.Length; i++)
        {
            a = Instantiate(bloodPointPrefab) as GameObject;
            BloodPointItem bloodItem = a.GetComponent <BloodPointItem>();
            bloodItem.name                    = StringKit.intToFixString(i + 1);
            bloodItem.fatherWindow            = this;
            bloodItem.transform.parent        = pointContentFather.transform;
            bloodItem.transform.localScale    = Vector3.one;
            bloodItem.transform.localPosition = new Vector3((i % 2) * 137, y, 0f);
            BloodItemSample bts           = BloodItemConfigManager.Instance.getBolldItemSampleBySid(totalMap[i]);
            int             color         = colorList[i] - 2;
            int             line          = 0;
            int             currentIndexx = currentIndex;
            if (i != totalMap.Length - 1)
            {
                if (i % 2 == 1)
                {
                    line = 1;
                }
                else
                {
                    line = 2;
                }
            }
            if (i < currentIndexx)
            {
                currentIndexx = 2;
            }
            else if (i == currentIndexx)
            {
                // pointContentFather.transform.localPosition=new Vector3(pointContentFather.transform.localPosition.x,i*134,pointContentFather.transform.localPosition.z);
                currentIndexx = 1;
            }
            else
            {
                currentIndexx = 0;
            }
            int index = BloodConfigManager.Instance.getCurrentBloodLvColor(choosedCard.sid, i)[1];
            bloodItem.init(bts, color, line, currentIndexx, choosedCard, index, pontFatherContentForEffect.transform);
            y -= 134;
        }
        if (isPressed)
        {
            pontFatherContentForEffect.GetComponent <UIPanel>().clipOffset += new Vector2(0f, -134f);
            TweenPosition tp = TweenPosition.Begin(pontFatherContentForEffect, 0.7f, (pontFatherContentForEffect.transform.localPosition + new Vector3(0, 134, 0)));
            tp.from = new Vector3(0, pontFatherContentForEffect.transform.localPosition.y, 0);
            EventDelegate.Add(tp.onFinished, () => {
                MaskWindow.UnlockUI();
            }, true);
        }
    }
コード例 #27
0
 public virtual void TweenClose()
 {
     TweenAlpha.Begin(gameObject, animTime, 0);
     TweenPosition.Begin(gameObject, animTime, ShowPos, ClosePos);
 }
コード例 #28
0
    void Update()
    {
        if (canRefresh == true)
        {
            if (step == nextSetp)
            {
                return;
            }
            if (step == 0)
            {
                background.gameObject.SetActive(true);
                showObjEff.SetActive(true);
                effectCard.init(mainCardOld, this, null);
                Card newCard = StorageManagerment.Instance.getRole(mainCardOld.uid);
                newQuality.spriteName = QualityManagerment.qualityIDToString(quNum) + "Bg";
                ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.CARDIMAGEPATH + newCard.getImageID(), effectCard.icon);

                TweenPosition tp = TweenPosition.Begin(effectCard.gameObject, 0.3f, effectCard.transform.localPosition);
                tp.from = new Vector3(500, effectCard.transform.localPosition.y, 0);
                EventDelegate.Add(tp.onFinished, () => {
                    StartCoroutine(Utils.DelayRun(() => {
                        nextSetp++;
                    }, 0.2f));
                }, true);
            }

            else if (step == 1)
            {
                NGUITools.AddChild(effectCard.gameObject, getEffectByQualiy().gameObject);
                StartCoroutine(Utils.DelayRun(() => {
                    nextSetp++;
                }, 1.5f));
            }

            else if (step == 2)
            {
                getEffectTextByQualiy().gameObject.SetActive(true);
                StartCoroutine(Utils.DelayRun(() => {
                    getEffectTextByQualiy().gameObject.SetActive(false);
                    nextSetp++;
                }, 1.6f));
            }

            else if (step == 3)
            {
                newQuality.alpha = 1;
                TweenScale ts = TweenScale.Begin(newQuality.gameObject, 0.3f, Vector3.one);
                ts.method = UITweener.Method.EaseIn;
                ts.from   = new Vector3(5, 5, 1);

                EventDelegate.Add(ts.onFinished, () => {
                    iTween.ShakePosition(transform.parent.gameObject, iTween.Hash("amount", new Vector3(0.03f, 0.03f, 0.03f), "time", 0.4f));
                    iTween.ShakePosition(transform.parent.gameObject, iTween.Hash("amount", new Vector3(0.01f, 0.01f, 0.01f), "time", 0.4f));
                    StartCoroutine(Utils.DelayRun(() => {
                        nextSetp++;
                    }, 1.8f));
                }, true);
            }

            else if (step == 4)
            {
                showEvoUI();

                TweenScale ts = TweenScale.Begin(showObj, 0.3f, Vector3.one);
                ts.method = UITweener.Method.EaseIn;
                ts.from   = new Vector3(5, 5, 1);

                EventDelegate.Add(ts.onFinished, () => {
                    iTween.ShakePosition(transform.parent.gameObject, iTween.Hash("amount", new Vector3(0.03f, 0.03f, 0.03f), "time", 0.4f));
                    iTween.ShakePosition(transform.parent.gameObject, iTween.Hash("amount", new Vector3(0.01f, 0.01f, 0.01f), "time", 0.4f));
//					string[] strs = SurmountManagerment.Instance.getAddEffectByString(mainCard);
//
//					if(strs == null)
//						return;
//
//					for (int i = 0; i < strs.Length; i++) {
//						UiManager.Instance.createMessageLintWindow(strs[i]);
//					}
                    StartCoroutine(Utils.DelayRun(() => {
                        nextSetp++;
                        initInfo();                        //初始化下一级突破条件以及界面
                        MaskWindow.UnlockUI();
                    }, 0.5f));
                }, true);
            }

            step++;
        }
    }
コード例 #29
0
 public void TweenClose()
 {
     TweenPosition.Begin(leftObj, moveTime, originalLeftPos, originalLeftPos - movePos);
     TweenPosition.Begin(rigthObj, moveTime, originalRightPos, originalRightPos + movePos);
 }
コード例 #30
0
        public static void TweenPositionBegin(GameObject go, float duration, Vector3 v3, UITweener.Style state)
        {
            UITweener uit = TweenPosition.Begin(go, duration, v3);

            uit.style = state;
        }