Exemplo n.º 1
0
        public static Backdrop LoadCustomBackdrop(BinaryPacker.Element child, BinaryPacker.Element above, MapData map)
        {
            Backdrop backdropFromMod = Everest.Events.Level.LoadBackdrop(map, child, above);

            if (backdropFromMod != null)
            {
                return(backdropFromMod);
            }

            if (child.Name.Equals("rain", StringComparison.OrdinalIgnoreCase))
            {
                patch_RainFG rain = new patch_RainFG();
                if (child.HasAttr("color"))
                {
                    rain.Color = Calc.HexToColor(child.Attr("color"));
                }
                return(rain);
            }

            return(null);
        }
Exemplo n.º 2
0
 private static Color _GetColor(string orig, patch_RainFG self)
 {
     return(self.Color ?? Calc.HexToColor(orig));
 }