lotsa fixes:
- fixed obstacle collision and death on obstacle spike - moved player move into separate loop after other collision checks are done - fixed level setup, generation and selection - added test levels for obstacles
This commit is contained in:
@@ -72,9 +72,9 @@ func (position *Position) String() string {
|
||||
}
|
||||
|
||||
func (position *Position) Move(velocity *Velocity, speed *Speed) {
|
||||
if velocity.Direction != 0 {
|
||||
slog.Debug("moving", "velocity", velocity, "speed", speed)
|
||||
}
|
||||
// if velocity.Direction != 0 {
|
||||
// slog.Debug("moving", "velocity", velocity, "speed", speed)
|
||||
// }
|
||||
position.Update(
|
||||
position.X+(velocity.Data.X*speed.Value),
|
||||
position.Y+(velocity.Data.Y*speed.Value),
|
||||
|
||||
Reference in New Issue
Block a user