Last change
on this file since 1191 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:
749 bytes
|
Rev | Line | |
---|
[1114] | 1 | namespace Oni.Particles
|
---|
| 2 | {
|
---|
| 3 | internal class VariableReference
|
---|
| 4 | {
|
---|
| 5 | public const int ByteSize = 24;
|
---|
| 6 | public static readonly VariableReference Empty = new VariableReference(string.Empty);
|
---|
| 7 |
|
---|
| 8 | private string name;
|
---|
| 9 |
|
---|
| 10 | public VariableReference(string name)
|
---|
| 11 | {
|
---|
| 12 | this.name = name;
|
---|
| 13 | }
|
---|
| 14 |
|
---|
| 15 | public VariableReference(BinaryReader reader)
|
---|
| 16 | {
|
---|
| 17 | name = reader.ReadString(16);
|
---|
| 18 | reader.Skip(8);
|
---|
| 19 | }
|
---|
| 20 |
|
---|
| 21 | public void Write(BinaryWriter writer)
|
---|
| 22 | {
|
---|
| 23 | writer.Write(name, 16);
|
---|
| 24 | writer.Skip(8);
|
---|
| 25 | }
|
---|
| 26 |
|
---|
| 27 | public bool IsDefined => !string.IsNullOrEmpty(name);
|
---|
| 28 |
|
---|
| 29 | public string Name => name;
|
---|
| 30 | }
|
---|
| 31 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.