|
|
|
@ -135,7 +135,7 @@ MemoryAllocator::MemoryAllocator(vf2d pos,std::map<Image,std::unique_ptr<Rendera |
|
|
|
|
{MOVESPD,1}, |
|
|
|
|
{PROCEDURE,1}, |
|
|
|
|
{HEALTH,1}, |
|
|
|
|
},pos,12,*IMAGES[UNIT_ALLOCATOR],friendly,false,false){} |
|
|
|
|
},pos,12,*IMAGES[UNIT_ALLOCATOR],friendly,true,false){} |
|
|
|
|
|
|
|
|
|
void MemoryAllocator::Attack(Unit&victim,std::vector<std::shared_ptr<Unit>>&otherUnits){ |
|
|
|
|
|
|
|
|
@ -282,6 +282,27 @@ void Unit::DrawHud(TileTransformedView&game,std::map<Image,std::unique_ptr<Rende |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
if(GetHealth()>0){ |
|
|
|
|
game.FillRectDecal(vf2d{float(initialBarX)+health.index*CONSTANT::BAR_SQUARE_SIZE.x, |
|
|
|
|
float(initialBarY)}-vf2d{0,1},CONSTANT::BAR_SQUARE_SIZE+vf2d{CONSTANT::BAR_SQUARE_SIZE.x*health.size-1,2},CONSTANT::HEALTH_COLOR); |
|
|
|
|
} |
|
|
|
|
if(GetAtkSpd()>0){ |
|
|
|
|
game.FillRectDecal(vf2d{float(initialBarX)+atkSpd.index*CONSTANT::BAR_SQUARE_SIZE.x, |
|
|
|
|
float(initialBarY)}-vf2d{0,1},CONSTANT::BAR_SQUARE_SIZE+vf2d{CONSTANT::BAR_SQUARE_SIZE.x*atkSpd.size-1,2},CONSTANT::ATKSPD_COLOR); |
|
|
|
|
} |
|
|
|
|
if(GetMoveSpd()>0){ |
|
|
|
|
game.FillRectDecal(vf2d{float(initialBarX)+moveSpd.index*CONSTANT::BAR_SQUARE_SIZE.x, |
|
|
|
|
float(initialBarY)}-vf2d{0,1},CONSTANT::BAR_SQUARE_SIZE+vf2d{CONSTANT::BAR_SQUARE_SIZE.x*moveSpd.size-1,2},CONSTANT::MOVESPD_COLOR); |
|
|
|
|
} |
|
|
|
|
if(GetProcedure()>0){ |
|
|
|
|
game.FillRectDecal(vf2d{float(initialBarX)+procedure.index*CONSTANT::BAR_SQUARE_SIZE.x, |
|
|
|
|
float(initialBarY)}-vf2d{0,1},CONSTANT::BAR_SQUARE_SIZE+vf2d{CONSTANT::BAR_SQUARE_SIZE.x*procedure.size-1,2},CONSTANT::PROCEDURE_COLOR); |
|
|
|
|
} |
|
|
|
|
if(GetRange()>0){ |
|
|
|
|
game.FillRectDecal(vf2d{float(initialBarX)+range.index*CONSTANT::BAR_SQUARE_SIZE.x, |
|
|
|
|
float(initialBarY)}-vf2d{0,1},CONSTANT::BAR_SQUARE_SIZE+vf2d{CONSTANT::BAR_SQUARE_SIZE.x*range.size-1,2},CONSTANT::RANGE_COLOR); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
for(int i=0;i<GetMemorySize();i++){ |
|
|
|
|
CheckColor(i,col); |
|
|
|
|
|
|
|
|
|