Esempio n. 1
0
 IEnumerator PassResources()
 {
     Debug.Log("Passing resources brickyard -> storehouse");
     currentResources -= producedResources;
     while (timeSinceLastPass < passProductTime)
     {
         timeSinceLastPass += Time.deltaTime;
         passProgress       = timeSinceLastPass / passProductTime;
         yield return(null);
     }
     timeSinceLastPass = 0f;
     passProgress      = timeSinceLastPass / passProductTime;
     nextInChain.AddResourcess(producedResources);
 }
Esempio n. 2
0
 IEnumerator PassResources()
 {
     Debug.Log("Passing resources sawmill -> storehouse");
     currentResources -= producedResources;
     while (timeSinceLastPass < passProductTime)
     {
         timeSinceLastPass += Time.deltaTime;
         passProgress       = timeSinceLastPass / passProductTime;
         AssignCarrierDestination();
         yield return(null);
     }
     timeSinceLastPass = 0f;
     passProgress      = timeSinceLastPass / passProductTime;
     nextInChain.AddResourcess(producedResources);
 }
Esempio n. 3
0
 IEnumerator PassResources()
 {
     carrier.MoveToDestination(passProductTime);
     Debug.Log("Passing resources stone mine -> storehouse");
     currentResources -= producedResources;
     while (timeSinceLastPass < passProductTime)
     {
         timeSinceLastPass += Time.deltaTime;
         passProgress       = timeSinceLastPass / passProductTime;
         yield return(null);
     }
     timeSinceLastPass = 0f;
     passProgress      = timeSinceLastPass / passProductTime;
     nextInChain.AddResourcess(producedResources);
 }