예제 #1
0
    // Use this for initialization
    void Awak()
    {
        DeserializedLevelsLoader d = new DeserializedLevelsLoader( );

        if (SceneManager.GetActiveScene().name == "stage1")
        {
            d.generateItems("Levels");
            return;
            //PauseController.RestartScene = 1;
        }
        if (SceneManager.GetActiveScene().name == "stage2")
        {
            d.generateItems("Levels2");
            return;
            //PauseController.RestartScene = 2;
        }
    }
예제 #2
0
 // Use this for initialization
 void Start()
 {
     if (loadName.Length > 0)
     {
         DeserializedLevelsLoader load = new DeserializedLevelsLoader( );
         load.generateItems(loadName);
     }
 }
예제 #3
0
    void OnGUI()
    {
        // create DeserializedLevelsLoader, Saver and CrossChecker instances
        init();

        // Import section
        GUILayout.Label("Import", EditorStyles.boldLabel);
        GUILayout.Label("Import Levels.xml into the scene");

        if (GUILayout.Button("Import Levels.xml"))
        {
            deserializedLevelsLoader.generateItems();
        }


        // Export section
        GUILayout.Label("Export", EditorStyles.boldLabel);
        GUILayout.Label("Export children of \"" + exportGOName + "\" GameObject into " + exportGOName + ".xml", EditorStyles.wordWrappedLabel);
        if (GUILayout.Button("Export " + exportGOName))
        {
            deserializedLevelsSaver.saveExportItems();
        }


        // Delete section
        GUILayout.Label("Delete", EditorStyles.boldLabel);
        GUILayout.Label("Delete " + importGOName + " and " + exportGOName + " GameObjects from scene", EditorStyles.wordWrappedLabel);
        if (GUILayout.Button("Delete"))
        {
            DestroyImmediate(GameObject.Find(importGOName));
            DestroyImmediate(GameObject.Find(exportGOName));
        }


        // Cross check section
        GUILayout.Label("Cross Check", EditorStyles.boldLabel);
        GUILayout.Label("Cross check /Resources/Prefabs and Levels.xml if there are any item prefabs that exist only in one but not the other", EditorStyles.wordWrappedLabel);
        if (GUILayout.Button("Cross Check"))
        {
            deserializedLevelsCrossChecker.crossCheck();
        }
    }
예제 #4
0
    void Start()
    {
        DeserializedLevelsLoader d = new DeserializedLevelsLoader();

        d.generateItems();
    }
예제 #5
0
 void Start()
 {
     DeserializedLevelsLoader d = new DeserializedLevelsLoader();
     d.generateItems();
 }