Пример #1
0
        public static FloatTween TweenAlpha(this SpriteRenderer self, float to, float duration = 0.5f)
        {
            SpriteRendererAlphaTarget target = new SpriteRendererAlphaTarget(self);
            FloatTween tween = FloatTween.Create();

            tween.Initialize(target, to, duration);
            return(tween);
        }
Пример #2
0
        public static FloatTween TweenValue(float from, float to, float duration = 0.5f)
        {
            TweenValueTarget <float> target = new TweenValueTarget <float>(from);
            FloatTween tween = FloatTween.Create();

            tween.Initialize(target, to, duration);
            return(tween);
        }
Пример #3
0
        public static FloatTween TweenSpotAngle(this Light self, float to, float duration = 0.5f)
        {
            LightFloatTarget target = new LightFloatTarget(self, LightFloatTarget.LightTargetType.SpotAngle);
            FloatTween       tween  = FloatTween.Create();

            tween.Initialize(target, to, duration);
            return(tween);
        }
Пример #4
0
        public static FloatTween TweenAlpha(this Text self, float to, float duration = 0.5f)
        {
            TextAlphaTarget target = new TextAlphaTarget(self);
            FloatTween      tween  = FloatTween.Create();

            tween.Initialize(target, to, duration);
            return(tween);
        }
Пример #5
0
        public static FloatTween TweenFillAmount(this Image self, float to, float duration = 0.5f)
        {
            ImageFloatTarget target = new ImageFloatTarget(self, ImageFloatTarget.ImageTargetType.FillAmount);
            FloatTween       tween  = FloatTween.Create();

            tween.Initialize(target, to, duration);
            return(tween);
        }
Пример #6
0
        public static FloatTween TweenOrthographicSize(this Camera self, float to, float duration = 0.5f)
        {
            CameraFloatTarget target = new CameraFloatTarget(self, CameraFloatTarget.CameraTargetType.OrthographicSize);
            FloatTween        tween  = FloatTween.Create();

            tween.Initialize(target, to, duration);
            return(tween);
        }
Пример #7
0
        public static FloatTween TweenFieldOfView(this Camera self, float to, float duration = 0.5f)
        {
            CameraFloatTarget target = new CameraFloatTarget(self, CameraFloatTarget.CameraTargetType.FieldOfView);
            FloatTween        tween  = FloatTween.Create();

            tween.Initialize(target, to, duration);
            return(tween);
        }
Пример #8
0
        public static FloatTween TweenPanStereo(this AudioSource self, float to, float duration = 0.5f)
        {
            AudioSourceFloatTarget target = new AudioSourceFloatTarget(self, AudioSourceFloatTarget.AudioSourceFloatType.PanStereo);
            FloatTween             tween  = FloatTween.Create();

            tween.Initialize(target, to, duration);
            return(tween);
        }
Пример #9
0
        public static FloatTween TweenFloat(this Material self, float to, float duration = 0.5f, string propertyName = "_Color")
        {
            MaterialFloatTarget target = new MaterialFloatTarget(self, propertyName);
            FloatTween          tween  = FloatTween.Create();

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