Refactor ability use skills to be testable. Add in basic player damage check and ability use unit tests.
This commit is contained in:
@@ -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]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user