Ejemplo n.º 1
0
    void Start()
    {
        availableBlocks   = Resources.LoadAll("Prefabs/Blocks/", typeof(GameObject));
        availableProps    = Resources.LoadAll("Prefabs/Props/", typeof(GameObject));
        availableEntities = Resources.LoadAll("Prefabs/Entities/", typeof(GameObject));
        selectedObject    = availableBlocks[0] as GameObject;

        workLayer = CompositionPlane.Foreground;
        gridEditor.LoadEditor();
        roomManager.LoadManager();

        gridEditor.InitGrid(size);
        roomManager.NewRoom(size);

        ChangePlane(workLayer);


        //GUI
        selStrings = new string[availableBlocks.Length];
        for (int i = 0; i < availableBlocks.Length; i++)
        {
            selStrings[i] = availableBlocks[i].name;
        }
    }
Ejemplo n.º 2
0
 void ChangePlane(CompositionPlane plane)
 {
     workLayer = plane;
     gridEditor.cell_Container.transform.position = new Vector3(0f, 0f, (float)workLayer);
 }