示例#1
0
    public void OpenColorPalette()
    {
        ShowTouchToDrawInfo();

        iconPaletteTweenOpen.PlayForward();
        colorPaletteTweenOpen.PlayForward();
        AllColorTweenOff();

        uiState = UIState.ToolPaletteOpen;
    }
 void ActiveChuanChangeTran()
 {
     if (IsActiveChuan)
     {
         return;
     }
     //Debug.Log("ActiveChuanChangeTran***");
     IsActiveChuan = true;
     ChuanUiGX.SetActive(true);
     ChuanTweenTranA.from = TranA;
     ChuanTweenTranA.to   = TranB;
     ChuanTweenTranA.ResetToBeginning();
     ChuanTweenTranA.enabled = true;
     ChuanTweenTranA.PlayForward();
 }
示例#3
0
    public void OpenInfoPalette()
    {
        iconPaletteTweenOpen.PlayForward();
        infoPaletteTweenOpen.PlayForward();

        AllColorTweenOff();

        uiState = UIState.InfoPaletteOpen;
    }
示例#4
0
 public void Go()
 {
     NowP        = NextP;
     Tw.from     = AllT [NowP].Obj.transform;
     Tw.to       = AllT [NextP].Obj.transform;
     Tw.duration = AllT[NowP].duration;
     Tw.ResetToBeginning();
     Tw.PlayForward();
     AllT [NowP].Eve.Invoke();
 }
示例#5
0
    public IEnumerator PageToLeftPageAnimation()
    {
        TweenTransform tween = Background.GetComponent <TweenTransform>();

        tween.to   = FrameWork.FindChild("Frame_Right");
        tween.from = FrameWork.FindChild("Frame_Left");
        tween.ResetToBeginning();
        tween.PlayForward();
        BackButtonTarget.SetActive(true);
        yield return(new WaitForSeconds(tween.duration));

        gameObject.SetActive(false);
    }
示例#6
0
    public void EnterAnimation(EventDelegate.Callback onComplete)
    {
        if (tt == null)
        {
            return;
        }
        tt.PlayForward();
        if (onComplete == null)
        {
            return;
        }

        EventDelegate.Set(tt.onFinished, onComplete);
    }
示例#7
0
    void resetTTNiao()
    {
        MDMoveTween mt = szPaths[mIndex];

        if (mt.from != null)
        {
            ttNiao.from = mt.from;
        }
        ttNiao.to             = mt.to;
        ttNiao.duration       = mt.time;
        ttNiao.animationCurve = mt.animationCurve;
        ttNiao.ResetToBeginning();
        ttNiao.PlayForward();
    }
示例#8
0
    private void pobeda()
    {
        reci.Clear();
        int            j            = 1;
        GameObject     slovo_prefab = GameObject.FindGameObjectWithTag("slovoPrefab");
        TweenTransform twsf         = slovo_prefab.AddComponent <TweenTransform> () as TweenTransform;

        twsf.from     = slovo_prefab.transform;
        twsf.to       = GameObject.Find("slovo_pref_pos").transform;
        twsf.duration = 1f;
        twsf.PlayForward();

        for (int i = 1; i < 7; i++)
        {
            GameObject go = GameObject.Find("slika" + i.ToString());

            if (slike.Contains(go.name))
            {
                TweenTransform tw = go.AddComponent <TweenTransform> () as TweenTransform;
                tw.from     = go.transform;
                tw.to       = GameObject.Find("pos" + j.ToString()).transform;
                tw.duration = 1f;
                tw.PlayForward();
                j++;
                go.GetComponentInChildren <UILabel>().enabled = true;
                reci.Add(go.GetComponentInChildren <UILabel>().text.ToLower());
            }
            else
            {
                go.transform.position = new Vector3(1000f, 0f, 0f);
            }
            go.GetComponent <UITexture>().color = Color.white;
        }

        slike.Clear();
        showWin.show(gameObject.GetComponent <na_slovo_setup>().timer);
        sound.playSound(reci [0]);
        StartCoroutine("sacekaj_i_pusti", 1f);
    }
    IEnumerator PlayGameTime()
    {
        if (FinishPanelCtrl.GetInstance() != null && FinishPanelCtrl.GetInstance().CheckIsActiveFinish())
        {
            StopRunGameTime();
            yield break;
        }

        if (Time.timeScale != 1f)
        {
            yield return(new WaitForSeconds(1.0f));

            yield return(StartCoroutine(PlayGameTime()));
        }

        SetTimeValToImg();

        if (GameTimeValCur <= 0 && !AddGameTimeCtrl.GetInstance().GetIsActiveAddTime())
        {
            InsertCoinCtrl.GetInstanceP2().HiddenInsertCoin();
            StartBtCtrl.GetInstanceP2().CloseStartBtCartoon();
            HeadCtrlPlayer.GetInstanceP1().SetHeadColor();
            HeadCtrlPlayer.GetInstanceP2().SetHeadColor();

            ResetTimeHMvalToImg();
            StopCoroutine(SetTimeHMvalToImg());
            StopCoroutine(PlayGameTime());
            IsInitPlayTime = false;
            StartBtCtrl.GetInstanceP1().ResetIsActivePlayer();
            StartBtCtrl.GetInstanceP2().ResetIsActivePlayer();

            if (GlobalData.GetInstance().gameMode == GameMode.OnlineMode)
            {
                gameObject.SetActive(false);
                RankingCtrl.GetInstance().StopCheckPlayerRank();

                //FinishPanelCtrl.GetInstancePlayer().ShowFinishPanel();

                if (WaterwheelPlayerNetCtrl.GetInstance().GetPlayerRankNo() == 1)
                {
                    FinishPanelCtrl.GetInstance().ShowFinishPanel();
                }
                else
                {
                    FinishPanelCtrl.GetInstancePlayer().ShowFinishPanel();
                }
            }
            else
            {
                GameOverCtrl.GetInstance().ShowContinueGame();
                DaoJiShiCtrl.GetInstance().InitPlayDaoJiShi();
            }
            yield break;
        }
        yield return(new WaitForSeconds(1.0f));

        if (GameTimeValCur <= 10 && GameTimeValCur >= 1 && !TimeTTran.enabled)
        {
            TimeTTran.ResetToBeginning();
            TimeTTran.enabled = true;
            TimeTTran.PlayForward();
            if (GameTimeValCur == 10)
            {
                GameDaoJiShiCtrl.GetInstance().StartPlayDaoJiShi();
                CreateAudioSourceTime();
                AudioSourceTime.Play();
            }
        }

        if (!AddGameTimeCtrl.GetInstance().GetIsActiveAddTime())
        {
            GameTimeValCur--;
        }

        if (GameTimeValCur <= 0 && TimeTTran.enabled)
        {
            TimeTTran.enabled = false;
            if (AudioSourceTime != null && AudioSourceTime.isPlaying)
            {
                AudioSourceTime.Stop();
            }
        }
        yield return(StartCoroutine(PlayGameTime()));
    }
