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) { bool collidesWithPlayer(Object obj) {
if (obj.hasAnim) { if (obj.hasAnim) {
return PLAYER_COORDS[0]>=obj.x&&PLAYER_COORDS[0]<=obj.x+obj.anim->width&& 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; PLAYER_COORDS[1]>=obj.y&&PLAYER_COORDS[1]<=obj.y+obj.anim->height/32.0;
} else { } else {
return PLAYER_COORDS[0]>=obj.x&&PLAYER_COORDS[0]<=obj.x+obj.spr->sprite->width&& 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; 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 14;69;METEORSHOWER_NODE
202;33;METEORSTORM_NODE 202;33;METEORSTORM_NODE
167;44;SNOWSTORM_NODE 167;44;SNOWSTORM_NODE
20;10;HURRICANE_NODE
Loading…
Cancel
Save