Mehr Builder hämmern jetzt schneller des Gebäude hoch

main
Jonathan Hager 3 years ago
parent 4daa34ed71
commit c526c257cc
Signed by: JonathanHager
GPG Key ID: 34881E488569708C

@ -36,16 +36,17 @@ void BuilderAct(Game *game, Entity *entity){
if(entity->task->progress == 0){
// Angekommen, noch nicht mit arbeiten begonnen
AnimationChangeType(entity->animationHandler, AN_ENTITY_ARBEITEN);
entity->task->progress += 0.01;
entity->task->progress = 1;
}
else if(entity->task->progress >= 1.0){
else if(target->progress >= 1.0){
// Fertig mit arbeiten, Animation zu Idle zurück
AnimationChangeType(entity->animationHandler, AN_ENTITY_IDLE);
BuildingFinishConstruction(game, (Building *) entity->task->target);
entity->task->target = 0;
entity->task->progress = 0;
}
else{
entity->task->progress += 0.2 * GetFrameTime();
target->progress += 0.2 * GetFrameTime();
}
}
}

Loading…
Cancel
Save