diff --git a/cmd/krampus19/playlevelstate.go b/cmd/krampus19/playlevelstate.go index f1a5a4a..4ad04c4 100644 --- a/cmd/krampus19/playlevelstate.go +++ b/cmd/krampus19/playlevelstate.go @@ -97,7 +97,7 @@ func (s *playLevelState) Tick(now time.Duration) { } func (s *playLevelState) TryPlayerMove(dir geom.Point, key allg5.Key) { - if !s.isIdle() { + if s.player.scr.pos != s.player.pos.ToF32() { return } @@ -179,8 +179,6 @@ func (s *playLevelState) findEntityAt(pos geom.Point) *entity { return s.sunken.FindEntity(pos) } -func (s *playLevelState) isIdle() bool { return s.ani.Idle() } - func (s *playLevelState) isObstructed(pos geom.Point, idx int, t tile) bool { if s.bricks.FindEntity(pos) != nil { return true // brick diff --git a/gut/animation.go b/gut/animation.go index 7adbf79..722e1a1 100644 --- a/gut/animation.go +++ b/gut/animation.go @@ -18,10 +18,6 @@ type animation struct { done AnimationDoneFn } -func (a *Animations) Idle() bool { - return len(a.anis) == 0 -} - func (a *Animations) Start(now time.Duration, ani Animation) { a.StartFn(now, ani, nil) }