Skip to content

Instantly share code, notes, and snippets.

@Kolesias123
Created January 6, 2014 04:29
Show Gist options
  • Save Kolesias123/8278269 to your computer and use it in GitHub Desktop.
Save Kolesias123/8278269 to your computer and use it in GitHub Desktop.
for ( int i = 0; i <= 10; ++i )
{
// Creamos 10 entidades con físicas en las coordenadas 30,50
PhysicsEntity pBox = new PhysicsEntity( 30.0, 50.0 );
pBox.Spawn(); // Spawn!
pBox.SetSprite('assets/entities/box.png'); // Imagen
pBox.SetSize( 50.0, 50.0 ); // Tamaño
pBox.MyPhysics.SetDensity( 0.10 ); // Densidad
pBox.MyPhysics.SetRestitution( 0.5 ); // Restitución
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment