コード例 #1
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetKey(KeyCode.Return))
     {
         inputField.gameObject.SetActive(false);
         if (inputField.text != "")
         {
             text.text = "";
             replyPanel.SetActive(true);
             //判定
             feel = Feel.Get(inputField.text);
             faceChanger.faceChange(feel);
             if (feel == 2)
             {
                 RenderSettings.skybox = sunny;
                 FileStr.InputStr(inputField.text);
             }
             else if (feel == 1)
             {
                 RenderSettings.skybox                     = rain;
                 rain2D.RainScript.RainIntensity           = 0.5f;
                 rain2D.RainScript.WindSoundVolumeModifier = 0.5f;
             }
             StartCoroutine(Chat());
             inputField.text = "";
         }
         topreturn.gameObject.SetActive(true);
     }
 }
コード例 #2
0
    /// <summary>
    /// Log出力用メソッド
    /// 入力値を取得してLogに出力し、初期化
    /// </summary>


    public void InputLogger()
    {
        string inputValue = inputField.text;

        if (inputValue.Length >= 2)
        {
            int pn = Feel.Get(inputValue);
            //if(pn==2)FileStr.InputStr(inputValue + "@" + pn);
            //Only Positive & Sentence
            if (pn == 2)
            {
                FileStr.InputStr(inputValue);
            }
        }
        //  Debug.Log(inputValue);


        InitInputField();
    }