It looks like you're new here. If you want to get involved, click one of these buttons!
Hi all, it's me once again with questions. I wanted to see if anyone could help me on making a simple program that wherever you touch on the screen a rectangle appears. But I want each rectangle to be independent per se. As in they each have their own coordinates and can be identified individually amongst the others. I'm pretty sure that a class is the way to go (probably the only way) but I can't seem to write one that works and I feel that it is my lack of "syntax knowledge" on how to use classes (if that makes sense) that's making this more problematic.
Thank you in advance!
Comments
I've written quite a number of posts on classes, and there are some good Lua class tutorials out there, too. I suggest you read everything you can find and try again.
My stuff is below:
https://coolcodea.wordpress.com/2013/06/19/index-of-posts/
@Perscirious Classes aren't the only way to do what you want. Here's an example that uses just a table to create rectangles where you touch a blank screen area. If you touch a rectangle, you can move it around.