Answers for "processing instance array"

0

processing instance array

Module[] mods = new Module[arrayLength];

void setup() {
	for (int i = 0; i < 10; i++) {
    	mods[i] = new Module(arg);
    }
}

void draw() {
	for (int i = 0; i < 10; i++) {
    	mods[i].foo();
    }
}
Posted by: Guest on August-16-2021

Browse Popular Code Answers by Language