Meteor shadow is now following the world~
This commit is contained in:
parent
81f9ead80a
commit
b2b94eaf06
@ -33,8 +33,9 @@ bool Meteor::Update(float fElapsedTime){
|
|||||||
void Meteor::Draw(){
|
void Meteor::Draw(){
|
||||||
if(lifetime>0){
|
if(lifetime>0){
|
||||||
vf2d scale=vf2d{192,64}/3.f*(startLifetime+1-lifetime)*0.25*size;
|
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};
|
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;
|
vf2d meteorOffset=pos+vf2d{lifetime,-lifetime}*320-vf2d{0,GetFrame().GetSourceRect().size.y/4.f}*size;
|
||||||
if(lifetime<=0){
|
if(lifetime<=0){
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#define VERSION_MAJOR 0
|
#define VERSION_MAJOR 0
|
||||||
#define VERSION_MINOR 2
|
#define VERSION_MINOR 2
|
||||||
#define VERSION_PATCH 0
|
#define VERSION_PATCH 0
|
||||||
#define VERSION_BUILD 828
|
#define VERSION_BUILD 832
|
||||||
|
|
||||||
#define stringify(a) stringify_(a)
|
#define stringify(a) stringify_(a)
|
||||||
#define stringify_(a) #a
|
#define stringify_(a) #a
|
||||||
|
Loading…
x
Reference in New Issue
Block a user