This commit is contained in:
@@ -64,8 +64,8 @@ func (a *Animation) updateMarioPosition() {
|
||||
|
||||
// Calculate new position using parametric ellipse equations
|
||||
t := a.mario.angle
|
||||
marioX := float64(centerX) + a.mario.a*math.Cos(t)
|
||||
marioY := float64(centerY) + a.mario.b*math.Sin(t)
|
||||
marioX := int(float64(centerX) + math.Round(a.mario.a*math.Cos(t)))
|
||||
marioY := int(float64(centerY) + math.Round(a.mario.b*math.Sin(t)))
|
||||
|
||||
// Update angle to move along the ellipse
|
||||
a.mario.angle += 0.1 // Adjust speed as needed
|
||||
|
||||
Reference in New Issue
Block a user