Dejar placa de inicio por 10s y dejar saltear
This commit is contained in:
parent
3595235a6a
commit
a703f0ed35
1 changed files with 6 additions and 2 deletions
|
@ -10,13 +10,17 @@ export type State = {
|
|||
export function createState(): State {
|
||||
return {
|
||||
current: "logo",
|
||||
timeout: 5 * 1000,
|
||||
timeout: 10 * 1000,
|
||||
};
|
||||
}
|
||||
|
||||
export function update(juego: Juego<State>, dt: number) {
|
||||
juego.state.timeout -= dt;
|
||||
if (juego.state.timeout < 0) {
|
||||
if (
|
||||
juego.state.timeout < 0 ||
|
||||
juego.mouse.down ||
|
||||
(juego.touches && juego.touches.length > 0)
|
||||
) {
|
||||
(juego as Juego<AllState>).state = welcome.createState();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue