Now make it move
[SugarCubes.git] / BenMorrow.pde
index a86189b60e6c47882bb09dc46360441312e2283a..67a1b79c317f7c21d21d0fd84c9b246da00b5426 100644 (file)
@@ -49,7 +49,16 @@ class GranimTestPattern extends GranimPattern
        {
                super(glucose);
                RedThreeGraphic myReds = new RedThreeGraphic();
-               addGraphic("string_name",myReds);
+               addGraphic("myThreeReds",myReds);
+       }
+       int counter=0;
+       public void run(int deltaMs) 
+       {
+               super.run(deltaMs);
+               if(counter % 3 ==0)
+               {
+                       getGraphicByName("myThreeReds").position++;
+               }
        }