hello, I have a problem, my trees don't spawn in the map, this is the tree class:
class Tree
{
public:
Tree(string directory)
{
t.loadFromFile(directory);
}
void treeTexture()
{
for (size_t i = 0; i < 1000; i++)
{
tree.setTexture(t);
tree.setScale(1, 2);
}
}
void treePosition()
{
for (size_t i = 0; i < 1000; i++)
{
tree.setPosition(rand() % 10560 + 0, rand() % 10560 + 0);
}
}
void treeDraw(RenderWindow &app)
{
for (size_t i = 0; i < 1000; i++)
{
app.draw(tree);
}
}
private:
Texture t;
Sprite tree[1000];
};
and this is the main function:
Tree tree("shapes/world/tree.png");
tree.treeDraw(app);
can you tell me why I can't see them?