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; }
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(); } }
public void SlideIn() { _uGuiElement.anchoredPosition = _myPosition; Vector2 targetPos = _myPosition + MoveOn; ITween.ValueTo(_uGuiElement.gameObject, ITween.Hash( "from", _uGuiElement.anchoredPosition, "to", targetPos, "time", AnimTime, "onupdatetarget", gameObject, "easetype", ITween.EaseType.easeOutCirc, "onupdate", "MoveGuiElement")); }
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)); }