Timeline for How To Correctly Extend the Sprite Class in LibGDX
Current License: CC BY-SA 3.0
9 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Mar 25, 2013 at 23:34 | comment | added | Squagem | This is precisely my problem. I always spend hours working on "best practices" instead of just getting something to work. | |
| Mar 25, 2013 at 21:24 | comment | added | LoveMeSomeCode | it's this kind of stuff that can keep me up at night weighing the pros and cons of certain methods. what i love about indie gaming is that there's no wrong answer. if it works, it works. | |
| Mar 25, 2013 at 21:14 | vote | accept | Squagem | ||
| Mar 25, 2013 at 21:14 | comment | added | Squagem | Upon review, however, it makes sense that I could get this same functionality if I just added a Sprite into my class. This consideration makes my question sound silly, but hey, I learned something nonetheless! | |
| Mar 25, 2013 at 21:13 | comment | added | Squagem | After reviewing my circumstances, it actually does make more sense to simply include a Sprite in the class. Extending it would not really be necessary. The reason I chose to extend it was because I just wanted a Sprite that had maybe one more function, and didn't see the need for an entire new class. | |
| Mar 25, 2013 at 20:44 | comment | added | LoveMeSomeCode | Not really an answer but I'd like to hear why you choose to extend the Sprite class in the first place? In our last game I had classes that had sprites, because I wanted each thing to be able draw itself - a base class called DrawableThing had a reference to a Texture or Sprite and a Draw method that took a SpriteBatch - but I didn't subclass directly from Sprite. Not criticizing your method, it honestly hadn't occurred to me. What are the pros/cons of your way vs my way? | |
| Mar 25, 2013 at 16:47 | history | tweeted | twitter.com/#!/StackGameDev/status/316229960027226112 | ||
| Mar 25, 2013 at 15:25 | answer | added | petervaz | timeline score: 5 | |
| Mar 25, 2013 at 15:10 | history | asked | Squagem | CC BY-SA 3.0 |