Elin Decompiled Documentation EA 23.102 Nightly
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Pages
PointList.cs
Go to the documentation of this file.
1using System.Collections.Generic;
2using System.Runtime.Serialization;
3using Newtonsoft.Json;
4
5[JsonObject(MemberSerialization.OptIn)]
6public class PointList : List<Point>
7{
8 [JsonProperty]
9 public int[] data;
10
12 private void OnSerializing(StreamingContext context)
13 {
14 data = new int[base.Count * 2];
15 int num = 0;
16 using Enumerator enumerator = GetEnumerator();
17 while (enumerator.MoveNext())
18 {
19 Point current = enumerator.Current;
20 data[num] = current.x;
21 data[num + 1] = current.z;
22 num += 2;
23 }
24 }
25
27 private void OnDeserialized(StreamingContext context)
28 {
30 }
31
32 public void Deserialize()
33 {
34 base.Capacity = data.Length / 2 + 8;
35 for (int i = 0; i < data.Length / 2; i++)
36 {
37 Add(new Point(data[i * 2], data[i * 2 + 1]));
38 }
39 }
40}
list. Add(item3)
void Deserialize()
Definition: PointList.cs:32
void OnDeserialized(StreamingContext context)
Definition: PointList.cs:27
void OnSerializing(StreamingContext context)
Definition: PointList.cs:12
int[] data
Definition: PointList.cs:9
Definition: Point.cs:9
int x
Definition: Point.cs:36
int z
Definition: Point.cs:39