Bullets do not die immediately when view goes offscreen anymore. Initial jump states and setup for Slime King are now implemented.

This commit is contained in:
2023-09-09 07:10:31 -05:00
parent efdf696d2c
commit 942e8e0ef7
18 changed files with 151 additions and 67 deletions
+2 -1
View File
@@ -116,6 +116,7 @@ bool Crawler::OnUserCreate(){
LOADIMG(GFX_Arrow)
LOADIMG(GFX_Laser)
LOADIMG(GFX_ChargedArrow)
LOADIMG(GFX_RangeIndicator)
Monster::InitializeStrategies();
//Animations
@@ -451,7 +452,7 @@ void Crawler::UpdateBullets(float fElapsedTime){
} else {
b->pos+=b->vel*fElapsedTime;
}
if(b->pos.x+b->radius<view.GetWorldTL().x||b->pos.x-b->radius>view.GetWorldBR().x||b->pos.y+b->radius<view.GetWorldTL().y||b->pos.y-b->radius>view.GetWorldBR().y){
if(b->pos.x+b->radius<view.GetWorldTL().x-WINDOW_SIZE.x||b->pos.x-b->radius>view.GetWorldBR().x+WINDOW_SIZE.x||b->pos.y+b->radius<view.GetWorldTL().y-WINDOW_SIZE.y||b->pos.y-b->radius>view.GetWorldBR().y+WINDOW_SIZE.y){
b->dead=true;
continue;
}