Example #1
0
 // Token: 0x06000494 RID: 1172 RVA: 0x00012520 File Offset: 0x00010720
 static ColorCatalog()
 {
     ColorCatalog.indexToColor32[1]  = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue);
     ColorCatalog.indexToColor32[2]  = new Color32(119, byte.MaxValue, 23, byte.MaxValue);
     ColorCatalog.indexToColor32[3]  = new Color32(231, 84, 58, byte.MaxValue);
     ColorCatalog.indexToColor32[4]  = new Color32(48, 127, byte.MaxValue, byte.MaxValue);
     ColorCatalog.indexToColor32[5]  = new Color32(byte.MaxValue, 128, 0, byte.MaxValue);
     ColorCatalog.indexToColor32[6]  = new Color32(235, 232, 122, byte.MaxValue);
     ColorCatalog.indexToColor32[7]  = new Color32(231, 84, 58, byte.MaxValue);
     ColorCatalog.indexToColor32[8]  = new Color32(239, 235, 26, byte.MaxValue);
     ColorCatalog.indexToColor32[9]  = new Color32(206, 41, 41, byte.MaxValue);
     ColorCatalog.indexToColor32[10] = new Color32(100, 100, 100, byte.MaxValue);
     ColorCatalog.indexToColor32[11] = Color32.Lerp(new Color32(142, 56, 206, byte.MaxValue), new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue), 0.575f);
     ColorCatalog.indexToColor32[12] = new Color32(198, 173, 250, byte.MaxValue);
     ColorCatalog.indexToColor32[13] = Color.yellow;
     ColorCatalog.indexToColor32[14] = new Color32(byte.MaxValue, 0, byte.MaxValue, byte.MaxValue);
     ColorCatalog.indexToColor32[15] = new Color32(106, 170, 95, byte.MaxValue);
     ColorCatalog.indexToColor32[16] = new Color32(173, 117, 80, byte.MaxValue);
     ColorCatalog.indexToColor32[17] = new Color32(142, 49, 49, byte.MaxValue);
     ColorCatalog.indexToColor32[18] = new Color32(193, 193, 193, byte.MaxValue);
     ColorCatalog.indexToColor32[19] = new Color32(88, 149, 88, byte.MaxValue);
     ColorCatalog.indexToColor32[20] = new Color32(142, 49, 49, byte.MaxValue);
     ColorCatalog.indexToColor32[21] = new Color32(76, 84, 144, byte.MaxValue);
     ColorCatalog.indexToColor32[22] = new Color32(189, 180, 60, byte.MaxValue);
     ColorCatalog.indexToColor32[23] = new Color32(200, 80, 0, byte.MaxValue);
     for (ColorCatalog.ColorIndex colorIndex = ColorCatalog.ColorIndex.None; colorIndex < ColorCatalog.ColorIndex.Count; colorIndex++)
     {
         ColorCatalog.indexToHexString[(int)colorIndex] = Util.RGBToHex(ColorCatalog.indexToColor32[(int)colorIndex]);
     }
 }
Example #2
0
        public CustomEquipment(string name, string nameToken,
                               string descriptionToken, string loreToken,
                               string pickupToken,
                               Sprite pickupIconSprite, GameObject pickupModelPrefab,
                               float cooldown,
                               bool canDrop,
                               bool enigmaCompatible,
                               bool isBoss, bool isLunar,
                               BuffDef passiveBuffDef,
                               UnlockableDef unlockableDef,
                               ColorCatalog.ColorIndex colorIndex   = ColorCatalog.ColorIndex.Equipment,
                               bool appearsInMultiPlayer            = true, bool appearsInSinglePlayer = true,
                               ItemDisplayRuleDict?itemDisplayRules = null)
        {
            EquipmentDef = ScriptableObject.CreateInstance <EquipmentDef>();
            EquipmentDef.appearsInMultiPlayer  = appearsInMultiPlayer;
            EquipmentDef.appearsInSinglePlayer = appearsInSinglePlayer;
            EquipmentDef.canDrop           = canDrop;
            EquipmentDef.colorIndex        = colorIndex;
            EquipmentDef.cooldown          = cooldown;
            EquipmentDef.descriptionToken  = descriptionToken;
            EquipmentDef.enigmaCompatible  = enigmaCompatible;
            EquipmentDef.isBoss            = isBoss;
            EquipmentDef.isLunar           = isLunar;
            EquipmentDef.loreToken         = loreToken;
            EquipmentDef.name              = name;
            EquipmentDef.nameToken         = nameToken;
            EquipmentDef.passiveBuffDef    = passiveBuffDef;
            EquipmentDef.pickupIconSprite  = pickupIconSprite;
            EquipmentDef.pickupModelPrefab = pickupModelPrefab;
            EquipmentDef.pickupToken       = pickupToken;
            EquipmentDef.unlockableDef     = unlockableDef;

            ItemDisplayRules = itemDisplayRules;
        }
Example #3
0
 // Token: 0x06000496 RID: 1174 RVA: 0x00012909 File Offset: 0x00010B09
 public static string GetColorHexString(ColorCatalog.ColorIndex colorIndex)
 {
     if (colorIndex < ColorCatalog.ColorIndex.None || colorIndex >= ColorCatalog.ColorIndex.Count)
     {
         colorIndex = ColorCatalog.ColorIndex.Error;
     }
     return(ColorCatalog.indexToHexString[(int)colorIndex]);
 }
Example #4
0
 // Token: 0x06000495 RID: 1173 RVA: 0x000128EF File Offset: 0x00010AEF
 public static Color32 GetColor(ColorCatalog.ColorIndex colorIndex)
 {
     if (colorIndex < ColorCatalog.ColorIndex.None || colorIndex >= ColorCatalog.ColorIndex.Count)
     {
         colorIndex = ColorCatalog.ColorIndex.Error;
     }
     return(ColorCatalog.indexToColor32[(int)colorIndex]);
 }
Example #5
0
        // Token: 0x06001D49 RID: 7497 RVA: 0x00088840 File Offset: 0x00086A40
        private void Start()
        {
            ItemDef itemDef = ItemCatalog.GetItemDef((ItemIndex)(base.GetComponent <EffectComponent>().effectData.genericUInt - 1u));

            ColorCatalog.ColorIndex colorIndex = ColorCatalog.ColorIndex.Error;
            Sprite sprite = null;

            if (itemDef != null)
            {
                colorIndex = itemDef.colorIndex;
                sprite     = itemDef.pickupIconSprite;
            }
            this.trailToColor.endColor     = (this.trailToColor.startColor = ColorCatalog.GetColor(colorIndex));
            this.iconSpriteRenderer.sprite = sprite;
        }
Example #6
0
 public static void SendColored(string?message, ColorCatalog.ColorIndex color, string?messageFrom)
 {
     SendColored(message, ColorCatalog.GetColorHexString(color), messageFrom);
 }
Example #7
0
 public static string Color(this string str, ColorCatalog.ColorIndex color)
 {
     return(str.Color(color.ToHex()));
 }
Example #8
0
 public static string ToHex(this ColorCatalog.ColorIndex colorIndex, bool excludeSymbol = false)
 {
     return((excludeSymbol ? "" : "#") + ColorCatalog.GetColorHexString(colorIndex));
 }
Example #9
0
 public static void SendColored(string message, ColorCatalog.ColorIndex color)
 {
     SendColored(message, ColorCatalog.GetColorHexString(color));
 }