Esempio n. 1
0
    private void LoadIcon(MetaLoader metaLoader)
    {
        System.Diagnostics.Stopwatch stopwatch = new System.Diagnostics.Stopwatch();
        stopwatch.Start();
        var t = metaLoader.LoadThumbnail();

        m_thumbnail.texture = t;
        stopwatch.Stop();
        Debug.Log("LoadThumbnail: " + (float)stopwatch.Elapsed.TotalSeconds + " sec");
    }
Esempio n. 2
0
    private void LoadMeta(string file)
    {
        var bytes      = File.ReadAllBytes(file);
        var metaLoader = new MetaLoader(bytes);
        var meta       = metaLoader.Read(true);

        var go   = Instantiate(_cardPrefab, transform);
        var card = go.GetComponent <CharacterCard>();

        card.SetMetaText(meta);
        card.SetThumbnail(meta.Thumbnail);
    }
Esempio n. 3
0
    //public GameplayController gameplayController;
    #endregion


    #region public methods
    //public void LoadLevel()
    //{
    //    gameRunnig = true;
    //    ViewController.Instance.OpenView(Views.GamePlay);
    //}

    public void LoadGameData()
    {
        if (MetaLoader.LoadData())
        {
            currentLevel = DatabaseManager.GetInt("current_level", 1);
            GameplayController.Instance.LoadLevel();
        }
        else
        {
            Debug.LogError("Meta Loading Failed");
        }
    }
Esempio n. 4
0
    private void LoadMeta(string file)
    {
        System.Diagnostics.Stopwatch stopwatch = new System.Diagnostics.Stopwatch();
        stopwatch.Start();
        var bytes      = File.ReadAllBytes(file);
        var metaLoader = new MetaLoader(bytes);
        var meta       = metaLoader.Read(true);

        stopwatch.Stop();
        Debug.Log("LoadTime: " + (float)stopwatch.Elapsed.TotalSeconds + " sec");

        var go   = Instantiate(_cardPrefab, transform);
        var card = go.GetComponent <CharacterCard>();

        card.SetMetaText(meta);
        card.SetThumbnail(meta.Thumbnail);
    }
Esempio n. 5
0
    void Start()
    {
        System.Diagnostics.Stopwatch stopwatch = new System.Diagnostics.Stopwatch();

        stopwatch.Start();
        const string path  = "AliciaSolid_1.10.vrm";
        var          bytes = File.ReadAllBytes(path);

        stopwatch.Stop();
        Debug.Log("ReadAllBytes: " + (float)stopwatch.Elapsed.TotalSeconds + " sec");

        stopwatch.Restart();
        using (var metaLoader = new MetaLoader(bytes))
        {
            var meta = metaLoader.Read();
            stopwatch.Stop();
            Debug.Log("QuickMetaLoader: " + (float)stopwatch.Elapsed.TotalSeconds + " sec");

            ViewMeta(meta);
            LoadIcon(metaLoader);
        }

        stopwatch.Restart();
        using (var jobMetaLoader = new JobMetaLoader(path))
        {
            var meta = jobMetaLoader.Read();
            stopwatch.Stop();
            Debug.Log("JobMetaLoader: " + (float)stopwatch.Elapsed.TotalSeconds + " sec");

            ViewMeta(meta);
            LoadIconJob(jobMetaLoader, meta);
        }
        stopwatch.Stop();

        stopwatch.Restart();
        var context = new VRMImporterContext();

        context.ParseGlb(bytes);
        stopwatch.Stop();
        Debug.Log("VRM ParseGlb: " + (float)stopwatch.Elapsed.TotalSeconds + " sec");

        stopwatch.Restart();
        context.ReadMeta(true);
        stopwatch.Stop();
        Debug.Log("VRM ReadMeta: " + (float)stopwatch.Elapsed.TotalSeconds + " sec");
    }
Esempio n. 6
0
        public void LoadCart(string exeFsDir, string romFsFile = null)
        {
            if (romFsFile != null)
            {
                _device.Configuration.VirtualFileSystem.LoadRomFs(romFsFile);
            }

            LocalFileSystem codeFs = new LocalFileSystem(exeFsDir);

            MetaLoader metaData = ReadNpdm(codeFs);

            _device.Configuration.VirtualFileSystem.ModLoader.CollectMods(new[] { TitleId }, _device.Configuration.VirtualFileSystem.ModLoader.GetModsBasePath());

            if (TitleId != 0)
            {
                EnsureSaveData(new ApplicationId(TitleId));
            }

            LoadExeFs(codeFs, metaData);
        }
Esempio n. 7
0
    public void LoadMeta <T>()
    {
        Type type = typeof(T);

        if (type == typeof(FormulaMetaTable))
        {
            formulaMetaTable = MetaLoader <FormulaMetaTable> .LoadPBData(type.FullName);

            return;
        }
        if (type == typeof(AudioMetaTable))
        {
            audioMetaTable = MetaLoader <AudioMetaTable> .LoadPBData(type.FullName);

            return;
        }
        if (type == typeof(SkillMetaTable))
        {
            skillMetaTable = MetaLoader <SkillMetaTable> .LoadPBData(type.FullName);

            return;
        }
    }