Esempio n. 1
0
    /// <summary>
    /// 初期化
    /// </summary>
    /// <param name="onEnded"></param>
    public static void Initialize(Action onEnded)
    {
        if (msInstance != null)
        {
            onEnded();
            return;
        }
        msInstance = new MasterDataManager();

        TaskManager.ITaskGroup group = TaskManager.Instance.CreateAsyncTaskGroup();
        foreach (var type in mMasterTypeList)
        {
            Type t = type;
            group.AddTask(onTaskEnded => {
                msInstance.LoadMasterData(t, onTaskEnded);
            });
        }
        group.Run(onEnded);
    }
Esempio n. 2
0
    /// <summary>
    /// 初期化開始処理
    /// </summary>
    void Start()
    {
        DontDestroyOnLoad(gameObject);

        // 各種初期化
        TaskManager.ITaskGroup group = TaskManager.Instance.CreateSyncTaskGroup();

        AssetBundleLoader.Instance.Initialize();

        group.AddTask(onTaskEnded => {
            MasterDataManager.Initialize(onTaskEnded);
        });

        group.Run(() => {
            // セーブデータロード
            SaveData.Initialize();

            mInitialized = true;
            SceneManager.LoadScene("CharaTest");
        });
    }