Skip to main content

RecipePlugin.PostCraftState

Declaration#

public virtual void PostCraftState(GDTKRecipe recipe, Boolean& complete)

Parameters#

NameDescription
recipeRecipe crafted
completeReferenced value that must be true when action is completed

Description#

Perform actions after crafting is complete

Usage#

using NullSave.GDTK.Inventory;using System.Collections;using UnityEngine;
public class Example : MonoBehaviour{
    public void ExampleMethod(GDTKRecipe target)    {        StartCoroutine(HandlePlugins(target));    }
    private IEnumerator HandlePlugins(GDTKRecipe target)    {        bool complete = false;        foreach (RecipePlugin plugin in target.plugins)        {            complete = true;            plugin.PostCraftState(target, ref complete);            while(!complete)            {                yield return new WaitForEndOfFrame();            }        }    }
}