Mercurial > projects > chipmunkd
annotate trunk/tests/helloworld.d @ 12:8697699b2c5a
more examples
author | Extrawurst |
---|---|
date | Fri, 03 Dec 2010 01:01:39 +0100 |
parents | 427db6df205c |
children |
rev | line source |
---|---|
10 | 1 import chipmunkd.chipmunk; |
2 | |
3 import std.stdio; | |
4 | |
5 void main() | |
6 { | |
12 | 7 // init |
10 | 8 cpInitChipmunk(); |
9 | |
10 cpSpace* space = cpSpaceNew(); | |
12 | 11 |
12 space.gravity = cpv(0, -1); | |
10 | 13 |
12 | 14 // simulate a step |
15 cpSpaceStep(space, 1.0f/60.0f); | |
16 | |
17 // cheer | |
18 writefln("Hello chipmunkd"); | |
10 | 19 |
12 | 20 // cleanup |
10 | 21 cpSpaceFree(space); |
22 } |