예제 #1
0
    void TaskOnClick()
    {
        if (gameOver)
        {
            SceneManager.LoadScene("brian");
            return;
        }

        List <ItemDB.Item> items    = itemDB.GetGameItems();
        List <string>      itemStrs = new List <string>();

        foreach (ItemDB.Item item in items)
        {
            itemStrs.Add(item.name);
        }

        string cleaned = censor.CleanMessage(inputField.text, itemStrs);

        playerDB.SetMessage(cleaned);

        gameObject.SetActive(false);
        passToPanel.SetActive(true);
    }