Exemplo n.º 1
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetKey(KeyCode.X))
     {
         path.DOPlay();
     }
 }
Exemplo n.º 2
0
 void OnGameStart(EventArgs args)
 {
     if (Connection.GetInstance().isHost)
     {
         doPath.DOPlay();
     }
 }
Exemplo n.º 3
0
 public virtual void StartMove()
 {
     if (pathMgr != null)
     {
         pathMgr.DOPlay();
     }
 }
Exemplo n.º 4
0
 public void DoPlayMoveOverWater()
 {
     m_moveOverWaterPath.transform.position = m_moveOverWaterPathStartPosition;
     m_boatObject.parent = m_moveOverWaterPath.transform;
     m_moveOverWaterPath.DOPlay();
     m_startShaking = true;
 }
Exemplo n.º 5
0
    private void ShowWorldMap()
    {
        WorldMapManager.currentStory = SaveDataCenter.GetSaveData().progress.worldMap;

        titlePath.DOPlay();
        titleAnimation.DOPlay();
        foreach (var animation in buttonAnimations)
        {
            animation.DOPlay();
        }
        foreach (var button in titleButtons)
        {
            button.enabled = false;
        }

        foreach (var animation in worldMapButtonAnimations)
        {
            animation.DOPlay();
        }
        foreach (var button in worldMapButtons)
        {
            button.enabled = true;
        }

        GetComponent <WorldMapManager>().enabled = true;
    }
Exemplo n.º 6
0
    void WebAnim()
    {
        //DORestart:  recalculate the relative path
        lp.DORestart(true);
        rp.DORestart(true);
        lp.DOPlay();
        rp.DOPlay();
        SetWebNodeForge(0);
        lp.gameObject.transform.DOLocalRotate(new Vector3(75, 0, -8), 0.4f, RotateMode.Fast).onComplete = delegate {
            lp.gameObject.transform.DOLocalRotate(new Vector3(0, 0, 7), 0.6f, RotateMode.Fast).onComplete = delegate { SetWebNodeForge(forge); };
        };
        rp.gameObject.transform.DOLocalRotate(new Vector3(75, 0, 8), 0.4f, RotateMode.Fast).onComplete = delegate {
            rp.gameObject.transform.DOLocalRotate(new Vector3(0, 0, -7), 0.6f, RotateMode.Fast);
        };

        DOTweenPath t;

        GameObject[] os = GameObject.FindGameObjectsWithTag("WebNode");
        foreach (GameObject o in os)
        {
            if (o.GetComponent <DOTweenPath>())
            {
                t = o.GetComponent <DOTweenPath>();
                t.DORestart(true);
                t.DOPlay();
            }
        }
    }
Exemplo n.º 7
0
    private IEnumerator FiringSequence()
    {
        SetEmitterChargePathsStatus(true);
        m_WeaponCharging = true;

        m_ArrayPathForwardTween.DORewind();
        m_ArrayPathReverseTween.DORewind();

        float arrayPathForwardTweenDuration = Mathf.Abs(Mathf.Abs(m_AngleOfAttack.y) - Mathf.Abs(m_AngleToTarget)) / m_ArrayChargeTime;
        float arrayPathReverseTweenDuration = Mathf.Abs(Mathf.Abs(m_AngleOfAttack.x) - Mathf.Abs(m_AngleToTarget)) / m_ArrayChargeTime;

        m_ArrayPathForwardTween.GetTween().timeScale = arrayPathForwardTweenDuration;
        m_ArrayPathReverseTween.GetTween().timeScale = arrayPathReverseTweenDuration;

        m_ArrayPathForwardTween.DOPlay();
        m_ArrayPathReverseTween.DOPlay();

        while (!m_EmitterCollision)
        {
            yield return(null);
        }

        m_WeaponCharging = false;

        if (m_Target != null)
        {
            SetEmitterChargePathsStatus(false);
            m_EmitterCollision = false;

            m_WeaponDischarging = true;
            m_BeamClone.Fire(m_Target.transform.position, true);
        }
    }
