Play() публичный Метод

Activate the tweeners.
public Play ( bool forward ) : void
forward bool
Результат void
Пример #1
0
    public void OnButtonAltar_Click()
    {
        if (GameManager.tutorial.step < TutorialManager.TutorialStep.Finished)
        {
            uiTutorial.arrowHero.SetActive(false);
            if (GameManager.tutorial.step < TutorialManager.TutorialStep.BuyHero_Exit)
            {
                return;
            }

            if (GameManager.tutorial.step >= TutorialManager.TutorialStep.Control_NPCFinshed && GameManager.tutorial.step < TutorialManager.TutorialStep.Equip_Begin)
            {
                return;
            }
        }

        HideAllSubButton();

        UIPlayTween tween = uiTutorial.btnAltar.GetComponent <UIPlayTween>();

        tween.tweenTarget = uiTutorial.btnAltar_Hero.gameObject;
        tween.Play(true);
        tween.tweenTarget = uiTutorial.btnAltar_UpLevel.gameObject;
        tween.Play(true);
        tween.tweenTarget = uiTutorial.btnAltar_UpStar.gameObject;
        tween.Play(true);
        tween.tweenTarget = uiTutorial.btnInfoAltar.gameObject;
        tween.Play(true);
    }
    void GroupOneTweenPos()//로테이션 다음에 가운데로 움직임
    {
        PlayTween.tweenGroup = 1;
        PlayTween.Play(true);

        EventDelegate.Set(PlayTween.onFinished, GroupTwoTweenPos);
    }
Пример #3
0
 protected override void OnFreshView()
 {
     if (Data == null)
     {
         return;
     }
     else if (Data is MatchItemData)
     {
         _curData = Data as MatchItemData;
         if (TweenPlay)
         {
             if (_tweenState)
             {
                 if (_curData.NeedCloseWhenLoad)
                 {
                     _tweenState = false;
                     TweenPlay.Play(_tweenState);
                 }
                 else
                 {
                     _curData.NeedCloseWhenLoad = true;
                 }
             }
         }
         ShowMainUi();
     }
     else if (Data is Dictionary <string, object> )
     {
         ShowDetailInfo();
     }
 }
Пример #4
0
    void ShowNextStep()
    {
//      tweenPlayer.resetOnPlay = true;
//      tweenPlayer.tweenGroup = 1;
//      tweenPlayer.Play (false);
        NGUITools.SetActive(m_NextStepObj, true);
//         for (int i = 0; i < m_RoleBgObj.Length; i++)
//         {
//             m_RoleBgObj[i].GetComponent<UITexture>().alpha = 0;
//         }


        SetBGDepth(m_CurRoleIndex);

        UIPlayTween curTweenPlay = m_RoleBgObj [m_CurRoleIndex].GetComponent <UIPlayTween> ();

        curTweenPlay.tweenGroup  = 3;
        curTweenPlay.resetOnPlay = true;
        curTweenPlay.Play(true);

        m_ZhiYeMgr.resetOnPlay = true;
        m_ZhiYeMgr.Play(true);

        //NGUITools.SetActive(m_RoleBgObj[m_CurRoleIndex], true);
        m_ChangePersonObj.BeginChangePlayer(firstBlurredTrans, m_RoleItemObj[m_CurRoleIndex].transform);
        IsClickSelectRole = false;
        AdaptBg();
    }
Пример #5
0
    void onSelectOneRoleItem(int index)
    {
        if (index == 2)//弓箭手
        {
            GUIData.AddNotifyData("#{10012}");
            return;
        }
        if (IsClickSelectRole == true)
        {
            return;
        }
        IsClickSelectRole = true;
        NGUITools.SetActive(bgButton1Obj, false);
        NGUITools.SetActive(bgButton2Obj, true);

        tweenPlayer.tweenGroup = 1;
        tweenPlayer.Play(true);

        //Debug.Log("curselectinde " + index);

//        NGUITools.SetActive(m_FirstStepObj, false);
        m_CurRoleIndex = index;
        SetRoleProfessional(m_CurRoleIndex);
        FreshNewName();
        Invoke("ShowNextStep", 0.7f);
    }
