Skip to content

Commit 56ccc98

Browse files
committed
Set ids for tweens that aren't components
1 parent c52a449 commit 56ccc98

File tree

4 files changed

+25
-25
lines changed

4 files changed

+25
-25
lines changed

Runtime/Extensions/Misc/RectOffsetTweens.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,22 @@ public static class RectOffsetTweens
77
public static Tween TweenLeft(this RectOffset offset, int to, float duration) =>
88
Tweening.To(getter: () => offset.left,
99
setter: left => offset.left = left,
10-
to, duration);
10+
to, duration).SetId(offset.GetHashCode());
1111

1212
public static Tween TweenRight(this RectOffset offset, int to, float duration) =>
1313
Tweening.To(getter: () => offset.right,
1414
setter: right => offset.right = right,
15-
to, duration);
15+
to, duration).SetId(offset.GetHashCode());
1616

1717
public static Tween TweenTop(this RectOffset offset, int to, float duration) =>
1818
Tweening.To(getter: () => offset.top,
1919
setter: top => offset.top = top,
20-
to, duration);
20+
to, duration).SetId(offset.GetHashCode());
2121

2222
public static Tween TweenBottom(this RectOffset offset, int to, float duration) =>
2323
Tweening.To(getter: () => offset.bottom,
2424
setter: bottom => offset.bottom = bottom,
25-
to, duration);
25+
to, duration).SetId(offset.GetHashCode());
2626

2727
}
2828

Runtime/Extensions/Physics/PhysicMaterialTweens.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ public static class PhysicMaterialTweens
77
public static Tween TweenBounciness(this PhysicMaterial material, float to, float duration) =>
88
Tweening.To(getter: () => material.bounciness,
99
setter: bounciness => material.bounciness = bounciness,
10-
to, duration);
10+
to, duration).SetId(material.GetHashCode());
1111

1212
public static Tween TweenDynamicFriction(this PhysicMaterial material, float to, float duration) =>
1313
Tweening.To(getter: () => material.dynamicFriction,
1414
setter: friction => material.dynamicFriction = friction,
15-
to, duration);
15+
to, duration).SetId(material.GetHashCode());
1616

1717
public static Tween TweenStaticFriction(this PhysicMaterial material, float to, float duration) =>
1818
Tweening.To(getter: () => material.staticFriction,
1919
setter: friction => material.staticFriction = friction,
20-
to, duration);
20+
to, duration).SetId(material.GetHashCode());
2121

2222
}
2323

Runtime/Extensions/Physics2D/PhysicsMaterial2DTweens.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ public static class PhysicsMaterial2DTweens
77
public static Tween TweenBounciness(this PhysicsMaterial2D material, float to, float duration) =>
88
Tweening.To(getter: () => material.bounciness,
99
setter: bounciness => material.bounciness = bounciness,
10-
to, duration);
10+
to, duration).SetId(material.GetHashCode());
1111

1212
public static Tween TweenFriction(this PhysicsMaterial2D material, float to, float duration) =>
1313
Tweening.To(getter: () => material.friction,
1414
setter: friction => material.friction = friction,
15-
to, duration);
15+
to, duration).SetId(material.GetHashCode());
1616

1717
}
1818

Runtime/Extensions/Rendering/MaterialTweens.cs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,82 +7,82 @@ public static class MaterialTweens
77
public static Tween TweenColor(this Material material, Color to, float duration) =>
88
Tweening.To(getter: () => material.color,
99
setter: color => material.color = color,
10-
to, duration);
10+
to, duration).SetId(material.GetHashCode());
1111

1212
public static Tween TweenColor(this Material material, Color to, int nameId, float duration) =>
1313
Tweening.To(getter: () => material.GetColor(nameId),
1414
setter: color => material.SetColor(nameId, color),
15-
to, duration);
15+
to, duration).SetId(material.GetHashCode());
1616

1717
public static Tween TweenColor(this Material material, Color to, string name, float duration) =>
1818
Tweening.To(getter: () => material.GetColor(name),
1919
setter: color => material.SetColor(name, color),
20-
to, duration);
20+
to, duration).SetId(material.GetHashCode());
2121