Exemplo n.º 8
0
 private void OnCollisionEnter(Collision col)
 {
     if (col.gameObject.tag.Equals("Terrain"))
     {
         //落地
         doPath.DOPlay();
     }
 }
Exemplo n.º 9
0
 public void PlayDotTween()
 {
     Debug.Log("PlayDotTween/" + isServerOnly);
     if (isServerOnly)
     {
         doTweenPath.onComplete.RemoveAllListeners();
         doTweenPath.DOPlay();
         doTweenPath.onComplete.AddListener(() => doTweenPath.wps.Clear());
     }
 }
Exemplo n.º 10
0
 private void CheckPath()
 {
     if (isMove)
     {
         dotweenPath.DOPlay();
     }
     else
     {
         dotweenPath.DOPause();
     }
 }
Exemplo n.º 11
0
    IEnumerator Show()
    {
        FishState temp = state;

        state = FishState.show;


        if (temp == FishState.move)
        {
            path.DOPause();
        }
        if (temp == FishState.idle)
        {
            anim.speed = 1.0f;
        }

        state = FishState.show;
        Vector3 towards = transform.forward;

        transform.DOLookAt(lookAtCamera.position, 0.5f);
        yield return(new WaitForSeconds(0.5f));

        anim.Play("jump");
        yield return(new WaitForSeconds(0.5f));

        //transform.DOLookAt(towards, 0.5f);
        //yield return new WaitForSeconds(0.5f);

        state = temp;
        if (state == FishState.idle)
        {
            anim.speed = 0.1f;
        }
        if (state == FishState.move)
        {
            path.DOPlay();
        }
    }
Exemplo n.º 12
0
    IEnumerator CoStartCinematic()
    {
        proCamera2DTransitionFx.TransitionEnter();

        yield return(new WaitForSeconds(proCamera2DTransitionFx.DurationEnter));

        Letterbox_Bottom.DOSizeDelta(new Vector2(Letterbox_Bottom.rect.width, 50), 1);
        Letterbox_Top.DOSizeDelta(new Vector2(Letterbox_Top.rect.width, 50), 1);

        wispPresent_DOTweenPath.DOPlay();

        yield return(new WaitForSeconds(2.5f));

        wispFuture_DOTweenPath.DOPlay();

        yield return(new WaitForSeconds(2.5f));

        cameraTarget_DOTweenPath.DOPlay();

        yield return(new WaitForSeconds(2f));

        Image_TeamVogel.CrossFadeAlpha(1, 1, false);
        audioSource.PlayOneShot(audioSource.clip);

        yield return(new WaitForSeconds(3));

        wispPast_DOTweenPath.DOPlay();

        yield return(new WaitForSeconds(1f));

        Image_TeamVogel.CrossFadeAlpha(0, 1, false);

        yield return(new WaitForSeconds(4.5f));

        Text_Presents.CrossFadeAlpha(1, 1, false);
        audioSource.PlayOneShot(audioSource.clip);

        yield return(new WaitForSeconds(4f));

        Text_Presents.CrossFadeAlpha(0, 1, false);

        yield return(new WaitForSeconds(4.5f));

        Text_GameName.CrossFadeAlpha(1, 1, false);
        audioSource.PlayOneShot(audioSource.clip);

        yield return(new WaitForSeconds(4f));

        Text_GameName.CrossFadeAlpha(0, 1, false);
    }
Exemplo n.º 13
0
        public void StartFlying()
        {
            if (m_paperFlyPath != null)
            {
                m_paperFlyPath.DOPlay();

                Vector4 waveA = new Vector4(1, 1, .03f, 1);
                Vector4 waveB = new Vector4(1, 1, .03f, 1);
                Vector4 waveC = new Vector4(1, 1, .03f, 1);

                m_enderer.material.SetVector("_WaveA", waveA);
                m_enderer.material.SetVector("_WaveB", waveB);
                m_enderer.material.SetVector("_WaveB", waveC);
            }
        }
Exemplo n.º 14
0
    public void OnMissionStart()
    {
        // missionMessageUI.text = "Mission started!";

        // Start moving pickup
        pickupMovementPath.DOPlay();
        // Start mission timer
        missionTimer.Start();
        // Show mission panel canvas group
        missionPanelCG.alpha = 1;
        // Disable explosion effect
        explosionEffect.SetActive(false);

        // Enable picku (car object)
        pickupGameObject.SetActive(true);
    }
