示例#1
0
 public RecipeProduct(RecipeProduct o)
 {
     this.name   = o.name;
     this.qtyMin = o.qtyMin;
     this.qtyMax = o.qtyMax;
     this.chance = o.chance;
     this.type   = o.type;
     SetOutput();
 }
示例#2
0
 public RecipeProduct(string name, int qtyMin, int qtyMax, float chance)
 {
     this.name   = name;
     this.qtyMin = qtyMin;
     this.qtyMax = qtyMax;
     this.chance = chance;
     if (name.StartsWith("inv::"))
     {
         this.type = RECIPE_PRODUCT_TYPE.INVENTORY_ITEM;
     }
     else if (name.StartsWith("entities::"))
     {
         this.type = RECIPE_PRODUCT_TYPE.ENTITY;
     }
     else if (name.StartsWith("money"))
     {
         this.type = RECIPE_PRODUCT_TYPE.MONEY;
     }
     //Debug.Log("product added: " + this.ToString());
 }