コード例 #1
0
ファイル: ResultTextMyTotal.cs プロジェクト: Hiroby1108/-
    // Start is called before the first frame update
    void Start()
    {
        ResultUI1_1 = GameObject.Find("ResultText1_1");
        Text uitext = GetComponent <Text>();

        foreach (KeyValuePair <string, int> DictKvp in PlayeGetItem.getTrashList())
        {
            mytotal = 0; valueP = 0; valueT = 0; valueG = 0; valueB = 0; valueTv = 0; valueTa = 0; num = 0; numf = 0;
            valueP  = PlayeGetItem.getTrashList()["Petbotol(Clone)"];
            valueT  = PlayeGetItem.getTrashList()["tabako(Clone)"];
            valueG  = PlayeGetItem.getTrashList()["Gyomou(Clone)"];
            valueGm = PlayeGetItem.getTrashList()["Gyomou(masuugu)(Clone)"];
            valueB  = PlayeGetItem.getTrashList()["Biniru(Clone)"];
            valueTv = PlayeGetItem.getTrashList()["Terebi(Clone)"];
            valueTa = PlayeGetItem.getTrashList()["Taiya(Clone)"];
            valueTa = PlayeGetItem.getTrashList()["Uki(Clone)"];
            mytotal = float.Parse(Convert.ToString((valueT * 0.000015f) + (valueP * 0.03f) + (valueG * 5) + (valueGm * 5) + (valueB * 0.000015f) +
                                                   (valueTv * 40) + (valueTa * 18) + (valueU * 0.019)));
            num  = (int)(mytotal * 100);
            numf = (float)num / 100f;
            Debug.Log(num);
            Debug.Log(numf);
            uitext.text = numf.ToString();
            Debug.Log(mytotal);
        }
    }
コード例 #2
0
    // Start is called before the first frame update
    void Start()
    {
        ResultUI2_52 = GameObject.Find("ResultText2_52");
        Text uitext = GetComponent <Text>();

        value = PlayeGetItem.getTrashList()["Terebi(Clone)"];
        foreach (KeyValuePair <string, int> DictKvp in PlayeGetItem.getTrashList())
        {
            uitext.text = Convert.ToString(value * 40) + "kg";
        }
    }
コード例 #3
0
ファイル: ResultTextGyomou.cs プロジェクト: Hiroby1108/-
    // Start is called before the first frame update
    void Start()
    {
        ResultUI2_32 = GameObject.Find("ResultText2_32");
        Text uitext = GetComponent <Text>();

        value  = PlayeGetItem.getTrashList()["Gyomou(Clone)"];
        value2 = PlayeGetItem.getTrashList()["Gyomou(masuugu)(Clone)"];
        foreach (KeyValuePair <string, int> DictKvp in PlayeGetItem.getTrashList())
        {
            uitext.text = Convert.ToString((value * 5) + (value2 * 5)) + "kg";
        }
    }
コード例 #4
0
ファイル: ResultPlint.cs プロジェクト: Hiroby1108/-
    // Start is called before the first frame update
    void Start()
    {
        //Debug.Log(PlayeGetItem.getLivingList());

        Debug.Log(PlayeGetItem.getTrashList());
        //Debug.Log(PlayeGetItem.getTrashList()/*["tabako"]*/);
        foreach (KeyValuePair <string, int> DictKvp in PlayeGetItem.getTrashList())
        {
            Debug.Log(DictKvp);
        }
        foreach (KeyValuePair <string, int> DictKvp in PlayeGetItem.getLivingList())
        {
            Debug.Log(DictKvp);
        }
    }
コード例 #5
0
    // Start is called before the first frame update
    void Start()
    {
        ResultUI2_22 = GameObject.Find("ResultText2_22");
        Text uitext = GetComponent <Text>();

        value = PlayeGetItem.getTrashList()["tabako(Clone)"];
        foreach (KeyValuePair <string, int> DictKvp in PlayeGetItem.getTrashList())
        {
            uitext.text = Convert.ToString(value * 0.015) + "g";
        }
        Debug.Log("↓");
        foreach (KeyValuePair <string, int> DictKvp in PlayeGetItem.getTrashList())
        {
            Debug.Log(DictKvp);
        }
    }