Exemplo n.º 1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="parent">A reference to your plugin, also used to uniquely identify the upgrade in save files</param>
 /// <param name="kind">What kind of plot item this upgrade is for; Coop, Silo, Corral, Pond, Garden, etc.</param>
 /// <param name="id">A string that will be used to uniquely identify this upgrade in save files</param>
 /// <param name="cost">How many credits the upgrade costs</param>
 /// <param name="name">The title text for the upgrade when shown in the kiosk</param>
 /// <param name="desc">The description text for the upgrade when shown in the kiosk</param>
 /// <param name="function">Function that applies the upgrade's effects.</param>
 /// <param name="remove_func">Function to remove the upgrade's effects.</param>
 /// <param name="icon">An icon used to represent the upgrade when shown in the kiosk</param>
 /// <param name="preview">The preview image to show in the upgrade kiosk</param>
 public PlotUpgrade(Plugin parent, LandPlot.Id kind, string id, int cost, string name, string desc, Action <GameObject> function, Action <LandPlot> remove_func, Texture2D icon, Texture2D preview) : base(parent, id, cost, name, desc, function, icon, preview)
 {
     Kind             = kind;
     removal_function = remove_func;
     Upgrades.Register(this);
 }
Exemplo n.º 2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="parent">A reference to your plugin, also used to uniquely identify the upgrade in save files</param>
 /// <param name="id">A string that will be used to uniquely identify this upgrade in save files</param>
 /// <param name="cost">How many credits the upgrade costs</param>
 /// <param name="name">The title text for the upgrade when shown in the upgrade kiosk</param>
 /// <param name="desc">The description text for the upgrade when shown in the upgrade kiosk</param>
 /// <param name="function">Function that applies the upgrade's effects.</param>
 /// <param name="icon">An icon used to represent the plugin when shown in the upgrade kiosk</param>
 /// <param name="preview">The preview image to show in the upgrade kiosk</param>
 public PlayerUpgrade(Plugin parent, string id, int cost, string name, string desc, Action <GameObject> function, Texture2D icon, Texture2D preview) : base(parent, id, cost, name, desc, function, icon, preview)
 {
     Upgrades.Register(this);
 }