Пример #6
0
 // Update is called once per frame
 void Update()
 {
     if (bInit == true && bDelayedShow == true)
     {
         bDelayedShow = false;
         m_TWShow.Play(true);             //播放一个窗口的效果
     }
 }
 public void EnterSideShips()
 {
     UpdateBanners();
     GetComponent <UIWidget>().alpha = 1f;
     setPosition(toScreenIn: true);
     PlayTween.resetOnPlay = true;
     PlayTween.Play(forward: true);
 }
        private IEnumerator Start()
        {
            yield return(new WaitForEndOfFrame());

            swipeEvent.enabled  = false;
            cancelTouch.enabled = false;
            PlayTween.Play(forward: false);
            Menus.SetActive(false);
        }
Пример #9
0
    public void TweenerGroupIn()
    {
        TweenerGroup.playDirection = AnimationOrTween.Direction.Forward;

        UITweener[] tws = TweenerGroup.GetComponentsInChildren <UITweener> ();
        foreach (UITweener each in tws)
        {
            each.delay = 0.4f;
        }
        TweenerGroup.Play(true);
    }
Пример #10
0
 /** 公告条目进入动画  */
 public void tweenerArrowGroupIn()
 {
     tweenerArrow.playDirection = AnimationOrTween.Direction.Forward;
     UITweener[] tws = tweenerArrow.GetComponentsInChildren <UITweener> ();
     foreach (UITweener each in tws)
     {
         each.delay = delayTime;
     }
     //第一次进入为3秒停留,之后为0.4f
     delayTime = 0.4f;
     tweenerArrow.Play(true);
 }
Пример #11
0
 private void OnShowMainUI()
 {
     SoundManager.Instance.Play(15);
     mRankLeftTween.to.Set(-Screen.width, 0, 0);
     mRankRightTween.to.Set(Screen.width, 0, 0);
     mRankTween.Play(true);
 }
Пример #12
0
 private void OnRequestRank()
 {
     SoundManager.Instance.Play(15);
     mChalModule.RequestRankList();
     mMainTweenPos.to.Set(-Screen.width * 1.5f, 0, 0);
     mMainTween.Play(true);
 }
Пример #13
0
    public void OnButtonUseItem_Click()
    {
        int amount = 0;

        if (!int.TryParse(lblUseItem_amount.value, out amount))
        {
            return;
        }
        if (amount > userItem.Count)
        {
            MessageBox.ShowDialog(GameManager.localization.GetText("Hero_Inventory_UseItem_Insufficient"), UINoticeManager.NoticeType.Message);
            return;
        }

        GameManager.GameUser.SetItemForRole(userRole, userItem, amount);
        heroManager.OnUseItem(userItem, amount);


        UserItem gameUserIem = GameManager.GameUser.UserItems.FirstOrDefault(p => p.Id == userItem.Id);

        if (gameUserIem != null && userItem != null)
        {
            gameUserIem.Count = userItem.Count;
        }

        if (gameUserIem != null)
        {
            if (gameUserIem.Count <= 0)
            {
                GameManager.GameUser.UserItems.Remove(gameUserIem);
            }
        }
        playTweenClose.Play(true);
    }
Пример #14
0
    /// <summary>
    /// 点击的点是否在道具区域内,如果不再,道具打开了就关闭
    /// </summary>
    /// <param name="screenPos"></param>
    void PointInRectEvent(Vector3 screenPos)
    {
        if (this.gameObject.activeSelf == false)
        {
            return;
        }

        if (m_fixItemCount == m_allItemCount)
        {
            return;
        }

        Vector3 worldPos = UICamera.currentCamera.ScreenToWorldPoint(screenPos);                       //屏幕坐标到世界坐标
        Vector3 point    = m_widget_shortcutRect.transform.worldToLocalMatrix.MultiplyPoint(worldPos); //transform的相对坐标
        Bounds  bound    = m_widget_shortcutRect.CalculateBounds();

        if (bound.Contains(point) == false)
        {
            bool show = m_trans_shortcutContent.transform.localPosition.x == 40 + 67 * (3 - m_movableItemCount);
            if (show)
            {
                Vector3 setPos = new Vector3(240, m_trans_shortcutContent.transform.localPosition.y, 0);
                TweenPosition.Begin(m_trans_shortcutContent.gameObject, 0.2f, setPos);
                UIPlayTween playTween = m_btn_BtnArrow.GetComponent <UIPlayTween>();
                if (playTween != null)
                {
                    playTween.Play(true);
                }
            }
        }
    }
Пример #15
0
 /// <summary>
 /// Somebody asked me why don't I put these two functions together and give a parameter to control the behaviour.
 /// Well, I think you had better ask NGUI instead.
 /// </summary>
 public void StartMoving()
 {
     isAnimating        = true;
     m_button.isEnabled = false;
     tweenComponent.Play(true);
     Debug.Log("Started! ");
 }
