|
|
|
@ -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().y<m2.GetPos().y;}); |
|
|
|
|
std::sort(monstersAfter.begin(),monstersAfter.end(),[](Monster&m1,Monster&m2){return m1.GetPos().y<m2.GetPos().y;}); |
|
|
|
|
view.DrawDecal(player.GetPos()+vf2d{-12,12-4},GFX_Circle.Decal(),{24/3,1}); |
|
|
|
|
for(Monster&m:monstersBefore){ |
|
|
|
|
view.DrawPartialDecal(m.GetPos()-vf2d{12,12}*m.GetSizeMult(),m.GetFrame().GetSourceImage()->Decal(),m.GetFrame().GetSourceRect().pos,m.GetFrame().GetSourceRect().size,vf2d(m.GetSizeMult(),m.GetSizeMult())); |
|
|
|
|
} |
|
|
|
|