-
Notifications
You must be signed in to change notification settings - Fork 2
/
DOTweenShapesExtensionsDisc.cs
84 lines (65 loc) · 3.75 KB
/
DOTweenShapesExtensionsDisc.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Shapes;
using DG.Tweening;
public static class DOTweenShapesExtensionsDisc
{
public static Tween DOColor(this Disc disc, Color to, float duration) {
return DOTween.To(() => disc.Color, x => disc.Color = x, to, duration);
}
public static Tween DOAlpha(this Disc disc, float to, float duration) {
return DOTween.To(() => disc.Color.a, x => { Color c = disc.Color; c.a = x; disc.Color = c; }, to, duration);
}
public static Tween DOColorInner(this Disc disc, Color to, float duration) {
return DOTween.To(() => disc.ColorInner, x => disc.ColorInner = x, to, duration);
}
public static Tween DOAlphaInner(this Disc disc, float to, float duration) {
return DOTween.To(() => disc.ColorInner.a, x => { Color c = disc.ColorInner; c.a = x; disc.ColorInner = c; }, to, duration);
}
public static Tween DOColorOuter(this Disc disc, Color to, float duration) {
return DOTween.To(() => disc.ColorOuter, x => disc.ColorOuter = x, to, duration);
}
public static Tween DOAlphaOuter(this Disc disc, float to, float duration) {
return DOTween.To(() => disc.ColorOuter.a, x => { Color c = disc.ColorOuter; c.a = x; disc.ColorOuter = c; }, to, duration);
}
public static Tween DOColorOuterStart(this Disc disc, Color to, float duration) {
return DOTween.To(() => disc.ColorOuterStart, x => disc.ColorOuterStart = x, to, duration);
}
public static Tween DOAlphaOuterStart(this Disc disc, float to, float duration) {
return DOTween.To(() => disc.ColorOuterStart.a, x => { Color c = disc.ColorOuterStart; c.a = x; disc.ColorOuterStart = c; }, to, duration);
}
public static Tween DOColorInnerEnd(this Disc disc, Color to, float duration) {
return DOTween.To(() => disc.ColorInnerEnd, x => disc.ColorInnerEnd = x, to, duration);
}
public static Tween DOAlphaInnerEnd(this Disc disc, float to, float duration) {
return DOTween.To(() => disc.ColorInnerEnd.a, x => { Color c = disc.ColorInnerEnd; c.a = x; disc.ColorInnerEnd = c; }, to, duration);
}
public static Tween DOColorOuterEnd(this Disc disc, Color to, float duration) {
return DOTween.To(() => disc.ColorOuterEnd, x => disc.ColorOuterEnd = x, to, duration);
}
public static Tween DOAlphaOuterEnd(this Disc disc, float to, float duration) {
return DOTween.To(() => disc.ColorOuterEnd.a, x => { Color c = disc.ColorOuterEnd; c.a = x; disc.ColorOuterEnd = c; }, to, duration);
}
public static Tween DORadius(this Disc disc, float to, float duration) {
return DOTween.To(() => disc.Radius, x => disc.Radius = x, to, duration);
}
public static Tween DOThickness(this Disc disc, float to, float duration) {
return DOTween.To(() => disc.Thickness, x => disc.Thickness = x, to, duration);
}
public static Tween DOAngleStart(this Disc disc, float to, float duration) {
return DOTween.To(() => disc.AngRadiansStart, x => disc.AngRadiansStart = x, to, duration);
}
public static Tween DOAngleEnd(this Disc disc, float to, float duration) {
return DOTween.To(() => disc.AngRadiansEnd, x => disc.AngRadiansEnd = x, to, duration);
}
public static Tween DODashSize(this Disc disc, float to, float duration) {
return DOTween.To(() => disc.DashSize, x => disc.DashSize = x, to, duration);
}
public static Tween DODashSpacing(this Disc disc, float to, float duration) {
return DOTween.To(() => disc.DashSpacing, x => disc.DashSpacing = x, to, duration);
}
public static Tween DODashOffset(this Disc disc, float to, float duration) {
return DOTween.To(() => disc.DashOffset, x => disc.DashOffset = x, to, duration);
}
}