From 7951cf27a8455f18a4a5018b697622028db25481 Mon Sep 17 00:00:00 2001
From: Mikhail <99481254+DCFApixels@users.noreply.github.com>
Date: Fri, 2 Jun 2023 03:03:48 +0800
Subject: [PATCH] refactoring debug attribute
---
src/Debug/Attributes/DebugColorAttribute.cs | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/src/Debug/Attributes/DebugColorAttribute.cs b/src/Debug/Attributes/DebugColorAttribute.cs
index 4e9ebb7..4130b30 100644
--- a/src/Debug/Attributes/DebugColorAttribute.cs
+++ b/src/Debug/Attributes/DebugColorAttribute.cs
@@ -10,17 +10,11 @@ namespace DCFApixels.DragonECS
public byte r => color.r;
public byte g => color.g;
public byte b => color.b;
- /// normalized R channel
- public float rn => color.r / 255f;
- /// normalized G channel
- public float gn => color.g / 255f;
- /// normalized B channel
- public float bn => color.b / 255f;
public DebugColorAttribute(byte r, byte g, byte b) => color = new ColorRecord(r, g, b);
public DebugColorAttribute(DebugColor color) => this.color = new ColorRecord((int)color);
[StructLayout(LayoutKind.Explicit, Pack = 1, Size = 4)]
- private readonly struct ColorRecord // Union
+ private readonly struct ColorRecord
{
[FieldOffset(0)] public readonly int full;
[FieldOffset(3)] public readonly byte r;