Hey everyone,
maybe this is something small I’m overlooking, but I can’t figure out how to pull this off. I have an XML file that keeps data on my tilesheets. Currently it keeps info on the width and height of the tiles (works fine), but I also want to tell my program what part of an animation it belongs to. I have a class set up that keeps some constants on the state of the object, that will decide it’s animation. For example, if the state equals “PlatformState.WALKING”, I alternate between tiles 1, 2 and 3, if the state is “PlatformState.FALLING”, It alternates between 4 and 5.
The static constant PlatformState.WALKING is a uint with value 0, FALLING has value 1, etc. But I don’t want to put the rough values in the XML, but the constant names.
So how would I tell my program, through XML, that a certain tile belongs to “PlatformState.WALKING”?
Thanks