mhomami / Tank

0 stars 0 forks source link

Possibly unneeded code #4

Closed andyg0808 closed 2 years ago

andyg0808 commented 2 years ago

I'm not sure that this call is needed: https://github.com/mhomami/Tank/blob/74e115e25ae04a530c524b3d3756b83eb56cb745/js/script.js#L106

The "Getting Started" docs seem to suggest that the rendering will happen automatically as long as you update the positions (see the "Putting It All Together" section at the end).

mhomami commented 2 years ago

I commented this out and it ceases to output any of the sprites to the canvas. The example mentioned in those docs uses PIXI.Application which I understand prepackages a lot of the functions for you. Maybe thats why? I honestly cant remember why I put that line in earlier. I'll need to go over the tutorial videos again to find out the why.

andyg0808 commented 2 years ago

Ah, sounds totally plausible.