Open lordmauve opened 3 years ago
I see why you'd want to do this, but I'm not quite happy with the API. I think add()
feels wrong; it should be more like
images["tmp_dirt_with_bush"] = img_dirt
with the implication that you can also read it back as images["tmp_dirt_with_bush"]
or unload it with del images["tmp_dirt_with_bush"]
.
I think either ResourceLoader needs to duck-type as a dict of loaded resources, or the images
object should be a wrapper around ImageLoader that presents a dict-like API.
Originally created by @jhutar in #232
I have images
dirt.png
andbush.png
and with this I can create temporary image on the fly when starting the game (so my actor do not need to draw two overlapping images when running the game):Please let me know if it makes sense.