Angry-Squirrels / RadEngine

A Haxe game engine
2 stars 0 forks source link

Complexe component field serialisation #48

Open Tomobodo opened 10 years ago

Tomobodo commented 10 years ago

Some component can have more complexe field than basics types, such as a SpriteSheet in a View component.

On save the SpriteSheet field should be replaced by a simpler object, containing the class name and the path to load like so :

{
    "type" : "fr.radstar.radengine.asset.SpriteSheet",
    "path" : "path/to/asset.radasset"
}

On load the object should then be replaced by a new instance of the class wich will load the path.