Beispiel #1
0
        public static Vector2Tween TweenSizeDelta(this RectTransform self, Vector2 to, float duration = 0.5f)
        {
            RectTransformSizeDeltaTarget target = new RectTransformSizeDeltaTarget(self);
            Vector2Tween tween = Vector2Tween.Create();

            tween.Initialize(target, to, duration);
            return(tween);
        }
Beispiel #2
0
        public static Vector2Tween TweenNormalizedPosition(this ScrollRect self, Vector2 to, float duration = 0.5f)
        {
            ScrollRectNormalizedPositionTarget target = new ScrollRectNormalizedPositionTarget(self);
            Vector2Tween tween = Vector2Tween.Create();

            tween.Initialize(target, to, duration);
            return(tween);
        }
Beispiel #3
0
        public static Vector2Tween TweenTextureScale(this Material self, Vector2 to, float duration = 0.5f, string propertyName = "_MainTex")
        {
            MaterialTextureScaleTarget target = new MaterialTextureScaleTarget(self, propertyName);
            Vector2Tween tween = Vector2Tween.Create();

            tween.Initialize(target, to, duration);
            return(tween);
        }