TeaWithLucas / Gravitational-Waves

Gravitational Waves Game
MIT License
2 stars 1 forks source link

Implement backend for general tasks #92

Open benedekdaniel opened 3 years ago

benedekdaniel commented 3 years ago

Risk mitigation, implementing backend for general tasks to reach MVP

Acceptance Criteria:

TeaWithLucas commented 3 years ago

@Somafet & @benedekdaniel, I would recommend using the exsisting function in Assets/Scripts/Utility/Functions.cs which will save a class as a json file, if you do this for each of the tasks. You get a nice output of each, one of the reasons I added these handy functions. I have also implemted a better set of reading functions for JSONs that i needed for my task, which you can see in this commit: https://github.com/cardiffuni/Gravitational-Waves/commit/31d3889ccc3550393f87887304be99d3d68012ab in particular, Assets/Scripts/Managers/AssetManager.cs and Assets/Scripts/Utility/Functions.cs This allows for jsons to be loaded using the asset manager, if you want, I can add the functionality to this branch. The function loads whatever class is needed, so you can call AssetManager.JSON("taskjsonfilename") and it will return a task. Its how im loading the JSON into the waveformfitter, but it can work with any class or type.

Somafet commented 3 years ago

@Somafet & @benedekdaniel, I would recommend using the exsisting function in Assets/Scripts/Utility/Functions.cs which will save a class as a json file, if you do this for each of the tasks. You get a nice output of each, one of the reasons I added these handy functions. I have also implemted a better set of reading functions for JSONs that i needed for my task, which you can see in this commit: 31d3889 in particular, Assets/Scripts/Managers/AssetManager.cs and Assets/Scripts/Utility/Functions.cs This allows for jsons to be loaded using the asset manager, if you want, I can add the functionality to this branch. The function loads whatever class is needed, so you can call AssetManager.JSON("taskjsonfilename") and it will return a task. Its how im loading the JSON into the waveformfitter, but it can work with any class or type.

@TeaWithLucas I don't see how we would need to export classes to JSON for this ticket, could you elaborate on that? Also I've looked at the ReadJson function in the file you mention, is it necessary? The default JsonConver works as well