示例#1
0
 void initInventory()
 {
     bag.addToInventory(list.getSeed(2), 5);
     bag.addToInventory(list.getSeed(3), 6);
     bag.addToInventory(list.getSeed(4), 7);
     bag.addToInventory(list.getPlant(5), 4);
     bag.addToInventory(list.getFruit(3), 2);
     bag.addToInventory(list.getTool(1));
     bag.addToInventory(list.getTool(2));
     bag.addToInventory(list.getTool(3));
 }
示例#2
0
 public void grow()
 {
     if (seed != null)
     {
         setPlant(items.getPlant(seed.getCorPlant()));
     }
     else
     {
         if (plant != null)
         {
             if (plant.getCurStage() < plant.getStages())
             {
                 plant.incCurStage(1);
             }
             else
             {
                 setFruit(items.getFruit(plant.getCorFruit()));
             }
         }
     }
 }