Exemplo n.º 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);
         }
     }
 }
Exemplo n.º 2
0
 public override void PostUpdate()
 {
     base.PostUpdate();
     FactorioTimer.Tick();
 }