Exemplo n.º 1
0
 private void OnEnable()
 {
     player.DisableControls();
     player.EnableKey("interact");
     dialogue.ResetDialogue();
     dialogue.Play();
 }
Exemplo n.º 2
0
    private void OnEnable()
    {
        player.DisableControls();
        player.EnableKey("interact");

        goals.SetMyraGoal("bring_flower");

        dialogue.ResetDialogue();
        dialogue.Play();

        int j = 0;
        for (int i = 0; i < items.Length; i++)
        {
            if (inventory.FindItemInInventory(items[i].nameItem))
            {
                switch (items[i].nameItem)
                {
                    case "flower_carnation":
                        btns[j].onClick.AddListener(GiveCarnation);
                        break;
                    case "flower_gardenia":
                        btns[j].onClick.AddListener(GiveGardenia);
                        break;
                    case "flower_winterberry":
                        btns[j].onClick.AddListener(GiveWinterberry);
                        break;
                    default:
                        Debug.Log("invalid flower");
                        break;
                }
                
                btns[j].gameObject.SetActive(true);
                StartCoroutine(UpdateButtonText(btns[j], LocalizedText.GetTextDeterminatedKey(items[i].nameItem)));
                j++;
            }
        }
        anim.SetBool("OptionsActive", true);
    }