@@ -9,21 +9,81 @@ public static Tween TweenColor(this Material material, Color to, float duration)
99 setter : color => material . color = color ,
1010 to , duration ) ;
1111
12+ public static Tween TweenColor ( this Material material , Color to , int nameId , float duration ) =>
13+ Tweening . To ( getter : ( ) => material . GetColor ( nameId ) ,
14+ setter : color => material . SetColor ( nameId , color ) ,
15+ to , duration ) ;
16+
17+ public static Tween TweenColor ( this Material material , Color to , string name , float duration ) =>
18+ Tweening . To ( getter : ( ) => material . GetColor ( name ) ,
19+ setter : color => material . SetColor ( name , color ) ,
20+ to , duration ) ;
21+
1222 public static Tween TweenAlpha ( this Material material , float to , float duration ) =>
1323 Tweening . To ( getter : ( ) => material . color . a ,
1424 setter : alpha => material . color = new Color ( material . color . r , material . color . g , material . color . b , alpha ) ,
1525 to , duration ) ;
1626
17- public static Tween TweenMainTextureScale ( this Material material , Vector2 to , float duration ) =>
18- Tweening . To ( getter : ( ) => material . mainTextureScale ,
19- setter : mainTextureScale => material . mainTextureScale = mainTextureScale ,
27+ public static Tween TweenAlpha ( this Material material , float to , int nameId , float duration ) =>
28+ Tweening . To ( getter : ( ) => material . GetColor ( nameId ) . a ,
29+ setter : alpha => material . SetColor ( nameId , new Color ( material . color . r , material . color . g , material . color . b , alpha ) ) ,
30+ to , duration ) ;
31+
32+ public static Tween TweenAlpha ( this Material material , float to , string name , float duration ) =>
33+ Tweening . To ( getter : ( ) => material . GetColor ( name ) . a ,
34+ setter : alpha => material . SetColor ( name , new Color ( material . color . r , material . color . g , material . color . b , alpha ) ) ,
35+ to , duration ) ;
36+
37+ public static Tween TweenFloat ( this Material material , float to , int nameId , float duration ) =>
38+ Tweening . To ( getter : ( ) => material . GetFloat ( nameId ) ,
39+ setter : value => material . SetFloat ( nameId , value ) ,
40+ to , duration ) ;
41+
42+ public static Tween TweenFloat ( this Material material , float to , string name , float duration ) =>
43+ Tweening . To ( getter : ( ) => material . GetFloat ( name ) ,
44+ setter : value => material . SetFloat ( name , value ) ,
45+ to , duration ) ;
46+
47+ public static Tween TweenInt ( this Material material , int to , int nameId , float duration ) =>
48+ Tweening . To ( getter : ( ) => material . GetInt ( nameId ) ,
49+ setter : value => material . SetInt ( nameId , value ) ,
50+ to , duration ) ;
51+
52+ public static Tween TweenInt ( this Material material , int to , string name , float duration ) =>
53+ Tweening . To ( getter : ( ) => material . GetInt ( name ) ,
54+ setter : value => material . SetInt ( name , value ) ,
2055 to , duration ) ;
2156
2257 public static Tween TweenMainTextureOffset ( this Material material , Vector2 to , float duration ) =>
2358 Tweening . To ( getter : ( ) => material . mainTextureOffset ,
2459 setter : mainTextureOffset => material . mainTextureOffset = mainTextureOffset ,
2560 to , duration ) ;
2661
62+ public static Tween TweenMainTextureScale ( this Material material , Vector2 to , float duration ) =>
63+ Tweening . To ( getter : ( ) => material . mainTextureScale ,
64+ setter : mainTextureScale => material . mainTextureScale = mainTextureScale ,
65+ to , duration ) ;
66+
67+ public static Tween TweenTextureOffset ( this Material material , Vector2 to , int nameId , float duration ) =>
68+ Tweening . To ( getter : ( ) => material . GetTextureOffset ( nameId ) ,
69+ setter : value => material . SetTextureOffset ( nameId , value ) ,
70+ to , duration ) ;
71+
72+ public static Tween TweenTextureOffset ( this Material material , Vector2 to , string name , float duration ) =>
73+ Tweening . To ( getter : ( ) => material . GetTextureOffset ( name ) ,
74+ setter : value => material . SetTextureOffset ( name , value ) ,
75+ to , duration ) ;
76+
77+ public static Tween TweenTextureScale ( this Material material , Vector2 to , int nameId , float duration ) =>
78+ Tweening . To ( getter : ( ) => material . GetTextureScale ( nameId ) ,
79+ setter : value => material . SetTextureScale ( nameId , value ) ,
80+ to , duration ) ;
81+
82+ public static Tween TweenTextureScale ( this Material material , Vector2 to , string name , float duration ) =>
83+ Tweening . To ( getter : ( ) => material . GetTextureScale ( name ) ,
84+ setter : value => material . SetTextureScale ( name , value ) ,
85+ to , duration ) ;
86+
2787 }
2888
2989}
0 commit comments