Fixed node collision spots and added hurricane node

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
master
sigonasr2 2 years ago
parent 9763f62226
commit 1bd636d93a
  1. 8
      SeasonsOfLoneliness.cpp
  2. BIN
      Seasons_of_Loneliness
  3. 1
      assets/maps/map1

@ -833,11 +833,11 @@ public:
bool collidesWithPlayer(Object obj) {
if (obj.hasAnim) {
return PLAYER_COORDS[0]>=obj.x&&PLAYER_COORDS[0]<=obj.x+obj.anim->width&&
PLAYER_COORDS[1]>=obj.y&&PLAYER_COORDS[1]<=obj.y+obj.anim->height;
return PLAYER_COORDS[0]>=obj.x&&PLAYER_COORDS[0]<=obj.x+obj.anim->width/32.0&&
PLAYER_COORDS[1]>=obj.y&&PLAYER_COORDS[1]<=obj.y+obj.anim->height/32.0;
} else {
return PLAYER_COORDS[0]>=obj.x&&PLAYER_COORDS[0]<=obj.x+obj.spr->sprite->width&&
PLAYER_COORDS[1]>=obj.y&&PLAYER_COORDS[1]<=obj.y+obj.spr->sprite->height;
return PLAYER_COORDS[0]>=obj.x&&PLAYER_COORDS[0]<=obj.x+obj.spr->sprite->width/32.0&&
PLAYER_COORDS[1]>=obj.y&&PLAYER_COORDS[1]<=obj.y+obj.spr->sprite->height/32.0;
}
}
};

Binary file not shown.

@ -84,3 +84,4 @@
14;69;METEORSHOWER_NODE
202;33;METEORSTORM_NODE
167;44;SNOWSTORM_NODE
20;10;HURRICANE_NODE
Loading…
Cancel
Save