hi, i always wanted, as a programmer, to make a game.... and i decided to learn ruby from scratch in a fun way... so i'm into gosu and ruby and it's pretty fun, but i have a question..
i got working the tutorial source code, it works just fine, but now i want to get this thing modified so i can add my own things to see what happens, so i decided to add "badguys"... it should work in the same way as the stars (i just copy the whole thing and added a static parameter to the ZOrder module), but with a different sprite and it should rest score in order to avoid them to get higher scores..
everything seems to work fine until i draw this badguys on the GameWindow's draw method.. i got this error:
GameWindow.rb:108:in draw': Expected argument 3 of type Gosu::ZPos, but got NilClass nil (TypeError)
in SWIG method 'draw'
from GameWindow.rb:108:in
draw'
from GameWindow.rb:161:in block in draw'
from GameWindow.rb:161:in
each'
from GameWindow.rb:161:in draw'
from GameWindow.rb:175:in
<main>'
dont know what i'm doing wrong, it's the same code as the stars.... the source code is attached..
thanks in advance..