Exemplo n.º 1
0
    public override void Init(Action onComplete)
    {
        if (Instance != null)
        {
            Debug.Log("hmm");
        }

        VerifyArrayIntegrity();

        Instance = this;


        InitQueue queue = new InitQueue(onComplete);

        for (int i = 0; i < dataSavers.Length; i++)
        {
            if (dataSavers[i] == null)
            {
                Debug.Log("Data saver (" + ((Type)i).ToString() + ") is null.");
                continue;
            }
            dataSavers[i].Load(queue.Register());
        }
        queue.MarkEnd();
    }
Exemplo n.º 2
0
    void OnEnable()
    {
        bank      = target as DataSaverBank;
        typeNames = Enum.GetNames(typeof(DataSaverBank.Type));

        if (!bank.VerifyArrayIntegrity())
        {
            if (AssetDatabase.Contains(bank))
            {
                EditorUtility.SetDirty(bank);
            }
        }
    }
    public override void Init(Action onComplete)
    {
        if (Instance != null)
        {
            Debug.Log("hmm");
        }

        VerifyArrayIntegrity();

        Instance = this;


        InitQueue queue = new InitQueue(onComplete);

        for (int i = 0; i < dataSavers.Length; i++)
        {
            dataSavers[i].Load(queue.Register());
        }
        queue.MarkEnd();
    }