Skip to content

Commit 6b38e3c

Browse files
authored
Merge pull request #15 from VirtueSky/dev
Dev
2 parents dd44f0a + d23876a commit 6b38e3c

File tree

4 files changed

+99
-11
lines changed

4 files changed

+99
-11
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
### 1: Download the repo and drop it into folder `Assets`
2424
### 2: Add the line below to `Packages/manifest.json`
2525

26-
for version `2.9.9`
26+
for version `3.0.0`
2727
```csharp
28-
"com.virtuesky.sunflower":"https://github.com/VirtueSky/sunflower.git#2.9.9",
28+
"com.virtuesky.sunflower":"https://github.com/VirtueSky/sunflower.git#3.0.0",
2929
```
3030

3131
## Includes modules

VirtueSky/ControlPanel/ConstantPackage.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
public class ConstantPackage
44
{
5-
public const string VersionSunflower = "2.9.9";
5+
public const string VersionSunflower = "3.0.0";
66
public const string PackageNameInAppPurchase = "com.unity.purchasing";
77
public const string MaxVersionInAppPurchase = "4.12.2";
88
public const string PackageNameNewtonsoftJson = "com.unity.nuget.newtonsoft-json";
@@ -50,35 +50,35 @@ public class ConstantPackage
5050
public const string PackageNameFirebaseApp = "com.google.firebase.app";
5151

5252
public const string MaxVersionFirebaseApp =
53-
"https://github.com/firebase-unity/firebase-app.git#12.2.0";
53+
"https://github.com/firebase-unity/firebase-app.git#12.2.1";
5454

5555
public const string PackageNameFirebaseRemoteConfig = "com.google.firebase.remote-config";
5656

5757
public const string MaxVersionFirebaseRemoteConfig =
58-
"https://github.com/firebase-unity/firebase-remote-config.git#12.2.0";
58+
"https://github.com/firebase-unity/firebase-remote-config.git#12.2.1";
5959

6060
public const string PackageNameFirebaseAnalytics = "com.google.firebase.analytics";
6161

6262
public const string MaxVersionFirebaseAnalytics =
63-
"https://github.com/firebase-unity/firebase-analytics.git#12.2.0";
63+
"https://github.com/firebase-unity/firebase-analytics.git#12.2.1";
6464

6565
public const string PackageNameFirebaseDatabase = "com.google.firebase.database";
6666

6767
public const string MaxVersionFirebaseDatabase =
68-
"https://github.com/firebase-unity/firebase-database.git#12.2.0";
68+
"https://github.com/firebase-unity/firebase-database.git#12.2.1";
6969

7070
public const string PackageNameFirebaseAuth = "com.google.firebase.auth";
71-
public const string MaxVersionFirebaseAuth = "https://github.com/firebase-unity/firebase-auth.git#12.2.0";
71+
public const string MaxVersionFirebaseAuth = "https://github.com/firebase-unity/firebase-auth.git#12.2.1";
7272

7373
public const string PackageNameFirebaseCrashlytics = "com.google.firebase.crashlytics";
7474

7575
public const string MaxVersionFirebaseCrashlytics =
76-
"https://github.com/firebase-unity/firebase-crashlytics.git#12.2.0";
76+
"https://github.com/firebase-unity/firebase-crashlytics.git#12.2.1";
7777

7878
public const string PackageNameFirebaseSupportIos = "com.google.firebase.support-ios";
7979

8080
public const string MaxVersionFirebaseSupportIos =
81-
"https://github.com/firebase-unity/firebase-support-ios.git#12.2.0";
81+
"https://github.com/firebase-unity/firebase-support-ios.git#12.2.1";
8282

8383
#endregion
8484

VirtueSky/Misc/Common.Colors.cs

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,48 @@ public static Color SetAlpha(this Color color, float a)
1111
return color;
1212
}
1313

14+
public static Color SetRelativeAlpha(this Color color, float a)
15+
{
16+
color.a += a;
17+
return color;
18+
}
19+
1420
public static Color SetRed(this Color color, float r)
1521
{
1622
color.r = r;
1723
return color;
1824
}
1925

26+
public static Color SetRelativeRed(this Color color, float r)
27+
{
28+
color.r += r;
29+
return color;
30+
}
31+
2032
public static Color SetGreen(this Color color, float g)
2133
{
2234
color.g = g;
2335
return color;
2436
}
2537

38+
public static Color SetRelativeGreen(this Color color, float g)
39+
{
40+
color.g += g;
41+
return color;
42+
}
43+
2644
public static Color SetBlue(this Color color, float b)
2745
{
2846
color.b = b;
2947
return color;
3048
}
3149

