From bdf31769bf3a97971f1a05a4918611db271c72c1 Mon Sep 17 00:00:00 2001 From: Mikhail <99481254+DCFApixels@users.noreply.github.com> Date: Sat, 14 Sep 2024 10:01:31 +0800 Subject: [PATCH] Update MetaColorAttribute.cs --- src/DebugUtils/MetaAttributes/MetaColorAttribute.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/DebugUtils/MetaAttributes/MetaColorAttribute.cs b/src/DebugUtils/MetaAttributes/MetaColorAttribute.cs index 1e21799..b8ac82c 100644 --- a/src/DebugUtils/MetaAttributes/MetaColorAttribute.cs +++ b/src/DebugUtils/MetaAttributes/MetaColorAttribute.cs @@ -248,6 +248,9 @@ namespace DCFApixels.DragonECS #endregion #region Operators + public static implicit operator MetaColor((byte, byte, byte) a) { return new MetaColor(a.Item1, a.Item2, a.Item3); } + public static implicit operator MetaColor((byte, byte, byte, byte) a) { return new MetaColor(a.Item1, a.Item2, a.Item3, a.Item4); } + public static implicit operator MetaColor(int a) { return new MetaColor(a); } public static bool operator ==(MetaColor a, MetaColor b) { return a.colorCode == b.colorCode; } public static bool operator !=(MetaColor a, MetaColor b) { return a.colorCode != b.colorCode; }