Last change
on this file since 1159 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:
848 bytes
|
Rev | Line | |
---|
[1114] | 1 | using System.Xml;
|
---|
| 2 | using Oni.Metadata;
|
---|
| 3 | using Oni.Xml;
|
---|
| 4 |
|
---|
| 5 | namespace Oni.Physics
|
---|
| 6 | {
|
---|
| 7 | internal class ObjectXmlReader
|
---|
| 8 | {
|
---|
| 9 | public static ObjectParticle ReadParticle(XmlReader xml)
|
---|
| 10 | {
|
---|
| 11 | xml.ReadStartElement("Particle");
|
---|
| 12 |
|
---|
| 13 | var particle = new ObjectParticle
|
---|
| 14 | {
|
---|
| 15 | ParticleClass = xml.ReadElementContentAsString("Class", ""),
|
---|
| 16 | Tag = xml.ReadElementContentAsString("Tag", ""),
|
---|
| 17 | Matrix = xml.ReadElementContentAsMatrix43("Transform"),
|
---|
| 18 | DecalScale = xml.ReadElementContentAsVector2("DecalScale"),
|
---|
| 19 | Flags = xml.ReadElementContentAsEnum<Objects.ParticleFlags>("Flags") & Objects.ParticleFlags.NotInitiallyCreated
|
---|
| 20 | };
|
---|
| 21 |
|
---|
| 22 | xml.ReadEndElement();
|
---|
| 23 |
|
---|
| 24 | return particle;
|
---|
| 25 | }
|
---|
| 26 | }
|
---|
| 27 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.