Added pickup boxes
This commit is contained in:
1 parent
86a9f38c3b
commit
84a5e888a0
14 files changed
+300
-7
No files matched your search
+8
-3
@@ -136,6 +136,7 @@ namespace ZL {
|
||||
uiManager.replaceRoot(gameplayRoot);
|
||||
|
||||
uiManager.findButton("minusButton")->state = ButtonState::Disabled;
|
||||
if (auto btn = uiManager.findButton("takeButton")) btn->state = ButtonState::Disabled;
|
||||
|
||||
|
||||
auto velocityTv = uiManager.findTextView("velocityText");
|
||||
@@ -144,8 +145,6 @@ namespace ZL {
|
||||
velocityTv->rect.y = static_cast<float>(Environment::height) - velocityTv->rect.h - 10.0f;
|
||||
}
|
||||
|
||||
//uiManager.startAnimationOnNode("backgroundNode", "bgScroll");
|
||||
|
||||
uiManager.setButtonPressCallback("shootButton", [this](const std::string&) {
|
||||
if (onFirePressed) onFirePressed();
|
||||
});
|
||||
@@ -180,13 +179,19 @@ namespace ZL {
|
||||
}
|
||||
if (onVelocityChanged) onVelocityChanged(newVel);
|
||||
});
|
||||
|
||||
uiManager.setButtonPressCallback("takeButton", [this](const std::string&) {
|
||||
if (onTakeButtonPressed) onTakeButtonPressed();
|
||||
});
|
||||
|
||||
/*
|
||||
uiManager.setSliderCallback("velocitySlider", [this](const std::string&, float value) {
|
||||
int newVel = static_cast<int>(roundf(value * 10));
|
||||
if (newVel > 2) newVel = 2;
|
||||
if (newVel != Environment::shipState.selectedVelocity) {
|
||||
if (onVelocityChanged) onVelocityChanged(newVel);
|
||||
}
|
||||
});
|
||||
});*/
|
||||
}
|
||||
|
||||
// ── State: GameOver ──────────────────────────────────────────────────────
|
||||
|
||||
Reference in new issue
Block a user