Inheritance: UnityEngine.MonoBehaviour
Exemple #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);
        }
 public DebugUnit(RTCore core)
 {
     mCore = core;
     mCore.GuiUpdated += OnKey;
 }
Exemple #6
0
 public Settings(RTCore core)
 {
     mCore = core;
     Load();
 }
 public AntennaManager(RTCore core)
 {
     mCore = core;
     GameEvents.onVesselGoOnRails.Add(OnVesselGoOnRails);
 }
 public AntennaManager(RTCore core)
 {
     mCore = core;
     GameEvents.onVesselGoOnRails.Add(OnVesselGoOnRails);
 }
Exemple #9
0
 public DebugUnit(RTCore core)
 {
     mCore             = core;
     mCore.GuiUpdated += OnKey;
 }
 public Settings(RTCore core)
 {
     mCore = core;
     Load();
 }