tModLoader v0.11.8.9
A mod to make and play Terraria mods
Terraria.ModLoader.IO.ColorSerializer Class Reference
+ Inheritance diagram for Terraria.ModLoader.IO.ColorSerializer:
+ Collaboration diagram for Terraria.ModLoader.IO.ColorSerializer:

Public Member Functions

override Color Deserialize (int tag)
 
override int Serialize (Color value)
 
- Public Member Functions inherited from Terraria.ModLoader.IO.TagSerializer< Color, int >
abstract object Deserialize (object tag)
 
override object Deserialize (object tag)
 
abstract T Deserialize (S tag)
 
abstract IList DeserializeList (IList value)
 
override IList DeserializeList (IList value)
 
abstract object Serialize (object value)
 
override object Serialize (object value)
 
abstract S Serialize (T value)
 
abstract IList SerializeList (IList value)
 
override IList SerializeList (IList value)
 

Additional Inherited Members

- Static Public Member Functions inherited from Terraria.ModLoader.IO.TagSerializer< Color, int >
static void AddSerializer (TagSerializer serializer)
 
static Type GetType (string name)
 
static bool TryGetSerializer (Type type, out TagSerializer serializer)
 
- Properties inherited from Terraria.ModLoader.IO.TagSerializer< Color, int >
abstract Type TagType [get]
 
override Type TagType [get]
 
abstract Type Type [get]
 
override Type Type [get]
 

Detailed Description

Definition at line 146 of file TagSerializer.cs.

Member Function Documentation

◆ Deserialize()

override Color Terraria.ModLoader.IO.ColorSerializer.Deserialize ( int  tag)

Definition at line 152 of file TagSerializer.cs.

152 {
153 return new Color(tag & 0xFF, tag >> 8 & 0xFF, tag >> 16 & 0xFF, tag >> 24 & 0xFF);
154 }

◆ Serialize()

override int Terraria.ModLoader.IO.ColorSerializer.Serialize ( Color  value)

Definition at line 148 of file TagSerializer.cs.

148 {
149 return (int)value.PackedValue;
150 }