r/CodingForBeginners • u/marspz34 • 9d ago
help with my code
im trying to make a code where 3 arrows bounce off the walls and when the colide they swithcndirection and each arrow has to have an id number on top of it like ass a text and im really strugling if anyone could help me that would be great this is what i have so far
class Arrows //definition of new custom type
PImage upLeft;
PImage downLeft;
PImage downRight;
PImage upRight;
}
void setup()
{
arrow1 = loadImage("upLeft.png");
arrow2 = loadImage("downLeft.png");
arrow3 = loadImage("downRight.png");
arrow4 = loadImage("upRight.png");
}
void draw()
{
background(250,250,250);
image (currentImage);
}
View all comments
1
u/Optimal-Savings-4505 9d ago
Why is there no opening
{forclass Arrows?