public void Accept() { FindObjectOfType <Seller>().Sell(RecipeSelector.recipeHolderSelected.recipe, invoice); RecipeSelector.UnSelectRecipe(); Hide(); }
private void CloseSale() { GameController.instance.IsGameSceneEnabled = true; GameController.instance.time.UnPause(); RecipeSelector.UnSelectRecipe(); EventManager.StopListening("OnRecipeRemove", view.RemoveCheckmarks); view.cancelBtn.gameObject.SetActive(true); view.gameObject.SetActive(false); }
public void SetDescription() { if (!CompareTag("Basic")) { if (!GameController.instance.crafter.view.gameObject.activeInHierarchy) { RecipeSelector.UnSelectRecipe(); } descriptionPanel.SetPanel(recipe, this); } }
public override void Hide() { if (!gameObject.activeInHierarchy) { return; } RecipeSelector.UnSelectRecipe(); GameController.instance.IsGameSceneEnabled = true; GameController.instance.time.UnPause(); EventManager.StopListening("OnRecipeRemove", ResetBar); anim.Play("Laboratory_Disappear"); }
public void OnPointerDown(PointerEventData eventData) { if (dragger != null) { return; } ClearDescription(); SetDescription(); if (!GameController.instance.crafter.view.gameObject.activeInHierarchy) { RecipeSelector.UnSelectRecipe(); } }
public void SaleOn(Area area, int transferCost) { this.area = area; this.transferCost = transferCost; view.gameObject.SetActive(true); view.SetViewToArea(area); EventManager.StartListening("OnRecipeRemove", view.RemoveCheckmarks); GameController.instance.time.Pause(); RecipeSelector.UnSelectRecipe(); GameController.instance.IsGameSceneEnabled = false; ListPopulator.PopulateRecipeList(view.recipeView, view.recipePrefab, GameController.instance.player.inventory.recipes.Where(x => x.GetDeathRating() <= area.deathRatingAllowed && GameController.instance.player.inventory.GetQuantity(x.description.Name) > 0).ToList()); if (!tutorial.isTutorialCompleted) { tutorial.ContinueTutorial(); } if (!GameController.instance.generalTutorial.isTutorialCompleted) { view.returnBtn.gameObject.SetActive(false); } }