Exemple #1
0
 private void TryCraftItem()
 {
     if (!CraftStarted && CraftActions.Craft(this, Recipe))
     {
         CraftStarted = true;
         _precentage  = FactorioTimer.SubscribeAction(CraftActions.CalculateCraftTime(_craftingSpeed, Recipe), CraftItem);
         if (OnCraftBegin != null)
         {
             OnCraftBegin?.Invoke(this);
         }
     }
 }
Exemple #2
0
 public override void PostUpdate()
 {
     base.PostUpdate();
     FactorioTimer.Tick();
 }