Refactor ability use skills to be testable. Add in basic player damage check and ability use unit tests.

This commit is contained in:
2024-06-24 12:04:06 -05:00
parent f355b01171
commit d6d02cc986
10 changed files with 149 additions and 49 deletions
+2
View File
@@ -45,11 +45,13 @@ INCLUDE_game
Effect::Effect(vf2d pos,float lifetime,std::string imgFile,bool upperLevel,float size,float fadeout,vf2d spd,Pixel col,float rotation,float rotationSpd,bool additiveBlending)
:Effect::Effect(pos,lifetime,imgFile,upperLevel,vf2d{size,size},fadeout,spd,col,rotation,rotationSpd,additiveBlending){
if(game->TestingModeEnabled())return;
this->animation.AddState(imgFile,ANIMATION_DATA[imgFile]);
}
Effect::Effect(vf2d pos,float lifetime,std::string imgFile,bool upperLevel,vf2d size,float fadeout,vf2d spd,Pixel col,float rotation,float rotationSpd,bool additiveBlending)
:pos(pos),lifetime(lifetime),upperLevel(upperLevel),size(size),fadeout(fadeout),original_fadeoutTime(fadeout),spd(spd),col(col),rotation(rotation),rotationSpd(rotationSpd),additiveBlending(additiveBlending){
if(game->TestingModeEnabled())return;
this->animation.AddState(imgFile,ANIMATION_DATA[imgFile]);
}