public override void Action() { if (react != null) { react.Do(); } gameObject.SetActive(false); GameManager.Instance.inventory.AddItem(gameObject.GetComponent <GameItem>()); }
public virtual void Action() { GameManager.Instance.playerController.Flip(faceRight); if (itemDialog.neededItem != GameManager.Instance.chosenItem && GameManager.Instance.chosenItem != GameItem.ItemType.None) { GameManager.Instance.ResetSelectedItem(false); ReactionAssets.Instance.GetNotMatchItemReaction().Do(); return; } if (IsNoNeedToDialog()) { afterGettingItemReaction.Do(); return; } DialogueManager.Instance.SetDialogue(GetNextDialog()); DialogueManager.Instance.SetCameraPosition(cameraPosition, camSize); StartCoroutine(DialogueManager.Instance.StartDialogue()); }