示例#10
0
 void DelayPlayTimeTweenTran()
 {
     TweenTranScript.enabled = true;
     TweenTranScript.PlayForward();
 }
    void MoveCamera(CameraPathCtrl path)
    {
        if (path == null)
        {
            Debug.LogError("MoveCamera -> path is null!");
            return;
        }
        NoiseScript.enabled = false;

        if (path.IsOnlyChangeRot)
        {
            TweenTransform TweenTranscript = GmObj.GetComponent <TweenTransform>();
            if (TweenTranscript == null)
            {
                TweenTranscript = gameObject.AddComponent <TweenTransform>();
            }
            TweenTranscript.enabled = false;

            GmTran.position = path.CamRotation_1.position;
            GmTran.rotation = path.CamRotation_1.rotation;

            TweenTranscript.from     = path.CamRotation_1;
            TweenTranscript.to       = path.CamRotation_2;
            TweenTranscript.duration = path.TimeVal;
            TweenTranscript.style    = UITweener.Style.Once;
            TweenTranscript.ResetToBeginning();

            EventDelegate.Add(TweenTranscript.onFinished, delegate {
                OnFinishMoveCamera();
            });

            TweenTranscript.enabled = true;
            TweenTranscript.PlayForward();
        }
        else if (path.IsMvPosByCamPath)
        {
            GmTran.position = path.GetCamPathTranFirst().position;
            GmTran.rotation = path.GetCamPathTranFirst().rotation;

            iTween.MoveTo(GmObj, iTween.Hash("path", path.GetCamPathTranArray(),
                                             "time", path.TimeVal,
                                             "easeType", iTween.EaseType.linear,
                                             "oncomplete", "OnFinishMoveCamera"));
        }
        else if (path.IsMvRotByCamPath)
        {
            GmTran.position = path.GetCamPathTranFirst().position;
            GmTran.rotation = path.GetCamPathTranFirst().rotation;

            iTween.MoveTo(GmObj, iTween.Hash("path", path.GetCamPathTranArray(),
                                             "time", path.TimeVal,
                                             "orienttopath", true,
                                             "easeType", iTween.EaseType.linear,
                                             "oncomplete", "OnFinishMoveCamera"));
        }
        else if (path.IsMvAimByCamPath)
        {
            GmTran.position = path.GetCamPathTranFirst().position;
            GmTran.rotation = path.GetCamPathTranFirst().rotation;

            iTween.MoveTo(GmObj, iTween.Hash("path", path.GetCamPathTranArray(),
                                             "time", path.TimeVal,
                                             "looktarget", path.CamAimPoint,
                                             "easeType", iTween.EaseType.linear,
                                             "oncomplete", "OnFinishMoveCamera"));
        }
    }