Add darkened locked stage plates. Move camera slightly over for level information display.
This commit is contained in:
parent
4f65d2240a
commit
92133061c3
@ -24,7 +24,7 @@ void State_OverworldMap::OnStateChange(GameState*prevState){
|
|||||||
game->GetPlayer()->SetSizeMult(1);
|
game->GetPlayer()->SetSizeMult(1);
|
||||||
};
|
};
|
||||||
void State_OverworldMap::OnUserUpdate(Crawler*game){
|
void State_OverworldMap::OnUserUpdate(Crawler*game){
|
||||||
game->camera.SetTarget(currentConnectionPoint->rect.middle());
|
game->camera.SetTarget(currentConnectionPoint->rect.middle()+vf2d{game->GetScreenSize().x/6.0f,0});
|
||||||
game->UpdateCamera(game->GetElapsedTime());
|
game->UpdateCamera(game->GetElapsedTime());
|
||||||
game->GetPlayer()->Update(game->GetElapsedTime());
|
game->GetPlayer()->Update(game->GetElapsedTime());
|
||||||
|
|
||||||
@ -65,7 +65,12 @@ void State_OverworldMap::OnUserUpdate(Crawler*game){
|
|||||||
void State_OverworldMap::Draw(Crawler*game){
|
void State_OverworldMap::Draw(Crawler*game){
|
||||||
currentTime+=game->GetElapsedTime();
|
currentTime+=game->GetElapsedTime();
|
||||||
for(ConnectionPoint&cp:connections){
|
for(ConnectionPoint&cp:connections){
|
||||||
if(geom2d::overlaps(game->GetWorldMousePos(),cp.rect)){
|
if(!Unlock::IsUnlocked(cp)){
|
||||||
|
game->view.FillRectDecal(cp.rect.pos,cp.rect.size,{0,0,0,128});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for(ConnectionPoint&cp:connections){
|
||||||
|
if(Unlock::IsUnlocked(cp)&&geom2d::overlaps(game->GetWorldMousePos(),cp.rect)){
|
||||||
float borderThickness=4;
|
float borderThickness=4;
|
||||||
vf2d crosshairExtension={std::min(0.25f*cp.rect.size.x-borderThickness/2,12.f),std::min(0.25f*cp.rect.size.y-borderThickness/2,12.f)};
|
vf2d crosshairExtension={std::min(0.25f*cp.rect.size.x-borderThickness/2,12.f),std::min(0.25f*cp.rect.size.y-borderThickness/2,12.f)};
|
||||||
vf2d pulsatingAmt=vf2d{1,1}*std::abs(std::sin(currentTime*3))*2;
|
vf2d pulsatingAmt=vf2d{1,1}*std::abs(std::sin(currentTime*3))*2;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#define VERSION_MAJOR 0
|
#define VERSION_MAJOR 0
|
||||||
#define VERSION_MINOR 2
|
#define VERSION_MINOR 2
|
||||||
#define VERSION_PATCH 1
|
#define VERSION_PATCH 1
|
||||||
#define VERSION_BUILD 2513
|
#define VERSION_BUILD 2527
|
||||||
|
|
||||||
#define stringify(a) stringify_(a)
|
#define stringify(a) stringify_(a)
|
||||||
#define stringify_(a) #a
|
#define stringify_(a) #a
|
||||||
|
Loading…
x
Reference in New Issue
Block a user