Changeset - 8da5f6699d57
[Not reviewed]
default
0 1 0
Jason Maltzen - 3 years ago 2021-09-09 23:55:08
jason@hiddenachievement.com
Add constructor / setter to PaintColor to copy another paint color and assign a different name to it.
1 file changed with 16 insertions and 0 deletions:
0 comments (0 inline, 0 general)
Models/PaintColor.cs
Show inline comments
...
 
@@ -50,2 +50,18 @@ namespace DesertPaintCodex.Models
 

	
 
        public PaintColor(string name, PaintColor other)
 
        {
 
            Name  = name;
 
            Red   = other.Red;
 
            Green = other.Green;
 
            Blue  = other.Blue;
 
        }
 

	
 
        public void Set(string name, PaintColor other)
 
        {
 
            Name  = name;
 
            Red   = other.Red;
 
            Green = other.Green;
 
            Blue  = other.Blue;
 
        }
 

	
 
        public int GetDistanceSquared(PaintColor otherColor)
0 comments (0 inline, 0 general)