Last change
on this file since 1162 was 1114, checked in by iritscen, 5 years ago |
Adding OniSplit source code (v0.9.99.0). Many thanks to Neo for all his work over the years.
|
File size:
976 bytes
|
Rev | Line | |
---|
[1114] | 1 | using System;
|
---|
| 2 | using System.Collections.Generic;
|
---|
| 3 | using System.Xml;
|
---|
| 4 |
|
---|
| 5 | namespace Oni.Level
|
---|
| 6 | {
|
---|
| 7 | using Oni.Physics;
|
---|
| 8 |
|
---|
| 9 | partial class LevelImporter
|
---|
| 10 | {
|
---|
| 11 | private static IEnumerable<ObjectParticle> ReadParticles(XmlReader xml, string basePath)
|
---|
| 12 | {
|
---|
| 13 | if (xml.SkipEmpty())
|
---|
| 14 | yield break;
|
---|
| 15 |
|
---|
| 16 | xml.ReadStartElement();
|
---|
| 17 |
|
---|
| 18 | while (xml.IsStartElement())
|
---|
| 19 | yield return ObjectXmlReader.ReadParticle(xml);
|
---|
| 20 |
|
---|
| 21 | xml.ReadEndElement();
|
---|
| 22 | }
|
---|
| 23 |
|
---|
| 24 | private void ImportParticle(string tag, Matrix matrix, ObjectParticle particle)
|
---|
| 25 | {
|
---|
| 26 | level.particles.Add(new ObjectParticle {
|
---|
| 27 | ParticleClass = particle.ParticleClass,
|
---|
| 28 | Tag = tag + "_" + particle.Tag,
|
---|
| 29 | Matrix = particle.Matrix * matrix,
|
---|
| 30 | DecalScale = particle.DecalScale,
|
---|
| 31 | Flags = particle.Flags
|
---|
| 32 | });
|
---|
| 33 | }
|
---|
| 34 | }
|
---|
| 35 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.