A small cart I've made to make my scroll shooter game development easier.
It's a pretty custom editor, and it's definitely not finished, but you might find it useful if you want to write your own editor.
If you have a good idea about improving this, please, post it down here.
P#37219 2017-02-06 11:46 ( Edited 2017-02-07 18:54)
I have lots of different tables for different things.
Adding functions into these tables looks like a good idea, because I can write every update or draw for every type of enemy the same way. Something like this:
for e in all(enemies) do e.update() end |
The only thing I want to know, is how can I address the table within it's function?
For example:
enemy = { x=0,y=0, update = function() [b]--how to address these x and y variables from this update function?[/b] x+=1 y+=1 end } |
Writing something like e.update(e) seems stupid. Maybe what I'm talking about isn't even possible, I just couldn't find anything on this subject.
Thanks for any help
P#37021 2017-02-01 16:53 ( Edited 2017-02-02 08:01)