Exemple #1
0
    void OnGUI()
    {
        int  oldIndex = index;
        Rect position = new Rect(0, 0, 180, Screen.height);

        index = DrawList(position, index, blockSetList, ref scrollPosition);

        if (index != oldIndex)
        {
            viewer.SetBlockSet(blockSetList[index]);
        }

        GUILayout.BeginArea(new Rect(0, 0, Screen.width, Screen.height));
        GUILayout.FlexibleSpace();
        GUILayout.BeginHorizontal();
        GUILayout.FlexibleSpace();
        if (GUILayout.Button("Back"))
        {
            Application.LoadLevel("MainMenu");
        }
        GUILayout.FlexibleSpace();
        GUILayout.EndHorizontal();
        GUILayout.EndArea();
    }
Exemple #2
0
 void Start()
 {
     viewer = GetComponent <BlockSetViewer>();
     viewer.SetBlockSet(blockSetList[index]);
 }