Пример #16
0
    public void Close(bool bForce = false, bool bImmediately = false)     //关闭弹出框
    {
        if (GetCurrentPopup() == null)
        {
            return;
        }
        if (bShow == false)
        {
            return;
        }

        if (bForce == true || GetCurrentPopup().bExternalClose == true)
        {
            if (bImmediately == true)
            {
                PopPopup().SetActive(false);
                if (GetCurrentPopup() == null)
                {
                    gameObject.SetActive(false);
                }
                else
                {
                    Show();
                }
            }
            else
            {
                m_TWHide.Play(true);
            }
        }
    }
Пример #17
0
    public void Show(bool is_new = false, bool bImmediately = false)     //展现弹出框
    {
        InitCurrentPopup(is_new);

        gameObject.SetActive(true);
        m_TWBlock.gameObject.SetActive(true);

        contents.transform.localScale = Vector3.one;
        GetCurrentPopup().SetActive(true);

        if (bInit == true)
        {
            if (bImmediately)
            {
                m_TWImmediately.Play(true);
            }
            else
            {
                m_TWShow.Play(true);
            }
        }
        else
        {
            bDelayedShow = true;
        }
    }
Пример #18
0
    public void OnSelectedRoleForUpgrade(UIHeroSlotChoseForUpgrade uiHeroChose)
    {
        if (_heroSlotForUpgradeChose != null)
        {
            _heroSlotForUpgradeChose.OnDeSelected();
        }
        _heroSlotForUpgradeChose = uiHeroChose;
        _curRoleUpgrade          = _heroSlotForUpgradeChose._userRole;

        if (_curRoleUpgrade.Base.Grade >= maxGrade)
        {
            MessageBox.ShowDialog(GameManager.localization.GetText("ErrorCode_UpStart_MaxGrade"), UINoticeManager.NoticeType.Message);
            statsManager.SetRole(_curRoleUpgrade, _curRoleUpgrade);
            return;
        }

        ShowCurRoleUpgrade();
        GetItemsRequire();

        effectManager.resourceCount = itemsRequire.Count;
        ShowInfo();
        ShowItem();

        arrowSelectHero.SetActive(false);
        arrowButton.SetActive(true);

        tweenHideHero.Play(true);
    }
Пример #19
0
    public override void Update(uint elapsed)
    {
        mTimer += Time.deltaTime;
        switch (mCurStep)
        {
        case UIStep.STEP_ORIGINAL:
        {
            IconTween.resetOnPlay = true;
            mTimer   = 0.0f;
            mCurStep = UIStep.STEP_0;
        }
        break;

        case UIStep.STEP_0:
        {
            IconTween.Play(true);
            mTimer   = 0.0f;
            mCurStep = UIStep.STEP_Stop;
        }
        break;

        case UIStep.STEP_Stop:
        {
        }
        break;
        }
    }
Пример #20
0
    public void OnToogleAuto()
    {
        Controller curController = TouchController.instance.controllerGetSkill;

        if (curController == null)
        {
            uiToggleAuto.value = false;
            return;
        }
        else
        {
            StateManager stateManager = curController.GetComponent <StateManager>();
            stateManager.enabled = uiToggleAuto.value;

            if (uiToggleAuto.value == true)
            {
                if (GameManager.battleType == BattleMode.Challenge || GameManager.battleType == BattleMode.RandomPvP)
                {
                    return;
                }

                UIPlayTween playTween = new UIPlayTween();
                playTween.tweenTarget         = chkAutoSkill.gameObject;
                playTween.playDirection       = AnimationOrTween.Direction.Forward;
                playTween.ifDisabledOnPlay    = AnimationOrTween.EnableCondition.EnableThenPlay;
                playTween.disableWhenFinished = AnimationOrTween.DisableCondition.DoNotDisable;
                playTween.Play(true);
            }
            else
            {
                tweenclose.Play(true);
            }
        }
    }
