Update assembly informational versions and adjust confetti position type in Gokspel

This commit is contained in:
vista-man
2025-01-29 11:15:26 +01:00
parent b9bf8b131a
commit cf5ee6dabe
20 changed files with 28 additions and 16 deletions

View File

@@ -143,7 +143,7 @@ class Program : Form
class Confetti
{
public PointF Position;
public Point Position;
public float SpeedY;
public float SpeedX;
public float Size;
@@ -152,7 +152,7 @@ class Confetti
public Confetti(Random random, Size clientSize)
{
// Initialiseer de eigenschappen van de confetti
Position = new PointF(random.Next(clientSize.Width), random.Next(clientSize.Height));
Position = new Point(random.Next(clientSize.Width), random.Next(clientSize.Height));
SpeedY = (float)(random.NextDouble() * 2 + 1);
SpeedX = (float)(random.NextDouble() * 2 - 1);
Size = random.Next(5, 10);
@@ -162,7 +162,7 @@ class Confetti
public void Update()
{
// Update de positie van de confetti en pas zwaartekracht toe
Position = new PointF(Position.X + SpeedX, Position.Y + SpeedY);
Position = new Point((int)(Position.X + SpeedX), (int)(Position.Y + SpeedY));
SpeedY += 0.1f; // zwaartekracht effect
}
}