Ejemplo n.º 1
0
        public static GameObject Add(string name, PluginBase plugin, byte[] pngData, Action <GameObject> action)
        {
            PluginNameAttribute    pluginNameAttribute    = Attribute.GetCustomAttribute(plugin.GetType(), typeof(PluginNameAttribute)) as PluginNameAttribute;
            PluginVersionAttribute pluginVersionAttribute = Attribute.GetCustomAttribute(plugin.GetType(), typeof(PluginVersionAttribute)) as PluginVersionAttribute;
            string arg   = (pluginNameAttribute == null) ? plugin.Name : pluginNameAttribute.Name;
            string arg2  = (pluginVersionAttribute == null) ? string.Empty : pluginVersionAttribute.Version;
            string label = string.Format("{0} {1}", arg, arg2);

            return(Buttons.Add(name, label, pngData, action));
        }
Ejemplo n.º 2
0
 public static GameObject Add(string label, byte[] pngData, Action <GameObject> action)
 {
     return(Buttons.Add(null, label, pngData, action));
 }
Ejemplo n.º 3
0
 public static GameObject Add(PluginBase plugin, byte[] pngData, Action <GameObject> action)
 {
     return(Buttons.Add(null, plugin, pngData, action));
 }