diff --git a/cmd/krampus19/playlevel.go b/cmd/krampus19/playlevel.go index bc0b162..fc4907e 100644 --- a/cmd/krampus19/playlevel.go +++ b/cmd/krampus19/playlevel.go @@ -61,7 +61,7 @@ func newEntityMoveAnimation(e *entity, to geom.Point) *entityMoveAnimation { } func (a *entityMoveAnimation) Animate(start, now time.Duration) bool { - const duration = 240 * time.Millisecond + const duration = 160 * time.Millisecond progress := float32((now-start)*1000/duration) * .001 from, to := a.from.ToF32(), a.to.ToF32() @@ -78,6 +78,7 @@ func (l *playLevel) Enter(ctx *Context) error { l.menu = alui.NewMenu() l.menu.Add("Resume", func() { l.showMenu = false }) + l.menu.Add("Restart", func() { l.ctx.Navigation.playLevel(l.name) }) l.menu.Add("Quit to main menu", func() { l.ctx.Navigation.showMainMenu() }) l.menu.Add("Quit to desktop", func() { l.ctx.Navigation.quit() }) @@ -147,7 +148,7 @@ func (l *playLevel) Handle(e allg5.Event) { } switch e := e.(type) { - case *allg5.KeyDownEvent: + case *allg5.KeyCharEvent: switch e.KeyCode { case allg5.KeyEscape: l.showMenu = true