-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathConfig.cs
More file actions
39 lines (38 loc) · 1.22 KB
/
Config.cs
File metadata and controls
39 lines (38 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
namespace SZones;
/// <summary>
/// This class is XML serializing to config file. <br/>
/// Docs: <see href="https://docs.microsoft.com/en-us/dotnet/api/system.xml.serialization.xmlserializer?view=netframework-4.7.2"/>
/// </summary>
public partial class Config : IRocketPluginConfiguration
{
public bool DebugInformation = true;
public float DefaultLocateDelay = 1.5f, DefaultUpdateDelay = 0.2f;
public List<Zone> Zones = new();
public void LoadDefaults()
{
SVector3 position = new(19, 35, -54);
var size = 5f;
Zones.Add(new SpheroidZone()
{
Name = "Spheroid1",
Position = position,
Radius = size
});
Zones.Add(new CuboidZone()
{
Name = "Cuboid1",
Position = position,
Size = new(size, size, size)
});
Zones.Add(new CustomZone()
{
Name = "Custom1",
Position = position,
Nodes = new(new List<Vector3>
{
new(0, 0, 0), new(0, 0, 1), new(0, 1, 0), new(1, 0, 0),
new(1, 1, 1), new(0, 1, 1), new(1, 1, 0), new(1 ,0, 1)
}.Select(x => x * size).Select(SVector3.Convert))
});
}
}