Various Starship effects
in
Programming Questions
•
3 years ago
My expectation is that I'll have a lot of questions as I learn, don't want to clog the forum. :)
Current issue is that I'm trying to build a file to hold Starship effects as objects. I've done okay with the Turrent, with help from forumites, but now 'm not sure why my blinking light isn't showing up on the sketch at all.
The running light is called with numbers for it's X, Y, diameter, R, G, and B color.
One bit of confusion I have is the empty "RunningLight" stanza that just takes the parameters. In the Turrent program There were just a few assignments in there. They don't seem to be needed in this one, or am I missing something?
Thanks!
Leam
Current issue is that I'm trying to build a file to hold Starship effects as objects. I've done okay with the Turrent, with help from forumites, but now 'm not sure why my blinking light isn't showing up on the sketch at all.
The running light is called with numbers for it's X, Y, diameter, R, G, and B color.
- myRunningLight = new RunningLight(50, 50, 5, 100, 100, 255);
- RunningLight myRunningLight;
class RunningLight {
// Place these first so the other parts of the ship
// overset them and block the "blink" that would
// be on the hull.
float xpos;
float ypos;
int dia;
int cR;
int cG;
int cB;
RunningLight(float xpos, float ypos, int dia, int cR, int cG, int cB ) {
}
void display() {
fill(cR, cB, cG);
ellipseMode(CENTER);
ellipse(xpos, ypos, dia, dia);
stroke(cR, cG, cB);
line(xpos, ypos, xpos, ypos + ( 2 * dia) );
}
}
One bit of confusion I have is the empty "RunningLight" stanza that just takes the parameters. In the Turrent program There were just a few assignments in there. They don't seem to be needed in this one, or am I missing something?
Thanks!
Leam
1
