Hello everyone,
I have a tricky problem. The solution may be easy and I’m just not seeing it.
Basically I have several Sprite-based objects, which build on top of each other.
The lowest of these is GameSprite, which extends Sprite directly.
Now, GameSprite makes us of the name property. However, I want to make it so name is read-only after the object is created. Since name is a public property of Sprite, I can’t do this directly.
However, I was wondering if there was some way I could use the Proxy class to override it so you can’t set name. I still want to be able to extend GameSprite and have it addable as a child, so I don’t think I can just make it become a child class of Proxy (instead of Sprite).
Any ideas?