コード例 #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
ファイル: Boing.cs プロジェクト: MurrayIRC/kaneda-old-unity
        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);
        }