Sorry this is a two part question but it is kind of the same question, I taught myself processing so hence I am not sure how to figure this out myself.
- So, I made a drawBird() function in my bird class and then in my Main I tried calling it using b.drawbird().
This works if my code is a simple shape like:
stroke(255);
noFill();
strokeWeight(2);
ellipse(xPos, yPos, 20, 20);
But once I try doing complex that requires me adding different shapes together, ex. if I had lines and arc in that function. Something like:
ellipse(250, 400, 20, 20);
line(240, 400, 260, 400);
line(240, 403, 260, 403);
arc(263, 375, 50, 50, 0, HALF_PI);
arc(250, 372, 60, 60, HALF_PI + QUARTER_PI/2, PI);
and then call this in my main, it doesn’t work the same. I tried grouping the shape using createShape(), but was having the same problem.
- Also would it be possible use an image in my drawBird() and then use that in my Main draw function. I tried loadImage(), but it didnt work out like I thought.
if you need any explanations feel free to ask, thanks a lot