|
|
|
|
@ -36,16 +36,16 @@ void BuilderAct(Game *game, Entity *entity){
|
|
|
|
|
if(entity->task->progress == 0){
|
|
|
|
|
// Angekommen, noch nicht mit arbeiten begonnen
|
|
|
|
|
AnimationChangeType(entity->animationHandler, AN_ENTITY_ARBEITEN);
|
|
|
|
|
target->progress += 0.01;
|
|
|
|
|
entity->task->progress += 0.01;
|
|
|
|
|
}
|
|
|
|
|
else if(target->progress >= 1.0){
|
|
|
|
|
else if(entity->task->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;
|
|
|
|
|
}
|
|
|
|
|
else{
|
|
|
|
|
target->progress += 0.2 * GetFrameTime();
|
|
|
|
|
entity->task->progress += 0.2 * GetFrameTime();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|