view trunk/tests/helloworld.d @ 12:8697699b2c5a

more examples
author Extrawurst
date Fri, 03 Dec 2010 01:01:39 +0100
parents 427db6df205c
children
line wrap: on
line source

import chipmunkd.chipmunk;

import std.stdio;

void main()
{
	// init
	cpInitChipmunk();
	
	cpSpace* space = cpSpaceNew();

	space.gravity = cpv(0, -1);	
	
	// simulate a step
	cpSpaceStep(space, 1.0f/60.0f);
		
	// cheer
	writefln("Hello chipmunkd");
	
	// cleanup
	cpSpaceFree(space);
}