Example #1
0
 private void Start()
 {
     rabish           = new CropProperty();
     rabish.CropID    = 1;
     rabish.CropName  = "萝卜";
     rabish.CropCount = 10;
 }
Example #2
0
 public void CheckCrops(int level, CropProperty cp)
 {
     if (level == cropCount)
     {
         return;
     }
     for (int i = 0; i < content.childCount; i++)
     {
         Destroy(content.GetChild(i).gameObject);
     }
     for (int i = 0; i < level; i++)
     {
         GameObject go = Instantiate(CropPFB, content);
         go.GetComponent <CropSlot>().SetCropSlot(cp);
     }
 }
Example #3
0
 public void SetCropSlot(CropProperty cp)
 {
     CropName.text  = cp.CropName;
     CropCount.text = string.Format("{0}个/天", cp.CropCount.ToString());
     //image;
 }