示例#1
0
    // Start is called before the first frame update
    void Awake()
    {
        State     = GameObject.Find("State").GetComponent <Sim_State>();
        time      = 0;
        isShowing = true;

        button_text      = button.transform.GetChild(0).gameObject.GetComponent <Text>();
        button_text.text = "Stars : On";
    }
示例#2
0
    // Start is called before the first frame update
    void Awake()
    {
        Planet = transform.GetChild(0).gameObject;
        State  = GameObject.Find("State").GetComponent <Sim_State>();

        float offset = Random.Range(0.0f, 2 * Mathf.PI);

        time += offset;

        lineRend = Planet.GetComponent <LineRenderer>();
        lineRend.positionCount = num_verts;
        line_verts             = new List <Vector3>();
        lineRend.startColor    = color;
        lineRend.endColor      = color;

        isOn             = true;
        button_text      = button.transform.GetChild(0).gameObject.GetComponent <Text>();
        button_text.text = Planet.name + " : On";
    }