Save type of destructable and exit.
This commit is contained in:
parent
baabbbe31c
commit
009bb74a95
|
@ -135,6 +135,7 @@ static void save(cJSON *root)
|
||||||
|
|
||||||
s = (Structure*)self;
|
s = (Structure*)self;
|
||||||
|
|
||||||
|
cJSON_AddStringToObject(root, "type", "Destructable");
|
||||||
cJSON_AddNumberToObject(root, "health", s->health);
|
cJSON_AddNumberToObject(root, "health", s->health);
|
||||||
cJSON_AddNumberToObject(root, "healthMax", s->healthMax);
|
cJSON_AddNumberToObject(root, "healthMax", s->healthMax);
|
||||||
cJSON_AddStringToObject(root, "spriteName", s->spriteName);
|
cJSON_AddStringToObject(root, "spriteName", s->spriteName);
|
||||||
|
|
|
@ -162,5 +162,6 @@ static void save(cJSON *root)
|
||||||
|
|
||||||
s = (Structure*)self;
|
s = (Structure*)self;
|
||||||
|
|
||||||
|
cJSON_AddStringToObject(root, "type", "Exit");
|
||||||
cJSON_AddNumberToObject(root, "active", s->active);
|
cJSON_AddNumberToObject(root, "active", s->active);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue