Add SFX and SFX logic

This commit is contained in:
BuyMyMojo 2023-03-03 05:10:23 +11:00
parent f0e4f6c9ba
commit 1aa97baff4
19 changed files with 504 additions and 8 deletions

View file

@ -8,6 +8,8 @@ public class DeliveryManager : MonoBehaviour
public event EventHandler OnRecipeSpawned;
public event EventHandler OnRecipeCompleted;
public event EventHandler OnRecipeSuccess;
public event EventHandler OnRecipeFailed;
public static DeliveryManager Instance { get; private set; }
[SerializeField] private RecipeListSO recipeListSO;
@ -80,11 +82,11 @@ public class DeliveryManager : MonoBehaviour
if (plateContentsMatchesRecipe)
{
// Player delivered correct recipe
Debug.Log("Player delivered a recipe from the waiting list!");
waitingRecipeSOList.RemoveAt(i);
OnRecipeCompleted?.Invoke(this, EventArgs.Empty);
OnRecipeSuccess?.Invoke(this, EventArgs.Empty);
return;
}
@ -94,7 +96,8 @@ public class DeliveryManager : MonoBehaviour
// No matches found!
// Player brought the wrong recipe!
Debug.Log("Player brought the wrong recipe!");
OnRecipeFailed?.Invoke(this, EventArgs.Empty);
}
public List<RecipeSO> GetWaitingRecipeSOList()