Files
processing4/java/examples/Books/Nature of Code/chp4_systems/ParticleSystemInheritance_pushpop/ParticleChild.pde

21 lines
373 B
Plaintext

class ParticleChild extends Particle {
// We could add variables for only Confetti here if we so
ParticleChild(PVector l) {
super(l);
}
// Inherits update() from parent
// Override the display method
void display() {
super.display();
float theta = map(location.x,0,width,0,TWO_PI*2);
rotate(theta);
stroke(0);
line(0,0,50,0);
}
}