private IEnumerator PlayAction(Data.guardians _guardian, Data.offers _offer)
    {
        guardian = _guardian;
        offer    = _offer;

        choiceManager.gameObject.SetActive(false);
        actionManager.gameObject.SetActive(true);
        actionManager.SetupAction((Data.actions)offer);

        TableActions table = DatabaseHandler.GetFromDatabaseActions((Data.actions)offer);

        textManager.SetTextArray(table.rows[0].intro);
        textManager.Next();

        while (true)
        {
            if (InputHandler.GetInput().accept)
            {
                if (textManager.textLength <= 0)
                {
                    break;
                }
                else
                {
                    textManager.Next();
                }
            }
            yield return(null);
        }

        while (textManager.isPrinting || !InputHandler.GetInput().acceptKeyDown)
        {
            yield return(null);
        }

        actionManager.ActivateAction();
    }
示例#2
0
 public void ActivateAction()
 {
     actionManager.ActivateAction(this, ActionType);
 }