Exemplo n.º 15
0
    protected override void CustomPlayFeedback(Vector3 position, float feedbacksIntensity = 1.0f)
    {
        switch (Mode)
        {
        case Modes.DOPlay:
            TargetDOTweenPath.DOPlay();
            break;

        case Modes.DOPlayBackwards:
            TargetDOTweenPath.DOPlayBackwards();
            break;

        case Modes.DOPlayForward:
            TargetDOTweenPath.DOPlayForward();
            break;

        case Modes.DOPause:
            TargetDOTweenPath.DOPause();
            break;

        case Modes.DOTogglePause:
            TargetDOTweenPath.DOTogglePause();
            break;

        case Modes.DORewind:
            TargetDOTweenPath.DORewind();
            break;

        case Modes.DORestart:
            TargetDOTweenPath.DORestart();
            break;

        case Modes.DOComplete:
            TargetDOTweenPath.DOComplete();
            break;

        case Modes.DOKill:
            TargetDOTweenPath.DOKill();
            break;
        }
    }
Exemplo n.º 16
0
    private void StartRace()
    {
        int i = 0;

        foreach (KeyValuePair <string, float> competitor in BlossomCompetitionManager.Instance.CurrentResults)
        {
            float       speed                    = MapRangeExtension.MapRange(competitor.Value, 0, BlossomCompetitionManager.Instance.GetCompetitionMaxScore(), 0.75f, 1.25f);
            DOTweenPath path                     = Blossoms[i].GetComponent <DOTweenPath>();
            path.GetTween().timeScale            = speed * 0.25f;
            BlossomAppearance         appearance = Blossoms[i].GetComponent <BlossomAppearance>();
            string                    id         = competitor.Key;
            string                    growth     = DialogueLua.GetVariable(id + "Growth").AsString;
            string                    color      = DialogueLua.GetVariable(id + "Color").AsString;
            BlossomData.BlossomGrowth growthData = (BlossomData.BlossomGrowth)System.Enum.Parse(typeof(BlossomData.BlossomGrowth), growth);
            appearance.SetAppearance(growthData, color);
            string name = DialogueLua.GetVariable(id + "Name").AsString;
            Blossoms[i].GetComponentInChildren <TextMeshProUGUI>().text = name;
            i++;
            path.DOPlay();
        }
    }
Exemplo n.º 17
0
    public void BossWake()
    {
        if (bIsIceGolem)
        {
            gameObject.SetActive(true);
            Path.DOPlay();
        }

        HP.SetMonsterHP(400);

        BossAnim.SetTrigger(StartTrigger);
        BossColider.SetActive(true);

        if (!bIsIceGolem)
        {
            BossStartEffect();
            Dissolve.StartDissolve();
            MonsterHPBar.SetActive(true);
        }

        AttackRange.SetActive(true);


        coli.Rocks[0].transform.localPosition = new Vector3(0, -1, 1.89f);
        coli.Rocks[1].transform.localPosition = new Vector3(-0.67f, -1, 3.87f);
        coli.Rocks[2].transform.localPosition = new Vector3(0.49f, -1, 3.79f);
        coli.Rocks[3].transform.localPosition = new Vector3(-1.323f, -1, 5.954f);
        coli.Rocks[4].transform.localPosition = new Vector3(0.012f, -1, 6.022f);
        coli.Rocks[5].transform.localPosition = new Vector3(1.1f, -1, 6.17f);

        Vector3    direction = PlayerOBJ.transform.position - transform.position;
        Quaternion q         = Quaternion.LookRotation(new Vector3(direction.x, 0, direction.z));

        BossTimeOut = false;

        StartCoroutine("MonsterRotation", q);
    }
Exemplo n.º 18
0
 public void DoPlayMoveToWater(UnityAction onComplete)
 {
     m_moveToWaterPath.DOPlay();
     m_moveToWaterPath.onComplete.AddListener(onComplete);
 }
 void OnEnable()
 {
     tweenPath.DOPlay();
 }
