Quantcast
Channel: Community | MonoGame - Latest topics
Viewing all articles
Browse latest Browse all 6821

Data Driven Particle System: How to specify textures?

$
0
0

@XNA wrote:

Hi all,

I've been having a play with the Extended.Particles System and have struggled to find any documentation to help me - thankfully there are some demos with source code. However, the demo doesn't show how to load the particle data from .json files.

I've had a play and managed to get the .json loaded using serialization - there's an example 'test3.particles' in the source that I'm trying to load. There's also ParticleEffect.FromFile & ParticleEffect.FromStream which do similar things. This all seems great and from stepping through the code it looks like it's working - however nothing is being drawn on the screen.

The json references a textureregion called particle. I'm not sure how to tell it to where to find it.

I've tried creating this manually, naming the texture and putting it inside a TextureAtlas which is then placed inside a TextureRegionService. I can then pass the TextureRegionService to the Deserializer and the ParticleEffect will know what textures to show.

What I'm struggling to do is create a TextureRegionService with TextureAtlases as this property is readonly. I'm assuming that there is a much simpler way to create these perhaps via the Content Pipeline?

Thanks for any pointers!

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 6821

Trending Articles