Include flags for monsters and players to indicate if they are on the upper level or lower level.

pull/28/head
parent 005c49aa04
commit aa56b4a428
  1. 1
      Crawler/Crawler.cpp
  2. 1
      Crawler/Monster.h
  3. 1
      Crawler/Player.h

@ -1003,7 +1003,6 @@ MapName Crawler::GetCurrentLevel(){
int main()
{
std::cout<<std::endl<<"============"<<std::endl;
Crawler demo;
if (demo.Construct(WINDOW_SIZE.x, WINDOW_SIZE.y, 4, 4))
demo.Start();

@ -79,6 +79,7 @@ struct Monster{
AnimationState GetDeathAnimationName();
bool hasHitPlayer=false;
bool canMove=true; //Set to false when stuck due to collisions.
bool upperLevel=false;
protected:
public:
Monster()=delete;

@ -50,6 +50,7 @@ struct Player{
Animate2D::AnimationState internal_animState;
Key lastReleasedMovementKey;
Key facingDirection;
bool upperLevel=false;
void AddAnimation(AnimationState state);
void Update(float fElapsedTime);
void SetSwordSwingTimer(float val);

Loading…
Cancel
Save