public override void Stop(NpcCharacterEffect effect, ParticleSystemStopBehavior stopBehavior = ParticleSystemStopBehavior.StopEmitting)
 {
     switch (effect)
     {
     case NpcCharacterEffect.NoMeatBought:
         NoMeatBoughtScaleOutTween.Play(() => NoMeatBoughtScaleOutTween.gameObject.SetActive(false));
         break;
     }
 }
 public override void Play(NpcCharacterEffect effect)
 {
     switch (effect)
     {
     case NpcCharacterEffect.NoMeatBought:
         NoMeatBoughtScaleInTween.gameObject.SetActive(true);
         NoMeatBoughtScaleInTween.Play();
         break;
     }
 }
Esempio n. 3
0
        public SimulateScenarioItem ScaleOn(List <GameObject> goList, Vector3 scaleCoeff, float duration, EaseType ease, Callback callback)
        {
            SimulateScenarioItem tweenObj = null;

            if (goList != null && goList.Count > 0)
            {
                tweenObj = new ScaleTween(convertToObjects(goList), scaleCoeff, duration, Ease[ease], TweenEndValueType.On, callback);
                tweenObj.Play();
            }
            return(tweenObj);
        }
Esempio n. 4
0
    protected void SetHighlighted(bool highlight)
    {
        if (highlight != _highlighted)
        {
            if (highlight)
            {
                _background.color *= _highlightColor;
                _foreground.color *= _highlightColor;
                _icon.color       *= _highlightColor;
            }
            else
            {
                _background.color = _bgDefaultColor;
                _foreground.color = _fgDefaultColor;
                _icon.color       = _iconDefaultColor;
            }

            _slamTween.Play();
        }
    }
Esempio n. 5
0
    void OnMouseDown()
    {
        _heartVFX.Emit(CameraOrbit.GetClickStrength());

        _lastClickTime = Time.time;
        _clickTween.Play();

        if (_goToTargetRoutine != null)
        {
            StopCoroutine(_goToTargetRoutine);
            _goToTargetRoutine = null;
        }
    }
Esempio n. 6
0
    void OnMouseDown()
    {
        _numClicks += CameraOrbit.GetClickStrength();
        if (_numClicks > _clicksToDrop + numEnlarges * _clicksToDrop * 0.75f)
        {
            for (int i = 0; i <= numEnlarges; i++)
            {
                Block block = Instantiate <Block>(_blockPrefab, Planet.instance.transform);
                StartCoroutine(DropBlockRoutine(block));
            }

            _numClicks = 0;
        }

        _clickTween.Play();
    }
Esempio n. 7
0
    IEnumerator ShowWidgetRoutine(bool show)
    {
        if (show)
        {
            _snapBubbleToAlonePoint = true;
        }

        yield return(null);

        _dialogueBubble.gameObject.SetActive(true);
        _wobbleTween.Stop();

        Vector3 startScale = show ? Vector3.zero : _dialogueBubble.transform.localScale;
        Vector3 endScale   = show ? Vector3.one : Vector3.zero;

        float showTimer = 0f;

        while (showTimer < _showTime)
        {
            showTimer += Time.deltaTime;

            float alpha = show ? _showCurve.Evaluate(showTimer / _showTime) : showTimer / _showTime;
            _dialogueBubble.transform.localScale = Vector3.LerpUnclamped(startScale, endScale, alpha);

            yield return(null);
        }

        _dialogueBubble.gameObject.SetActive(show);

        if (show)
        {
            _wobbleTween.Play();
        }

        _showWidgetRoutine = null;
    }
Esempio n. 8
0
 public void OnPointerEnter(PointerEventData eventData)
 {
     _hoverTween.Play();
 }
Esempio n. 9
0
 public void JumpToWithInOutScale(Vector3 target, Action onComplete = null, CollidersHandler collidersToTurnOff = null)
 {
     JumpToWithoutScale(target, onComplete, collidersToTurnOff);
     scaleInTweenBehaviour.Play(() => scaleOutTweenBehaviour.Play());
 }