public void Show(Item recipe, List <Item> ingredients, bool sameItem = false)
        {
            ClearIngredients();

            recipeName.text  = recipe.Data.name;
            description.text = recipe.Data.Description;

            for (int i = 0; i < ingredients.Count; i++)
            {
                var ingredientObject = ingredientsList.GetChild(i).gameObject;
                ingredientObject.SetActive(true);
                ingredientObject.GetComponent <IngredientTooltip>().SetItem(ingredients[i]);
            }

            UpdateIngredientsView();

            if (!sameItem)
            {
                StartCoroutine(DelayOpen());
            }
            else
            {
                popUp.Open();
            }
        }
Exemple #2
0
        public void ShowDescription(string Description)
        {
            transform.position = new Vector2(Mathf.Clamp(Input.mousePosition.x, Screen.width * MinWidth, Screen.width * MaxWidth),
                                             Mathf.Clamp(Input.mousePosition.y, Screen.height * MinHeight, Screen.height * MaxHeight));

            PopUpScript.Open();

            statsText.text = Description;
        }
Exemple #3
0
        public void ShowTooltip(string name, string description)
        {
            transform.position = new Vector2(Mathf.Clamp(Input.mousePosition.x, Screen.width * MinWidth, Screen.width * MaxWidth),
                                             Mathf.Clamp(Input.mousePosition.y, Screen.height * MinHeight, Screen.height * MaxHeight));

            this.name.text        = name;
            this.description.text = description;

            PopUpScript.Open();
        }
Exemple #4
0
 private void Open()
 {
     popUp.Open();
 }
Exemple #5
0
 public void Open()
 {
     popUp.Open();
     _isOpen = true;
 }
Exemple #6
0
 public void ShowJobOffer(int jobTypeIndex)
 {
     UpdateJobUi(JobManager.Instance.Jobs[(JobType)jobTypeIndex]);
     anim.Open();
 }