示例#1
0
    public void Accept()
    {
        FindObjectOfType <Seller>().Sell(RecipeSelector.recipeHolderSelected.recipe, invoice);

        RecipeSelector.UnSelectRecipe();
        Hide();
    }
示例#2
0
 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);
 }
示例#3
0
 public void SetDescription()
 {
     if (!CompareTag("Basic"))
     {
         if (!GameController.instance.crafter.view.gameObject.activeInHierarchy)
         {
             RecipeSelector.UnSelectRecipe();
         }
         descriptionPanel.SetPanel(recipe, this);
     }
 }
示例#4
0
 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");
 }
示例#5
0
 public void OnPointerDown(PointerEventData eventData)
 {
     if (dragger != null)
     {
         return;
     }
     ClearDescription();
     SetDescription();
     if (!GameController.instance.crafter.view.gameObject.activeInHierarchy)
     {
         RecipeSelector.UnSelectRecipe();
     }
 }
示例#6
0
 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);
     }
 }