void StateTransition(string inputText)
    {
        State nextState = ManageState(inputText);

        Debug.Log(inputText);
        Debug.Log(nextState);

        if (!noFail)
        {
            textToPrint = "Player: " + inputText + "\n\n";
        }
        else
        {
            textToPrint = "";
        }

        if (nextState != null)
        {
            textToPrint += nextState.GetText();
            currentState = nextState;
            currentState.SetVisited();
        }
        else
        {
            textToPrint = currentState.GetBadInputResponse();
        }

        printed = false;
    }
    IEnumerator StateStart()
    {
        currentState   = initialState;
        prompt.enabled = false;
        text.text      = "";
        textToPrint    = "";
        lastKey        = false;
        printed        = false;
        noFail         = true;
        input.text     = "";
        input.DeactivateInputField();
        printed   = true;
        inventory = (Inventory)ScriptableObject.CreateInstance("Inventory");
        inventory.Initialize();

        yield return(SlowPrint(initialState.GetText()));
    }
Example #3
0
 public static string GetParametersString(int page, State state, SortBy sort, OrderBy direction)
 {
     return(GetParametersString(page, sort, direction) + "&state=" + state.GetText());
 }
Example #4
0
 public static Parameter State(State state)
 {
     return(new Parameter("state", state.GetText()));
 }
Example #5
0
 public static Parameter State(State state)
 {
     return new Parameter("state", state.GetText());
 }
Example #6
0
 public static string GetParametersString(int page, State state, SortBy sort, OrderBy direction)
 {
     return GetParametersString(page, sort, direction) + "&state=" + state.GetText();
 }
Example #7
0
 public void RefreshText()
 {
     TextDesc.text  = CurrentState.GetText();
     TextTitle.text = CurrentState.GetTitle();
     // TextLocal.text = CurrentState.GetLocal();
 }
Example #8
0
 // Use this for initialization
 void Start()
 {
     state = startingState;
     textComponent.text = state.GetText();
 }