-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rudimentary tree working (ish... its also taken from another project).
for some reason the cell data stuff isn't working... I also need to make updating cells if their data objects moved, but that is not a priority (at all. In fact I should NOT be focusing on that because I most likely will never use it in this project (although it's nice to have))
- Loading branch information
Showing
48 changed files
with
2,617 additions
and
396 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using SimDataStructure.Data; | ||
using UnityEngine; | ||
|
||
namespace SimDataStructure.Interfaces | ||
{ | ||
/** | ||
<summary> | ||
For a class to be able to read cell data, it needs to implement the IReadCellData interface. | ||
</summary> | ||
*/ | ||
public interface IReadCellData | ||
{ | ||
Dictionary<string, int> ReadDataNames { get; } // The levels and names of the data to receive from the data structure | ||
|
||
/** | ||
<summary> | ||
Called by the data structure at the beginning of every tick to send the requested list of cell data to the implementing class. | ||
The receiving class should copy the data contained by the AbstractGridData objects in the list, as the data structure will reuse the same AbstractGridData objects for the next tick. | ||
It is recommended for the implementing class to cache the received list of data for use only during the tick, to avoid memory bloat, but the received data list can also be cached for data deltas, etc. | ||
</summary> | ||
*/ | ||
void receiveCellData(List<List<AbstractCellData>> sentData); | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using SimDataStructure.Data; | ||
using UnityEngine; | ||
|
||
namespace SimDataStructure.Interfaces | ||
{ | ||
/** | ||
<summary> | ||
For a class to be able to write cell data to the data structure, it needs to implement the IWriteCellData interface. | ||
</summary> | ||
*/ | ||
public interface IWriteCellData | ||
{ | ||
/** | ||
<summary> | ||
Called by the data structure at the end of every tick to ADD NEW cell data to the data structure. | ||
This function should return a list of the data that the implementing class wants to write to the data structure. | ||
Return a dictionary of data to add. | ||
</summary> | ||
*/ | ||
Dictionary<Tuple<string, int>, List<AbstractCellData>> writeCellDataToAdd(); | ||
|
||
/** | ||
<summary> | ||
Called by the data structure at the end of every tick to REMOVE cell data from the data structure. | ||
This function should return a list of the data that the implementing class wants to write to the data structure. | ||
Return a dictionary of data to delete. | ||
</summary> | ||
*/ | ||
Dictionary<Tuple<string, int>, List<AbstractCellData>> writeCellDataToRemove(); | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.