Last change
on this file since 1150 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:
824 bytes
|
Rev | Line | |
---|
[1114] | 1 | using System;
|
---|
| 2 | using System.Xml;
|
---|
| 3 |
|
---|
| 4 | namespace Oni.Objects
|
---|
| 5 | {
|
---|
| 6 | internal class Weapon : ObjectBase
|
---|
| 7 | {
|
---|
| 8 | public string ClassName;
|
---|
| 9 |
|
---|
| 10 | public Weapon()
|
---|
| 11 | {
|
---|
| 12 | TypeId = ObjectType.Weapon;
|
---|
| 13 | }
|
---|
| 14 |
|
---|
| 15 | protected override void WriteOsd(BinaryWriter writer)
|
---|
| 16 | {
|
---|
| 17 | writer.Write(ClassName, 32);
|
---|
| 18 | }
|
---|
| 19 |
|
---|
| 20 | protected override void ReadOsd(BinaryReader reader)
|
---|
| 21 | {
|
---|
| 22 | ClassName = reader.ReadString(32);
|
---|
| 23 | }
|
---|
| 24 |
|
---|
| 25 | protected override void WriteOsd(XmlWriter xml)
|
---|
| 26 | {
|
---|
| 27 | xml.WriteElementString("Class", ClassName);
|
---|
| 28 | }
|
---|
| 29 |
|
---|
| 30 | protected override void ReadOsd(XmlReader xml, ObjectLoadContext context)
|
---|
| 31 | {
|
---|
| 32 | ClassName = xml.ReadElementContentAsString("Class", "");
|
---|
| 33 | }
|
---|
| 34 | }
|
---|
| 35 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.