Collisions, lots of bugfixes

This commit is contained in:
Anuken
2020-02-10 09:58:00 -05:00
parent fbadb9f4aa
commit 0ad8408ba9
7 changed files with 35 additions and 16 deletions

View File

@@ -25,10 +25,6 @@ abstract class HealthComp implements Entityc{
hitTime -= Time.delta() / hitDuration;
}
float hitAlpha(){
return hitTime / hitDuration;
}
void killed(){
//implement by other components
}
@@ -53,6 +49,7 @@ abstract class HealthComp implements Entityc{
void damage(float amount){
health -= amount;
hitTime = 1f;
if(health <= 0 && !dead){
kill();
}