|
|
|
@ -33,8 +33,9 @@ bool Meteor::Update(float fElapsedTime){ |
|
|
|
|
void Meteor::Draw(){ |
|
|
|
|
if(lifetime>0){ |
|
|
|
|
vf2d scale=vf2d{192,64}/3.f*(startLifetime+1-lifetime)*0.25*size; |
|
|
|
|
vf2d meteorOffset=vf2d{lifetime,0}*120; |
|
|
|
|
vf2d centerPoint=pos-vf2d{game->GFX_Circle.Sprite()->width*scale.x/2,game->GFX_Circle.Sprite()->height*scale.y/2}; |
|
|
|
|
game->view.DrawDecal(centerPoint,game->GFX_Circle.Decal(),scale,{0,0,0,192}); |
|
|
|
|
game->view.DrawDecal(centerPoint+meteorOffset,game->GFX_Circle.Decal(),scale,{0,0,0,192}); |
|
|
|
|
} |
|
|
|
|
vf2d meteorOffset=pos+vf2d{lifetime,-lifetime}*320-vf2d{0,GetFrame().GetSourceRect().size.y/4.f}*size; |
|
|
|
|
if(lifetime<=0){ |
|
|
|
|