Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transition blockInput: true only works on input events #3087

Open
eonarheim opened this issue Jun 1, 2024 · 1 comment · May be fixed by #3235
Open

Transition blockInput: true only works on input events #3087

eonarheim opened this issue Jun 1, 2024 · 1 comment · May be fixed by #3235
Labels
bug This issue describes undesirable, incorrect, or unexpected behavior stale This issue or PR has not had any activity recently

Comments

@eonarheim
Copy link
Member

Steps to Reproduce

let transitions = {
     in: new FadeInOut({ duration: 300, direction: 'in', color: Color.Black, blockInput:true }),
     out: new FadeInOut({ duration: 300, direction: 'out', color: Color.Black, blockInput:true })
}

this.add('intro', { scene: new Intro(), transitions })
this.add('level', { scene: new Level(), transitions })
this.add('game-over', { scene: new GameOver(), transitions })        
this.goToScene('intro')

then in scene

onPostUpdate(engine, delta) {
    if (engine.input.keyboard.wasReleased(Keys.Space)) {
       console.log("go to the intro, called multiple times when spamming the space bar")
       engine.goToScene('intro')
    }
}

Expected Result

wasReleased() and related methods should return false when input is blocked

Actual Result

Methods still work

Environment

  • browsers and versions: Chrome Latest
  • operating system: Win11
  • Excalibur versions: v30 Alpha

Current Workaround

Use the Scene.onTransition hook or inspect the transition object onStart or onEnd hooks

@eonarheim eonarheim added the bug This issue describes undesirable, incorrect, or unexpected behavior label Jun 1, 2024
Copy link

github-actions bot commented Aug 1, 2024

This issue hasn't had any recent activity lately and is being marked as stale automatically.

@github-actions github-actions bot added the stale This issue or PR has not had any activity recently label Aug 1, 2024
@eonarheim eonarheim linked a pull request Oct 5, 2024 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue describes undesirable, incorrect, or unexpected behavior stale This issue or PR has not had any activity recently
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant