Giter Site home page Giter Site logo

File loading/saving system about cursedsummit HOT 2 OPEN

wedounity avatar wedounity commented on September 16, 2024
File loading/saving system

from cursedsummit.

Comments (2)

ChrisViral avatar ChrisViral commented on September 16, 2024

Okay, so havent mentioned it in commits, but in b66178a and 6952072, the loading implementation has been finished.

I might want to come up with solid documentation on how to use it, but the idea is to implement either ILoader<T>, or IJsonLoader<T>, then fill out the interface information. the LoadAll(List<FileInfo> files) should be a loading coroutine, running one file after the other, and saving it to the Objects list. For Json files, I also loads them into Files, a path => objects[] dictiontary.

For loaders to work, all that is to do is create a class overriding ILoader fields. The GameLoader scans the loaded types and creates instance of each ILoader and IJsonLoader implementation and runs them accordingly.

For general usage, JsonLoader<T> already exists, and inheriting it to override the extension and name should be enough.

I should probably come up with a different way to store data however, as well as switch to local path in saved path, and create a JsonLoader<T> equivalent for non Json files

from cursedsummit.

ChrisViral avatar ChrisViral commented on September 16, 2024

Okay, set up a custom data structure system through the LoaderList and JsonLoaderList in c6c24bb, and implemented Loader<T> in 338add7. Now I should only have to setup local paths, and hooks to the loading bar.

from cursedsummit.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.