Наследование: UnityEngine.MonoBehaviour
Пример #1
0
 public SatelliteManager(RTCore core)
 {
     mCore = core;
     GameEvents.onVesselCreate.Add(OnVesselCreate);
     GameEvents.onVesselDestroy.Add(OnVesselDestroy);
     GameEvents.onVesselGoOnRails.Add(OnVesselOnRails);
 }
        public NetworkManager(RTCore core)
        {
            mCore          = core;
            MissionControl = new MissionControlSatellite();
            Graph          = new Dictionary <Guid, List <ISatellite> >();
            Planets        = GeneratePlanetGuidMap();

            OnSatelliteRegister(MissionControl);

            mCore.Satellites.Registered   += OnSatelliteRegister;
            mCore.Satellites.Unregistered += OnSatelliteUnregister;
            mCore.PhysicsUpdated          += OnPhysicsUpdate;
        }
        public static NetworkRenderer AttachToMapView(RTCore core)
        {
            var renderer = MapView.MapCamera.gameObject.GetComponent<NetworkRenderer>();
            if (renderer) Destroy(renderer);
            renderer = MapView.MapCamera.gameObject.AddComponent<NetworkRenderer>();
            renderer.mCore = core;
            renderer.mLines = new List<VectorLine>();
            renderer.mEdges = new HashSet<TypedEdge<ISatellite>>();
            renderer.mConnectionEdges = new HashSet<TypedEdge<ISatellite>>();
            renderer.Filter = MapFilter.Any;

            core.Network.EdgeUpdated += renderer.OnEdgeUpdate;
            core.Network.ConnectionUpdated += renderer.OnConnectionUpdate;
            core.Satellites.Unregistered += renderer.OnSatelliteUnregister;
            return renderer;
        }
        public static NetworkRenderer AttachToMapView(RTCore core)
        {
            var renderer = MapView.MapCamera.gameObject.GetComponent <NetworkRenderer>();

            if (renderer)
            {
                Destroy(renderer);
            }
            renderer                  = MapView.MapCamera.gameObject.AddComponent <NetworkRenderer>();
            renderer.mCore            = core;
            renderer.mLines           = new List <VectorLine>();
            renderer.mEdges           = new HashSet <TypedEdge <ISatellite> >();
            renderer.mConnectionEdges = new HashSet <TypedEdge <ISatellite> >();
            renderer.Filter           = MapFilter.Any;

            core.Network.EdgeUpdated       += renderer.OnEdgeUpdate;
            core.Network.ConnectionUpdated += renderer.OnConnectionUpdate;
            core.Satellites.Unregistered   += renderer.OnSatelliteUnregister;
            return(renderer);
        }
Пример #5
0
 public DebugUnit(RTCore core)
 {
     mCore = core;
     mCore.GuiUpdated += OnKey;
 }
Пример #6
0
 public Settings(RTCore core)
 {
     mCore = core;
     Load();
 }
Пример #7
0
 public AntennaManager(RTCore core)
 {
     mCore = core;
     GameEvents.onVesselGoOnRails.Add(OnVesselGoOnRails);
 }
 public AntennaManager(RTCore core)
 {
     mCore = core;
     GameEvents.onVesselGoOnRails.Add(OnVesselGoOnRails);
 }
Пример #9
0
 public DebugUnit(RTCore core)
 {
     mCore             = core;
     mCore.GuiUpdated += OnKey;
 }
Пример #10
0
 public Settings(RTCore core)
 {
     mCore = core;
     Load();
 }