Пример #21
0
    public void OnClick_System(UI_ChapterUnit cu)
    {
        GameApp.Instance.SoundInstance.PlaySe("button");

        for (int i = 0; i < cu.transform.parent.childCount; i++)
        {
            Transform child = cu.transform.parent.GetChild(i);
            child.GetComponent <UI_ChapterUnit>().Bg.spriteName = "bg_yeqian_2";

            if (child.name != cu.transform.name)
            {
                Transform TweenTrans = child.Find("Tween");
                if (TweenTrans.gameObject.activeSelf)
                {
                    UIPlayTween pt = child.GetComponent <UIPlayTween>();
                    pt.Play(false);

                    for (int j = 0; j < TweenTrans.childCount; j++)
                    {
                        Transform child2 = TweenTrans.GetChild(j);
                        if (child2.name == "Bg")
                        {
                            continue;
                        }
                        child2.GetComponent <UISprite>().spriteName = "fujiaxuanxiang_0";
                    }
                }
            }
        }
        cu.Bg.spriteName = "bg_yeqian_1";

        StartCoroutine("_SwitchSystemCD");

        MyTools.DestroyChildNodes(AlternativeGrid.transform);
    }
Пример #22
0
 //显示
 public void Show(string text, Action confirmCallback = null)
 {
     myGameObject.SetActive(true);
     label.text = text;
     playTween.Play(true);
     this._confirmCallback = confirmCallback;
 }
Пример #23
0
    public void Enable()
    {
        UIPlayTween[] tweens = ContainTweens.GetComponentsInChildren <UIPlayTween> ();

        for (int i = 0; i < tweens.Length; i++)
        {
            tweens [i].Play(true);             // = true;
        }

        //MissionBtn.GetComponentInChildren<MissionScript> ().MissionPause ();

        ObjMan.enableTouch = false;

        playDisable.playDirection = Direction.Forward;
        playDisable.Play(true);

        EngineAnimation.Pause();


        if (level == 10)
        {
            AnswerOptions.playDirection = Direction.Reverse;
            AnswerOptions.Play(true);
        }

        countDown.pauseTime = true;
    }
Пример #24
0
    IEnumerator Close()
    {
        yield return(new WaitForSeconds(delayTime));

        root.duration = speedClose;
        UIPlayTween close = new UIPlayTween();

        close.tweenTarget         = root.gameObject;
        close.playDirection       = AnimationOrTween.Direction.Reverse;
        close.ifDisabledOnPlay    = AnimationOrTween.EnableCondition.EnableThenPlay;
        close.disableWhenFinished = AnimationOrTween.DisableCondition.DisableAfterReverse;
        close.Play(true);

        if (GameManager.tutorial.step == TutorialManager.TutorialStep.Control_NPCFinshed && _waveIndex == 0)
        {
            UIBattleManager.Instance.OnBattleStart();
        }
        else
        {
            GameplayManager.Instance.ResumeGame();

            yield return(new WaitForSeconds(1));

            StartCoroutine(GameplayManager.Instance.CreateMobsNextWave());
        }
    }
Пример #25
0
 // Use this for initialization
 void OnEnable()
 {
     if (bPlayTween)
     {
         bPlayTween = false;
         m_TWTargetItem.Play(true);
     }
 }
Пример #26
0
 public void GameWin()
 {
     textureWidget.alpha = 0;
     // Unable star touch
     SwitchStarsBoxCollider(false);
     // Start scale
     winTween.Play(true);
 }
Пример #27
0
    public void OnButtonArena_Click()
    {
        if (GameManager.tutorial.step < TutorialManager.TutorialStep.Finished)
        {
            return;
        }

        HideAllSubButton();

        UIPlayTween tween = uiTutorial.btnArena.GetComponent <UIPlayTween>();

        tween.tweenTarget = uiTutorial.btnArena_Arena.gameObject;
        tween.Play(true);

        tween.tweenTarget = uiTutorial.btnInfoArena.gameObject;
        tween.Play(true);
    }
Пример #28
0
 public virtual void Play()
 {
     gameObject.SetActive(true);
     if (m_Tween != null)
     {
         m_Tween.Play(true);
     }
 }
Пример #29
0
 private void Hide()
 {
     foreach (GameObject go in uiGroupTween)
     {
         _playTween.tweenTarget = go;
         _playTween.Play(true);
     }
 }
Пример #30
0
 void OnClickSubItem(int index, bool active, bool select)
 {
     if (!active || !select)
     {
         return;
     }
     selectedIndex = index;
     playTween.Play(true);
 }
Пример #31
0
 //显示UI
 public static void Show(UIPlayTween ui)
 {
     ui.playDirection = AnimationOrTween.Direction.Forward;
     ui.Play(true);
 }
Пример #32
0
 //隐藏UI
 public static void Hide(UIPlayTween ui)
 {
     ui.playDirection = AnimationOrTween.Direction.Reverse;
     ui.Play(true);
 }