diff --git a/Crawler/Crawler.cpp b/Crawler/Crawler.cpp index c88d31d4..81b418ff 100644 --- a/Crawler/Crawler.cpp +++ b/Crawler/Crawler.cpp @@ -28,6 +28,7 @@ bool Crawler::OnUserCreate(){ //Graphics GFX_Pl_Sheet.Load("assets/nico-warrior.png"); GFX_Slime_Sheet.Load("assets/slime.png"); + GFX_Circle.Load("assets/circle.png"); //Animations InitializeAnimations(); @@ -248,6 +249,7 @@ void Crawler::RenderWorld(float fElapsedTime){ std::copy_if(MONSTER_LIST.begin(),MONSTER_LIST.end(),std::back_inserter(monstersAfter),[&pl](Monster&m){return m.GetPos().y>=pl.GetPos().y;}); std::sort(monstersBefore.begin(),monstersBefore.end(),[](Monster&m1,Monster&m2){return m1.GetPos().yDecal(),m.GetFrame().GetSourceRect().pos,m.GetFrame().GetSourceRect().size,vf2d(m.GetSizeMult(),m.GetSizeMult())); } diff --git a/Crawler/Crawler.h b/Crawler/Crawler.h index 2ba1e615..d23f41a7 100644 --- a/Crawler/Crawler.h +++ b/Crawler/Crawler.h @@ -14,7 +14,7 @@ class Crawler : public olc::PixelGameEngine Camera2D camera; TileTransformedView view; Player player; - Renderable GFX_Pl_Sheet,GFX_Slime_Sheet; + Renderable GFX_Pl_Sheet,GFX_Slime_Sheet,GFX_Circle; public: Crawler(); diff --git a/Crawler/Player.h b/Crawler/Player.h index 58d1ab41..8a6fe275 100644 --- a/Crawler/Player.h +++ b/Crawler/Player.h @@ -8,7 +8,7 @@ private: int hp=100,maxhp=hp; int atk=10; vf2d pos; - float z; + float z=0; float moveSpd=1.0f; float size=1.0f; float attack_range=1.5f; diff --git a/Crawler/assets/circle.png b/Crawler/assets/circle.png new file mode 100644 index 00000000..96197e76 Binary files /dev/null and b/Crawler/assets/circle.png differ diff --git a/Crawler/assets/slime.png b/Crawler/assets/slime.png index 7c9d31b0..885c60be 100644 Binary files a/Crawler/assets/slime.png and b/Crawler/assets/slime.png differ