A zombie survival comic story game.4.00 / 5.00 31,183 Views
Train soldiers, combine troops, face numerous enemies, enjoy fierce fights.3.95 / 5.00 21,992 Views
Get ready to exploit some bugs.3.96 / 5.00 24,789 Views
I created a class called "bgitem" that extends the Sprite class and gives it a few extra variables. I've changed the base class of a handful of library items to Sprite and am trying to cast them as "bgitem"s.
Is there any way to convert them on the fly without creating an identical .as for every single library class?
public var building:bgitem = bgitem(new building1())
Instead of making the base class of building1 extend Sprite, make it extend bgitem. No need to cast. Give that a try.