Particle additions:
- Support for subemitters (= particles can emit particles). - Option to set a different velocity change value for particles in water (can be used to simulate buouancy). - Fixed drag vector & timer not being reset when initializing a particle.
This commit is contained in:
@@ -32,13 +32,11 @@ namespace Barotrauma.Particles
|
||||
this.cam = cam;
|
||||
|
||||
particles = new Particle[MaxParticles];
|
||||
|
||||
LoadPrefabs(configFile);
|
||||
}
|
||||
|
||||
public void LoadPrefabs(string file)
|
||||
public void LoadPrefabs()
|
||||
{
|
||||
XDocument doc = XMLExtensions.TryLoadXml(file);
|
||||
XDocument doc = XMLExtensions.TryLoadXml(ConfigFile);
|
||||
if (doc == null || doc.Root == null) return;
|
||||
|
||||
prefabs = new Dictionary<string, ParticlePrefab>();
|
||||
@@ -47,7 +45,7 @@ namespace Barotrauma.Particles
|
||||
{
|
||||
if (prefabs.ContainsKey(element.Name.ToString()))
|
||||
{
|
||||
DebugConsole.ThrowError("Error in " + file + "! Each particle prefab must have a unique name.");
|
||||
DebugConsole.ThrowError("Error in " + ConfigFile + "! Each particle prefab must have a unique name.");
|
||||
continue;
|
||||
}
|
||||
prefabs.Add(element.Name.ToString(), new ParticlePrefab(element));
|
||||
|
||||
Reference in New Issue
Block a user