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:
+2
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user