Closed anaismveras closed 3 years ago
Are you having trouble making more trash appear on screen? or getting the trash that's on screen to move in the desired way?
getting more trash to appear on the screen
So currently you've just got the one let garbage = new trashRender
, if you wanted to create more trash at the outside you'd want to have to either call that method a few more times, or use a setInterval to have it happen automatically at time intervals
create more trash at the outset*
Ive tried both of those methods already and they dont work meaning, either my trash just goes away or Idk how I would call the garbage variable if its inside a function its not in the gobal scoop anymore
ah ha, lets check it out 1:1
okay
Hey ana, were you ever able to get this resolved?
What's the problem you're trying to solve?
I have a movement function for my trash and i want it to move but I cant seem to figure out how to get more trash to show up on the screen to move the same way
Post any code you think might be relevant (one fenced block per file)
If you see an error message, post it here. If you don't, what unexpected behavior are you seeing?
i dont see an error message
What is your best guess as to the source of the problem?
i think i need an array and a for loop somewhere
What things have you already tried to solve the problem?
Ive tried adding the trash into an empty array but i dont know how to get it to stop pushing, since my game is on a setInterval