summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/main.go b/main.go
index 6438fa4..2153470 100644
--- a/main.go
+++ b/main.go
@@ -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 {