Example #1
0
 public void MakeNormal()
 {
     ITween.ScaleTo(gameObject, ITween.Hash("x", _normalSize.x, "y", _normalSize.y, "time", CharactersUiController.Instance().CharacterAnimationTime, "onComplete", "FreeMemory"));
     ITween.MoveTo(_animationSprite.gameObject, ITween.Hash("y", _normalPositionY, "islocal", true, "time", CharactersUiController.Instance().CharacterAnimationTime));
     _animationSprite.ResetAnimation();
     _animationSprite.StopAnimation();
     _animationSprite.GetComponent <SpriteRenderer>().sortingOrder = 0;
     _startingAnimation = false;
 }
Example #2
0
        private void StopFly()
        {
            Hashtable ht = new Hashtable {
                { "easetype", ITween.EaseType.easeOutSine }, { "time", TimeAnimation / 2 }, { "position", DeffaultPostion }
            };

            ITween.MoveTo(MyHero.gameObject, ht);
            // ReSharper disable once PossibleLossOfFraction
            StartCoroutine("GoToGround", TimeAnimation / 2);
        }
Example #3
0
 public void MakeBig()
 {
     ITween.EaseType easeType = ITween.EaseType.easeInQuad;
     ITween.ScaleTo(gameObject, ITween.Hash("x", _normalSize.x * BigSizeScale, "y", _normalSize.y * BigSizeScale, "easeType", easeType, "time", CharactersUiController.Instance().CharacterAnimationTime, "onComplete", "StartAnimation"));
     ITween.MoveTo(_animationSprite.gameObject, ITween.Hash("y", _normalPositionY + DistanceUp, "easeType", easeType, "islocal", true, "time", CharactersUiController.Instance().CharacterAnimationTime));
     transform.SetSiblingIndex(20);
     _animationSprite.GetComponent <SpriteRenderer>().sortingOrder = 100;
     if (IsOpen)
     {
         StartAnimationAndShowCard();
     }
 }
Example #4
0
        public void ChangePrice(string newPrice, string difference)
        {
            CoinsCountText.text  = newPrice;
            SecondPriceText.text = difference;

            SecondPriceText.enabled = true;
            //			//Animating color
            Hashtable tweenParams = new Hashtable
            {
                { "from", _deffaultColor },
                { "to", new Color(_deffaultColor.r, _deffaultColor.g, _deffaultColor.b, 0) },
                { "time", AnimationTime / 3 },
                { "onupdate", "OnColorUpdated" }
            };

            ITween.ValueTo(gameObject, tweenParams);
            SecondPriceText.GetComponent <RectTransform>().position = _deffaultPosition;
            ITween.MoveTo(SecondPriceText.gameObject, ITween.Hash("y", DeffaultYPosition + AnimationShift, "time", AnimationTime, "easetype", ITween.EaseType.easeOutQuad));
        }
Example #5
0
 private void MakeFly()
 {
     MyHero.Body.isKinematic = true;
     ITween.MoveTo(MyHero.gameObject, new Vector3(0, 1, 0), TimeAnimation);
     _objectToShake = MyHero.transform.GetChild(0).transform;
 }