diff options
author | davidovski <david@davidovski.xyz> | 2024-04-21 23:07:10 +0100 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2024-04-21 23:07:10 +0100 |
commit | cffac12303402c3bfd2d7eb8ab982bdaa86bd72d (patch) | |
tree | f7ecba13c8ab5d90275de2da97ad6a7c818f544b /main.go | |
parent | 39b86eddf0404d9fd39a32724e47fd54629189a5 (diff) |
hold r to rewind
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -164,15 +164,16 @@ func (g *Game) Init() { func (g *Game) Update() error { g.time += 1 - if inpututil.IsKeyJustPressed(ebiten.KeyR) { + if ebiten.IsKeyPressed(ebiten.KeyR) { + if g.state == IN_GAME { + g.state = REVERSING + g.shaderName = "vcr" + } + } else { if g.state == REVERSING { g.state = IN_GAME g.shaderName = "none" - } else if g.state == IN_GAME { - g.state = REVERSING - g.shaderName = "vcr" } - } if g.state == IN_GAME { |