Merging gamacon

This commit is contained in:
Anonymus Raccoon
2020-05-01 15:37:59 +02:00
4 changed files with 5 additions and 3 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

After

Width:  |  Height:  |  Size: 1.7 MiB

+2 -2
View File
@@ -172,7 +172,7 @@
<gc_entity>
<transform_component>
<Position x="0" y="0" />
<Size x="48" y="96" />
<Size x="70" y="90" />
</transform_component>
<renderer src="farmer1">
<Rect height="32" width="24" top="64" left="24" />
@@ -189,7 +189,7 @@
<gc_entity>
<transform_component>
<Position x="0" y="0" />
<Size x="48" y="96" />
<Size x="70" y="90" />
</transform_component>
<renderer src="mayor">
<Rect height="32" width="24" top="64" left="24" />
+2
View File
@@ -14,6 +14,8 @@ unsigned int amount)
if (this->dead)
return;
this->health -= amount;
if (this->health < 0)
this->health = 0;
engine->trigger_event(engine, "rem_health", this->health, amount);
if (this->health <= 0)
this->dead = true;
+1 -1
View File
@@ -25,7 +25,7 @@ enum gc_mousekeys key)
if (!hc)
return (true);
hc->dead = false;
hc->health = hc->health_max;
hc->health = hc->health_max * 0.4;
for (gc_list *li = list; li; li = li->next) {
if (!my_strcmp(GETCMP(li->data, tag_component)->tag, "game_over"))
((gc_entity *)li->data)->destroy(li->data, scene);