GameGraphics.GraphicsObject.GetColorID C# (CSharp) Method

GetColorID() public method

Returns the given color ID of the object
public GetColorID ( ) : int
return int
        public int GetColorID()
        {
            for (int i = 0; i < COLOR.Length; i++)
            {
                if (this.GetColor().Equals(COLOR[i])){
                    return i; // found it
                }
            }

            return -1; // this is a unique color
        }