示例#1
0
 private void StartHarvest(WorldObject worldObject)
 {
     recycleSource = worldObject;
     addMovement(recycleSource);
     //we can only collect one resource at a time, other resources are lost
     if(harvestType == ResourceType.Unknown) {
         harvestType = recycleSource.GetMainResourceType();
         SetResourceColor();
         //Debug.Log("Harvest Type" + harvestType);
         resourceStore = WorkManager.findClosestResourceStore(WorkManager.findResourceStores(harvestType,player), this.gameObject.GetComponent<Unit>());
         //Debug.Log("Resource Store" + resourceStore);
         currentLoad = 0.0f;
     }
     harvesting = false;
     recycling = true;
     emptying = false;
 }