RecipePlugin.PostCraftState
Declaration#
public virtual void PostCraftState(GDTKRecipe recipe, Boolean& complete)Parameters#
| Name | Description |
|---|---|
| recipe | Recipe crafted |
| complete | Referenced 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(); } } }
}