Layering rendering now proper.

This commit is contained in:
2023-07-07 06:42:49 -05:00
parent 7348426c71
commit 6b81cd6e84
16 changed files with 189 additions and 116 deletions
+6 -5
View File
@@ -5,11 +5,11 @@
INCLUDE_ANIMATION_DATA
INCLUDE_game
Bullet::Bullet(vf2d pos,vf2d vel,float radius,int damage,bool friendly,Pixel col)
:pos(pos),vel(vel),radius(radius),damage(damage),col(col),friendly(friendly){};
Bullet::Bullet(vf2d pos,vf2d vel,float radius,int damage,bool upperLevel,bool friendly,Pixel col)
:pos(pos),vel(vel),radius(radius),damage(damage),col(col),friendly(friendly),upperLevel(upperLevel){};
Bullet::Bullet(vf2d pos,vf2d vel,float radius,int damage,AnimationState animation,bool hitsMultiple,float lifetime,bool rotatesWithAngle,bool friendly,Pixel col)
:pos(pos),vel(vel),radius(radius),damage(damage),col(col),animated(true),rotates(rotatesWithAngle),lifetime(lifetime),hitsMultiple(hitsMultiple),friendly(friendly){
Bullet::Bullet(vf2d pos,vf2d vel,float radius,int damage,AnimationState animation,bool upperLevel,bool hitsMultiple,float lifetime,bool rotatesWithAngle,bool friendly,Pixel col)
:pos(pos),vel(vel),radius(radius),damage(damage),col(col),animated(true),rotates(rotatesWithAngle),lifetime(lifetime),hitsMultiple(hitsMultiple),friendly(friendly),upperLevel(upperLevel){
this->animation.AddState(animation,ANIMATION_DATA[animation]);
this->animation.ChangeState(internal_animState,animation);
};
@@ -42,4 +42,5 @@ void Bullet::Draw(){
}
bool Bullet::PlayerHit(Player&player){return true;}
bool Bullet::MonsterHit(Monster&monster){return true;}
bool Bullet::MonsterHit(Monster&monster){return true;}
bool Bullet::OnUpperLevel(){return upperLevel;}