Exemple #1
0
    //SerializedProperty categoryInfos;

    private void OnEnable()
    {
        instance = (GameManager)target;
        //categoryInfos = serializedObject.FindProperty("categoryInfos");
        wordBoardCreator          = instance.GetComponent <WordBoardCreator>();
        EditorApplication.update += Update;
    }
Exemple #2
0
    private void StartCreatingBoardFiles()
    {
        // Make sure all values are set back to default
        StopCreatingBoards();

        isCreatingBoards = true;

        // Create a new GameObject in the current scene and attach a WordBoardCreator script to it
        wordBoardCreator = new GameObject("WordBoardCreator").AddComponent <WordBoardCreator>();

        // Get the total number of files
        for (int i = 0; i < gameManagerReference.CategoryInfos.Count; i++)
        {
            totalFilesToCreate += gameManagerReference.CategoryInfos[i].levelInfos.Count;
        }

        CreateBoardFile();
    }
Exemple #3
0
    private void StopCreatingBoards()
    {
        if (wordBoardCreator != null)
        {
            DestroyImmediate(wordBoardCreator.gameObject);
        }

        isCreatingBoards   = false;
        wordBoardCreator   = null;
        totalFilesToCreate = 0;
        totalFilesCreated  = 0;
        categoryIndex      = 0;
        categoryLevelIndex = 0;

        // Null out the DailyPuzzleInfo since its being saved in editor
        gameManagerReference.CategoryInfos.Remove(gameManagerReference.DailyPuzzleInfo);
        gameManagerReference.DailyPuzzleInfo = null;

        EditorUtility.ClearProgressBar();
    }