示例#1
0
    public void AddToFoodCrafter()
    {
        itemObj = transform.GetChild(0).gameObject;
        FoodDisplay display = itemObj.GetComponent <FoodDisplay>();

        FoodCrafter.instance.AddItem(display.food, slot);
    }
示例#2
0
 // Use this for initialization
 void Start()
 {
     instance = this;
     Debug.Assert(null != text_food);
     Debug.Assert(null != text_foodEaten);
     Debug.Assert(null != text_expense);
     Debug.Assert(null != template_movingText);
     Debug.Assert(null != container_movingText);
 }
示例#3
0
 // Use this for initialization
 void Start()
 {
     instance = this;
     Debug.Assert(null != text_food);
     Debug.Assert(null != text_foodEaten);
     Debug.Assert(null != text_expense);
     Debug.Assert(null != template_movingText);
     Debug.Assert(null != container_movingText);
 }
示例#4
0
    public void AveragePerish(FoodDisplay fd)
    {
        float averagePerish = (perishTime * amount + (fd.perishTime * fd.amount)) / (amount + fd.amount);

        perishTime = averagePerish;
    }