/* DESC :> * 요리하는 과정 초기화 * 갈비 판매 이후, 냥이를 앉히는 과정부터 시작 */ public void Reset() { ResetGalbi(); goParents.recipe.SetActive(false); ingredients.nyang = null; cookState = ECookingState.WATING; }
/* DESC :> * 갈비를 스와이프 할 때마다, 구워짐 */ public void GalbiBaking(int count) { if (cookState != ECookingState.SWIPING) { return; } if (count <= 7) { Client.AudioManager.Play((int)FX_SOUND_TYPE.GRILL); images.galbi.sprite = resourcesManager.CreateSprite(ingredients.galbi.GetGalbiPath(count, true), new Vector2(0.5f, 0.5f)); } if (count == 7) { goParents.sauce.SetActive(true); goParents.powder.SetActive(true); cookState = ECookingState.SWIPING_END; } }
/* DESC :> * 냥이를 주문석에 앉힘 */ public void EnteredNyang(Nyang nyang) { goParents.recipe.SetActive(true); RecipeManager recipeManager = RecipeManager.getInstance; // ingredients.recipe.SetRecipe(recipeManager.GetRecipe(Random.Range(1, recipeManager.Size - 1))); int limGalbi = 5; int limSauce = 4; int limPowder = 4; if (GlobalData.getInstance.curDay >= 15) { limGalbi = IngredientManager.getInstance.GetIngredients(EIngredientType.Galbi).Count; limSauce = IngredientManager.getInstance.GetIngredients(EIngredientType.Sauce).Count; limPowder = IngredientManager.getInstance.GetIngredients(EIngredientType.Powder).Count; } // ingredients.recipe.SetRecipe(recipeManager.GetRecipe(Random.Range(1, recipeManager.Size - 1))); int idxGalbi = Random.Range(1, limGalbi); int idxSauce = Random.Range(1, limSauce); int idxPowder = Random.Range(1, limPowder); ingredients.recipe.SetRecipe(recipeManager.GetRecipe(idxGalbi, idxSauce, idxPowder)); ingredients.nyang = nyang; cookState = ECookingState.SHOW_RECIPE; seatBox.size = new Vector2(600.0f, 800.0f); if (angryGauge) { angryGauge.SetActive(true); StartCoroutine("AngryGauge"); } }
public void FailGalbi() { cookState = ECookingState.FAIL; }
/* DESC :> * 갈비, 소스, 파우더 사용 * 갈비가 존재하지 않고, 냥이가 있을때 갈비 올림 * 갈비가 존재하고, 소스 및 파우더가 사용되지 않았을 때 소스 및 파우더 사용 */ public void UseIngredient(EIngredientType type, int id) { if (GlobalData.getInstance.GetIngredientAmount(type, id) <= 0) { PopupManager.getInstance.Show(storePopup); } switch (cookState) { case ECookingState.SHOW_RECIPE: { if (type == EIngredientType.Galbi) { SetGalbi(id); cookState = ECookingState.SWIPING; GlobalData.getInstance.GetIngredient(type, id).amount--; GlobalData.getInstance.SetIngredient(type, id); // DESC :> Powder 갈비에 따른 준비 컬러값 및 좌표 goParents.sauce.transform.localPosition = saucePos[id - 1]; goParents.powder.transform.localPosition = powderPos[id - 1]; images.powder.color = powderReadyColors[id - 1]; } break; } case ECookingState.SWIPING_END: { if (type == EIngredientType.Sauce) { if (ingredients.sauce.itemID < 1) { SpreadIngredient(ingredients.sauce, id); images.sauce.color = sauceColors[id - 1]; } } if (type == EIngredientType.Powder) { if (ingredients.powder.itemID < 1) { goParents.powder.SetActive(true); SpreadIngredient(ingredients.powder, id); images.powder.color = powderColors[id - 1]; } } if (ingredients.recipe.Equals(ingredients.galbi, ingredients.sauce, ingredients.powder)) { ingredients.galbi.CookComplete(); cookState = ECookingState.COMPLETE; } break; } default: break; } }
/* DESC :> * 쓰레기통에 갈비를 버림 * 갈비를 올리는 과정부터 재시작 */ public void GarbageGalbi() { ResetGalbi(); cookState = ECookingState.SHOW_RECIPE; }
public TutorialWaitStateCompleted(InGameCookingController cooking, ECookingState _state) { cookingCtrl = cooking; state = _state; }