Inheritance: UnityEngine.MonoBehaviour
コード例 #1
0
 public SatelliteManager(RTCore core)
 {
     mCore = core;
     GameEvents.onVesselCreate.Add(OnVesselCreate);
     GameEvents.onVesselDestroy.Add(OnVesselDestroy);
     GameEvents.onVesselGoOnRails.Add(OnVesselOnRails);
 }
コード例 #2
0
        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;
        }
コード例 #3
0
        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;
        }
コード例 #4
0
        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);
 }
コード例 #8
0
 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();
 }