コード例 #1
0
 public override void Stop(NpcCharacterEffect effect, ParticleSystemStopBehavior stopBehavior = ParticleSystemStopBehavior.StopEmitting)
 {
     switch (effect)
     {
     case NpcCharacterEffect.NoMeatBought:
         NoMeatBoughtScaleOutTween.Play(() => NoMeatBoughtScaleOutTween.gameObject.SetActive(false));
         break;
     }
 }
コード例 #2
0
 public override void Play(NpcCharacterEffect effect)
 {
     switch (effect)
     {
     case NpcCharacterEffect.NoMeatBought:
         NoMeatBoughtScaleInTween.gameObject.SetActive(true);
         NoMeatBoughtScaleInTween.Play();
         break;
     }
 }
コード例 #3
0
ファイル: TweenPerformer.cs プロジェクト: Mouserr/CrazyBalls
        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);
        }
コード例 #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();
        }
    }
コード例 #5
0
    void OnMouseDown()
    {
        _heartVFX.Emit(CameraOrbit.GetClickStrength());

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

        if (_goToTargetRoutine != null)
        {
            StopCoroutine(_goToTargetRoutine);
            _goToTargetRoutine = null;
        }
    }
コード例 #6
0
ファイル: Crop.cs プロジェクト: cjacobwade/Clicktris
    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();
    }
コード例 #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;
    }
コード例 #8
0
ファイル: BitSlotWidget.cs プロジェクト: cjacobwade/Clicktris
 public void OnPointerEnter(PointerEventData eventData)
 {
     _hoverTween.Play();
 }
コード例 #9
0
 public void JumpToWithInOutScale(Vector3 target, Action onComplete = null, CollidersHandler collidersToTurnOff = null)
 {
     JumpToWithoutScale(target, onComplete, collidersToTurnOff);
     scaleInTweenBehaviour.Play(() => scaleOutTweenBehaviour.Play());
 }