Exemplo n.º 1
0
    public void End(float duration, GoEaseType easeType = GoEaseType.Linear)
    {
        if (_beginTween.state == GoTweenState.Running)
        {
            _beginTween.pause();
            _beginTween.destroy();
        }

        Go.to(_camera, duration, new GoTweenConfig().floatProp("fieldOfView", _originalValue).setEaseType(easeType));
    }
Exemplo n.º 2
0
 public void Die()
 {
     walkingAroundTween.pause();
     walkingAroundTween.destroy();
     markedForDestruction = true;
     Go.to(gameObject.transform, .3f, new GoTweenConfig().scale(0f).onComplete(goTween =>
     {
         Destroy(gameObject);
     }));
 }
Exemplo n.º 3
0
    public void End(float duration, GoEaseType easeType = GoEaseType.Linear)
    {
        if (_beginTween.state == GoTweenState.Running)
        {
            _beginTween.pause();
            _beginTween.destroy();
        }

        Go.to(_radialBlur, duration, new GoTweenConfig().floatProp("BlurStrength", 0f).setEaseType(easeType));
    }
Exemplo n.º 4
0
    public void End(float duration, GoEaseType easeType = GoEaseType.Linear)
    {
        if (_beginTween.state == GoTweenState.Running)
        {
            _beginTween.pause();
            _beginTween.destroy();
        }

        Go.to(_stars, duration, new GoTweenConfig().floatProp("startSpeed", 100f).setEaseType(easeType).onComplete(t => Stop()));
    }
Exemplo n.º 5
0
    void OnTriggerEnter(Collider other)
    {
        if (other.gameObject.tag != "Sword")
        {
            //return;
        }
        if (!stabbed)
        {
            stabbed = true;

            MonsterVoice.clip = Resources.Load(Sounds.MonsterHurt) as AudioClip;
            MonsterVoice.Play();

            StopAllCoroutines();

            anim.SetBool("SwimmingBool", false);
            anim.SetBool("RoarBool", true);
            attackTween.pause();
        }
    }
    void Awake()
    {
        text = ResolveTextSize (text, lineLenth);
        afterFetch = ResolveTextSize (afterFetch, lineLenth);
        _text = text;

        _originalScale = speechBubble.transform.localScale;
        speechBubble.enabled = false;
        textMesh.text = "";

        _twnExit = new GoTween (speechBubble.transform, 0.15f, new GoTweenConfig ().scale (_originalScale*0.001f).setEaseType(GoEaseType.ExpoOut).onComplete(OnExitComplete));
        speechBubble.transform.localScale = _originalScale * 0.001f;
        _twnEnter = new GoTween (speechBubble.transform, 0.15f, new GoTweenConfig ().scale (_originalScale).setEaseType(GoEaseType.BackOut).onComplete(OnEnterComplete));

        _twnEnter.pause ();
        _twnExit.pause ();
        _twnEnter.autoRemoveOnComplete = false;
        _twnExit.autoRemoveOnComplete = false;
        Go.addTween (_twnEnter);
        Go.addTween (_twnExit);
    }
Exemplo n.º 7
0
    public void Grow()
    {
        //HERE I GROW;
        if (growTween != null)
        {
            growTween.pause();
        }

        finishScale += 0.01f;



        Vector3 newScale      = new Vector3(finishScale, finishScale, transform.localScale.z);
        var     scaleProperty = new ScaleTweenProperty(newScale);

        tweenConfig = new GoTweenConfig();

        //config.setDelay( 1f );
        tweenConfig.addTweenProperty(scaleProperty);

        growTween = new GoTween(transform, 1f, tweenConfig);

        Go.addTween(growTween);
    }