Пример #1
0
    void ChangeStatus(int val)
    {
        string[] paramStr = { "", "温度", "空気", "重力", "質量" };
        state = (MAIN_PARA_ID)((int)(state + 1) % (int)MAIN_PARA_ID.MAXID);

        GetComponent <Renderer>().material.color = colerPattern[(int)state];
        myText.text = paramStr[(int)state];
    }
Пример #2
0
    void StatusCheck()
    {
        for (int i = 0; i < planet_num; i++)
        {
            MAIN_PARA_ID id = (MAIN_PARA_ID)planet[i].GetComponent <PlanetStatusChange>().GetState();
            planetStatus[(int)id]++;
        }


        for (int i = 0; i < (int)MAIN_PARA_ID.MAXID; i++)
        {
            PlayerPrefs.SetInt("Data0MainPara" + mainParamName[i], planetStatus[i]);
        }
    }
Пример #3
0
    public void SetParam(int mParam, int sParam)
    {
        mainParam = (MAIN_PARA_ID)mParam;
        subParam  = (SAB_PARA_ID)sParam;

        string[] mpStr = { "normal", "tempe", "air", "grav", "mass" };
        string[] spStr = { "water", "elec", "pois", "metal" }; //,"subnormal???" };

        Debug.Log((int)mainParam + ":" + (int)subParam);
        Debug.Log(mpStr[(int)mainParam] + ":" + spStr[(int)subParam]);

        gameObject.GetComponent <Renderer>().material.color = colerPattern[(int)mainParam];

        GameObject a = Instantiate(iconPrefab[(int)subParam], gameObject.transform);

        a.transform.parent         = gameObject.transform;
        a.transform.localPosition  = new Vector3(0, -0, -0);
        a.transform.localPosition += new Vector3(0.0f, -0.0f, -0.015f);
    }