mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 07:14:55 +08:00
Merge pull request #396 from pharan/moreextensions
Added skeleton.SetColor to Unity SkeletonExtensions.
This commit is contained in:
commit
4d8e00919d
@ -39,6 +39,20 @@ using Spine;
|
||||
|
||||
public static class SkeletonExtensions {
|
||||
|
||||
public static void SetColor (this Skeleton skeleton, Color color) {
|
||||
skeleton.A = color.a;
|
||||
skeleton.R = color.r;
|
||||
skeleton.G = color.g;
|
||||
skeleton.B = color.b;
|
||||
}
|
||||
|
||||
public static void SetColor (this Skeleton skeleton, Color32 color) {
|
||||
skeleton.A = color.a / 255f;
|
||||
skeleton.R = color.r / 255f;
|
||||
skeleton.G = color.g / 255f;
|
||||
skeleton.B = color.b / 255f;
|
||||
}
|
||||
|
||||
public static void SetColor (this Slot slot, Color color) {
|
||||
slot.A = color.a;
|
||||
slot.R = color.r;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user