added suport for ballxpolygon collision ... VERY hacky
[physics.git] / src / entityCreator.cpp
index fa16ae2..104158c 100644 (file)
@@ -23,6 +23,7 @@
 #include "input/inputManager.h"
 
 #include "Entities/Ball.h"
+#include "Entities/Polygon.h"
 #include "graphics/colors.h"
 
 
@@ -73,6 +74,20 @@ void creator::init()
 
     ball = addBall(Vector2(150, 150), 20, cCyan, startBalls);
     ball->mass = startMass;
+
+    for( int i = 0; i<50; i++)
+    {
+        addBall(Vector2(200+i*2, 200+i*2), 10, cCyan);
+    }
+
+    // HACK
+    // add a polygon into the mix (currently not cleaned up)
+    vector<Vector2> points;
+    points.push_back(Vector2(500,500));
+    points.push_back(Vector2(300,500));
+    points.push_back(Vector2(500,300));
+
+    manager::add(new Polygon(points));
 }
 void creator::clean()
 {