Created
May 16, 2013 00:35
-
-
Save fowlmouth/5588575 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import fowltek/entitty | |
entitty_imports | |
import fowltek/vector_math | |
type Pos = Tvector2[float] | |
type Vel = object | |
vec: TVector2[float] | |
Pos.setInitializer proc(x: PEntity) = | |
x[Pos].x = 42.0 | |
x[Pos].y = 99.0 | |
var em = newEntityManager() | |
var e1 = em.newEntity(Pos, Vel) | |
echo "entity1 is at ", $ e1[Pos] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment