Exemple #1
0
        private void AutoloadWaterfallStyle(Type type)
        {
            ModWaterfallStyle waterfallStyle = (ModWaterfallStyle)Activator.CreateInstance(type);

            waterfallStyle.mod = this;
            string name    = type.Name;
            string texture = (type.Namespace + "." + type.Name).Replace('.', '/');

            if (waterfallStyle.Autoload(ref name, ref texture))
            {
                AddWaterfallStyle(name, waterfallStyle, texture);
            }
        }
Exemple #2
0
		public void AddWaterfallStyle(string name, ModWaterfallStyle waterfallStyle, string texture)
		{
			int slot = WaterfallStyleLoader.ReserveStyle();
			waterfallStyle.mod = this;
			waterfallStyle.Name = name;
			waterfallStyle.Type = slot;
			waterfallStyle.texture = texture;
			waterfallStyles[name] = waterfallStyle;
			WaterfallStyleLoader.waterfallStyles.Add(waterfallStyle);
		}