50+
public static Color SetRelativeBlue(this Color color, float b)
51+
{
52+
color.b += b;
53+
return color;
54+
}
55+
3256
public static Graphic SetAlpha(this Graphic graphic, float a)
3357
{
3458
var colorCache = graphic.color;
@@ -37,6 +61,14 @@ public static Graphic SetAlpha(this Graphic graphic, float a)
3761
return graphic;
3862
}
3963

64+
public static Graphic SetRelativeAlpha(this Graphic graphic, float a)
65+
{
66+
var colorCache = graphic.color;
67+
colorCache.a += a;
68+
graphic.color = colorCache;
69+
return graphic;
70+
}
71+
4072
public static Graphic SetRed(this Graphic graphic, float r)
4173
{
4274
var colorCache = graphic.color;
@@ -45,6 +77,14 @@ public static Graphic SetRed(this Graphic graphic, float r)
4577
return graphic;
4678
}
4779

80+
public static Graphic SetRelativeRed(this Graphic graphic, float r)
81+
{
82+
var colorCache = graphic.color;
83+
colorCache.r += r;
84+
graphic.color = colorCache;
85+
return graphic;
86+
}
87+
4888
public static Graphic SetGreen(this Graphic graphic, float g)
4989
{
5090
var colorCache = graphic.color;
@@ -53,6 +93,14 @@ public static Graphic SetGreen(this Graphic graphic, float g)
5393
return graphic;
5494
}
5595

96+
public static Graphic SetRelativeGreen(this Graphic graphic, float g)
97+
{
98+
var colorCache = graphic.color;
99+
colorCache.g += g;
100+
graphic.color = colorCache;
101+
return graphic;
102+
}
103+
56104
public static Graphic SetBlue(this Graphic graphic, float b)
57105
{
58106
var colorCache = graphic.color;
@@ -61,6 +109,14 @@ public static Graphic SetBlue(this Graphic graphic, float b)
61109
return graphic;
62110
}
63111

112+
public static Graphic SetRelativeBlue(this Graphic graphic, float b)
113+
{
114+
var colorCache = graphic.color;
115+
colorCache.b += b;
116+
graphic.color = colorCache;
117+
return graphic;
118+
}
119+
64120
public static SpriteRenderer SetAlpha(this SpriteRenderer renderer, float a)
65121
{
66122
var colorCache = renderer.color;
@@ -69,6 +125,14 @@ public static SpriteRenderer SetAlpha(this SpriteRenderer renderer, float a)
69125
return renderer;
70126
}
71127

128+
public static SpriteRenderer SetRelativeAlpha(this SpriteRenderer renderer, float a)
129+
{
130+
var colorCache = renderer.color;
131+
colorCache.a += a;
132+
renderer.color = colorCache;
133+
return renderer;
134+
}
135+
72136
public static SpriteRenderer SetRed(this SpriteRenderer renderer, float r)
73137
{
74138
var colorCache = renderer.color;
@@ -77,6 +141,14 @@ public static SpriteRenderer SetRed(this SpriteRenderer renderer, float r)
77141
return renderer;
78142
}
79143

144+
public static SpriteRenderer SetRelativeRed(this SpriteRenderer renderer, float r)
145+
{
146+
var colorCache = renderer.color;
147+
colorCache.r += r;
148+
renderer.color = colorCache;
149+
return renderer;
150+
}
151+
80152
public static SpriteRenderer SetGreen(this SpriteRenderer renderer, float g)
81153
{
82154
var colorCache = renderer.color;
@@ -85,12 +157,28 @@ public static SpriteRenderer SetGreen(this SpriteRenderer renderer, float g)
85157
return renderer;
86158
}
87159

160+
public static SpriteRenderer SetRelativeGreen(this SpriteRenderer renderer, float g)
161+
{
162+
var colorCache = renderer.color;
163+
colorCache.g += g;
164+
renderer.color = colorCache;
165+
return renderer;
166+
}
167+
88168
public static SpriteRenderer SetBlue(this SpriteRenderer renderer, float b)
89169
{
90170
var colorCache = renderer.color;
91171
colorCache.b = b;
92172
renderer.color = colorCache;
93173
return renderer;
94174
}
175+
176+
public static SpriteRenderer SetRelativeBlue(this SpriteRenderer renderer, float b)
177+
{
178+
var colorCache = renderer.color;
179+
colorCache.b += b;
180+
renderer.color = colorCache;
181+
return renderer;
182+
}
95183
}
96184
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "com.virtuesky.sunflower",
33
"displayName": "Sunflower",
44
"description": "Core ScriptableObject Architecture for building Unity games",
5-
"version": "2.9.9",
5+
"version": "3.0.0",
66
"unity": "2022.3",
77
"category": "virtuesky",
88
"license": "MIT",

0 commit comments

Comments
 (0)