forked from KSP-KOS/KOS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSharedObjects.cs
42 lines (39 loc) · 1.15 KB
/
SharedObjects.cs
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
40
41
42
using System;
using kOS.InterProcessor;
using kOS.Binding;
using kOS.Module;
using kOS.Persistence;
using kOS.Compilation;
using kOS.Execution;
using kOS.Screen;
using kOS.Factories;
namespace kOS
{
public class SharedObjects
{
public Vessel Vessel { get; set; }
public CPU Cpu { get; set; }
public BindingManager BindingMgr { get; set; }
public ScreenBuffer Screen { get; set; }
public Interpreter Interpreter { get; set; }
public Script ScriptHandler { get; set; }
public Logger Logger { get; set; }
public VolumeManager VolumeMgr { get; set; }
public TermWindow Window { get; set; }
public kOSProcessor Processor { get; set; }
public ProcessorManager ProcessorMgr { get; set; }
public UpdateHandler UpdateHandler { get; set; }
public IFactory Factory { get; set; }
public SharedObjects()
{
GameEvents.onVesselDestroy.Add(OnVesselDestroy);
}
private void OnVesselDestroy(Vessel data)
{
if (data.id == Vessel.id)
{
BindingMgr.Dispose();
}
}
}
}