allow to skip intro with start button
This commit is contained in:
parent
32bd9a62af
commit
81ae9a5608
|
@ -8,6 +8,7 @@
|
|||
#include "../util/rom.h"
|
||||
#include "../graphics/image.h"
|
||||
#include "../build/assets/materials/images.h"
|
||||
#include "../controls/controller.h"
|
||||
|
||||
#define INTRO_TIME 9.0f
|
||||
|
||||
|
@ -32,7 +33,7 @@ void introInit(struct Intro* intro) {
|
|||
void introUpdate(struct Intro* intro) {
|
||||
intro->time += FIXED_DELTA_TIME;
|
||||
|
||||
if (intro->time > INTRO_TIME) {
|
||||
if (intro->time > INTRO_TIME || controllerGetButtonDown(0, START_BUTTON)) {
|
||||
levelQueueLoad(MAIN_MENU, NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
@ -66,4 +67,4 @@ void introRender(void* data, struct RenderState* renderState, struct GraphicsTas
|
|||
VALVE_IMAGE_WIDTH, VALVE_IMAGE_HEIGHT,
|
||||
fadeColor
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue