Not Able To Access Object Sub Class's Variable? (java / Android)
I've got a custom class called 'Quad' which creates a textured quad to use as a sprite in my 2D OpenGL ES 2.0 game. public class Quad(){ //Quad creation stuff here } Then I have
Solution 1:
Your variable hero
is of type Quad
, not type Hero
, hence the compiler only knows that it is a Quad
. Use the specific subtype if you want access to Hero
methods.
Post a Comment for "Not Able To Access Object Sub Class's Variable? (java / Android)"