2222
public static Tween TweenAlpha(this Material material, float to, float duration) =>
2323
Tweening.To(getter: () => material.color.a,
2424
setter: alpha => material.color = new Color(material.color.r, material.color.g, material.color.b, alpha),
25-
to, duration);
25+
to, duration).SetId(material.GetHashCode());
2626

2727
public static Tween TweenAlpha(this Material material, float to, int nameId, float duration) =>
2828
Tweening.To(getter: () => material.GetColor(nameId).a,
2929
setter: alpha => material.SetColor(nameId, new Color(material.color.r, material.color.g, material.color.b, alpha)),
30-
to, duration);
30+
to, duration).SetId(material.GetHashCode());
3131

3232
public static Tween TweenAlpha(this Material material, float to, string name, float duration) =>
3333
Tweening.To(getter: () => material.GetColor(name).a,
3434
setter: alpha => material.SetColor(name, new Color(material.color.r, material.color.g, material.color.b, alpha)),
35-
to, duration);
35+
to, duration).SetId(material.GetHashCode());
3636

3737
public static Tween TweenFloat(this Material material, float to, int nameId, float duration) =>
3838
Tweening.To(getter: () => material.GetFloat(nameId),
3939
setter: value => material.SetFloat(nameId, value),
40-
to, duration);
40+
to, duration).SetId(material.GetHashCode());
4141

4242
public static Tween TweenFloat(this Material material, float to, string name, float duration) =>
4343
Tweening.To(getter: () => material.GetFloat(name),
4444
setter: value => material.SetFloat(name, value),
45-
to, duration);
45+
to, duration).SetId(material.GetHashCode());
4646

4747
public static Tween TweenInt(this Material material, int to, int nameId, float duration) =>
4848
Tweening.To(getter: () => material.GetInt(nameId),
4949
setter: value => material.SetInt(nameId, value),
50-
to, duration);
50+
to, duration).SetId(material.GetHashCode());
5151

5252
public static Tween TweenInt(this Material material, int to, string name, float duration) =>
5353
Tweening.To(getter: () => material.GetInt(name),
5454
setter: value => material.SetInt(name, value),
55-
to, duration);
55+
to, duration).SetId(material.GetHashCode());
5656

5757
public static Tween TweenMainTextureOffset(this Material material, Vector2 to, float duration) =>
5858
Tweening.To(getter: () => material.mainTextureOffset,
5959
setter: mainTextureOffset => material.mainTextureOffset = mainTextureOffset,
60-
to, duration);
60+
to, duration).SetId(material.GetHashCode());
6161

6262
public static Tween TweenMainTextureScale(this Material material, Vector2 to, float duration) =>
6363
Tweening.To(getter: () => material.mainTextureScale,
6464
setter: mainTextureScale => material.mainTextureScale = mainTextureScale,
65-
to, duration);
65+
to, duration).SetId(material.GetHashCode());
6666

6767
public static Tween TweenTextureOffset(this Material material, Vector2 to, int nameId, float duration) =>
6868
Tweening.To(getter: () => material.GetTextureOffset(nameId),
6969
setter: value => material.SetTextureOffset(nameId, value),
70-
to, duration);
70+
to, duration).SetId(material.GetHashCode());
7171

7272
public static Tween TweenTextureOffset(this Material material, Vector2 to, string name, float duration) =>
7373
Tweening.To(getter: () => material.GetTextureOffset(name),
7474
setter: value => material.SetTextureOffset(name, value),
75-
to, duration);
75+
to, duration).SetId(material.GetHashCode());
7676

7777
public static Tween TweenTextureScale(this Material material, Vector2 to, int nameId, float duration) =>
7878
Tweening.To(getter: () => material.GetTextureScale(nameId),
7979
setter: value => material.SetTextureScale(nameId, value),
80-
to, duration);
80+
to, duration).SetId(material.GetHashCode());
8181

8282
public static Tween TweenTextureScale(this Material material, Vector2 to, string name, float duration) =>
8383
Tweening.To(getter: () => material.GetTextureScale(name),
8484
setter: value => material.SetTextureScale(name, value),
85-
to, duration);
85+
to, duration).SetId(material.GetHashCode());
8686

8787
}
8888

0 commit comments

Comments
 (0)