Exemplo n.º 20
0
 public void StartRun()
 {
     _tweenPath.DOPlay();
 }
Exemplo n.º 21
0
 void PlayPath()
 {
     path.DOPlay();
 }
Exemplo n.º 22
0
    void AddFlyFont(IEntity entity, EntityType type, DamageType damType, FlyFont font, float damage = 0)
    {
        Transform  posRoot = null;
        DamageType dt      = damType;

        if (testType != DamageType.None)
        {
            dt = testType;
        }
        bool bSelf = false;

        if (type == EntityType.EntityType_Player)
        {
            if (ClientGlobal.Instance().MainPlayer.GetUID() == entity.GetUID())
            {
                bSelf = true;
            }
        }
        if (damage == 0 && damType == DamageType.Normal)
        {
            //  Log.Error("damage == 0 && damType == DamageType.Normal  parent is flyroot");
            ReturnFlyFont(dt, font);
            return;
        }
        SetFontText(font, (int)damage, dt, bSelf);
        font.SetActive(true);

        GameObject rootGo = m_posRootPool.Alloc();

        posRoot        = rootGo.transform;
        posRoot.parent = this.transform;
        Vector3 enpos = entity.GetPos();
        Vector3 pos   = Vector3.zero;

        entity.GetLocatorPos(m_strLocatorName, Vector3.zero, Quaternion.identity, ref pos, true);
        float r = 0;// entity.GetRadius() * 2;

        posRoot.position = new Vector3(enpos.x, pos.y + r, enpos.z);

        posRoot.transform.rotation = GetLookRotation();
        Transform fontTrans = font.GetFontTransform();

        posRoot.name = entity.GetName();
        if (fontTrans != null && posRoot != null)
        {
            fontTrans.parent        = posRoot;
            fontTrans.localPosition = Vector3.zero;
            fontTrans.localRotation = Quaternion.identity;
            MeshText mt = font.GetMt();
            if (mt != null)
            {
                DOTweenAnimation[] tweenArray = font.GetTweens();
                DOTweenPath        pathTween  = font.GetPathTween();

                Tween maxAni = null;
                float during = 0;
                for (int i = 0; i < tweenArray.Length; i++)
                {
                    DOTweenAnimation tweenAni = tweenArray[i];

                    float totalTime = tweenAni.duration + tweenAni.delay;
                    if (totalTime > during)
                    {
                        maxAni = tweenAni.tween;
                        during = totalTime;
                    }
                    if (pathTween != null)
                    {
                        if (pathTween.duration + pathTween.delay > during)
                        {
                            maxAni = pathTween.tween;
                            during = pathTween.duration + pathTween.delay;
                        }
                    }
                    if (tweenAni.animationType == DOTweenAnimationType.Color)
                    {
                        int a = 10;
                    }
                    tweenAni.tween.Restart();
                    tweenAni.tween.Play();
                    // tweenAni.DOPlay();
                    //if (tweenAni.animationType == DOTweenAnimationType.Color)
                    //{
                    //    tweenAni.tween.Restart();
                    //    tweenAni.tween.Kill();
                    //    tweenAni.CreateTween();
                    //    //tweenAni.DOPlay();
                    //}
                    //else
                    //{
                    //    tweenAni.tween.Kill();
                    //    tweenAni.CreateTween();
                    //   // tweenAni.tween.Restart();
                    //}
                }

                if (pathTween != null)
                {
                    pathTween.DORestart();
                    pathTween.DOPlay();
                }


                maxAni.OnComplete(() =>
                {
                    ReturnFlyFont(dt, font);
                });
            }
        }
        else
        {
            ReturnFlyFont(dt, font);
        }
    }
Exemplo n.º 23
0
 private void StartMovingOnPath()
 {
     SetSteMachineToWalkState();
     m_currentPath.DOPlay();
 }
Exemplo n.º 24
0
 public void SetPathAndPlay(Transform trs)
 {
     pathDo = trs.GetComponent <DOTweenPath>();
     pathDo.DOPlay();
 }