-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Make each map a JSON file upon saving.
The file should have a list of objects. The GameComponent class should look something like this:
string type; //most important, determines prefab to be spawned
int health;
int projectileDamage;
float firingRate; //pause between shots
float patrolRange;
float sightRange;
float chaseRange;
bool canMove;
int x; //X coordinate (column in table)
int y; //Y coordinate (row in table)
...
The "type" attribute of the object will be checked when going through the deserialized list. Based on that, the proper GameObject Prefabs will be spawned with the written attribute values.
The GameComponent class will be used in both the C# App (for creating a list of it) and the Unity Game (for reading the list of it from the JSON file).
If there is no GameComponent in the table cell currently checked, no GameComponent will be added to the List when writing.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels