Skip to content

Instantly share code, notes, and snippets.

@httpsterio
Created January 26, 2020 22:55
Show Gist options
  • Save httpsterio/376cf9d8bb642f4722a6c33a6d0b9dbd to your computer and use it in GitHub Desktop.
Save httpsterio/376cf9d8bb642f4722a6c33a6d0b9dbd to your computer and use it in GitHub Desktop.
lumipallo
/// <summary>
///
/// </summary>
double r = 10;
public override void Begin()
{
Camera.ZoomToLevel();
Level.Background.Color = Color.Black;
Lumipallo(0,0);
Lumipallo(-50, 200);
}
public void Lumipallo(double x, double y) {
double h = Math.Sqrt(Math.Pow((2 * r), 2) - (Math.Pow(r, 2)));
PhysicsObject pallo = new PhysicsObject (r*2,r*2, Shape.Circle);
pallo.X = x;
pallo.Y = y;
Add(pallo);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment