Corrected set position bugs when X axis is not valid while Y is. Corrected staircase collision boxes. Upper Foreground tiles added.

This commit is contained in:
2023-07-06 14:24:43 -05:00
parent cbd2378e97
commit 7e4816631c
10 changed files with 281 additions and 85 deletions
+6 -1
View File
@@ -274,7 +274,12 @@ void Monster::SetVelocity(vf2d vel){
this->vel=vel;
}
bool Monster::SetPosition(vf2d pos){
return SetX(pos.x)|SetY(pos.y);
bool resultX=SetX(pos.x);
bool resultY=SetY(pos.y);
if(resultY&&!resultX){
resultX=SetX(pos.x);
}
return resultX|resultY;
}
AnimationState Monster::GetDeathAnimationName(){
return MONSTER_DATA[type].GetDeathAnimation();