int MAX_TARGETS = 32; int targetCount = 0; int MAX_CREEPY_CRAWLIES = 3; CreepyCrawly[] cc; Coord2D[] targets; // User-defined spots dropped onto the world. Coord2D[] randomTargets; // target spots which perform random walk around the world, to be aimed at if no other target presents itself. 1 per creature. float fRandomWanderDirection = PI; void setup() { size(400, 400); background(255); fill(255); smooth(); stroke(0); frameRate(25); cc = new CreepyCrawly[MAX_CREEPY_CRAWLIES]; cc[0] = new CreepyCrawly(8, 20, 50, 10); cc[0].SetColor(255, 127, 100); cc[1] = new CreepyCrawly(10, 300, 250, 6); cc[1].SetColor(100, 127, 250); cc[2] = new CreepyCrawly(6, 100, 400, 6); cc[2].SetColor(200, 127, 160); targets = new Coord2D[MAX_TARGETS]; randomTargets = new Coord2D[MAX_CREEPY_CRAWLIES]; for(int i=0; i