protected override void OnRegister() { base.OnRegister(); // Add a waypoint for each possible vessel in the list foreach (string vesselKey in vessels) { VesselWaypoint vesselWaypoint = new VesselWaypoint(Root, vesselKey); vesselWaypoints.Add(vesselWaypoint); vesselWaypoint.Register(); } }
protected override void OnRegister() { base.OnRegister(); GameEvents.onVesselDestroy.Add(new EventData <Vessel> .OnEvent(OnVesselDestroy)); // Add a waypoint for each possible vessel in the list foreach (string vesselKey in vessels) { VesselWaypoint vesselWaypoint = new VesselWaypoint(Root, vesselKey); vesselWaypoints.Add(vesselWaypoint); vesselWaypoint.Register(); } }
protected override void OnRegister() { GameEvents.onVesselChange.Add(new EventData <Vessel> .OnEvent(OnVesselChange)); ContractVesselTracker.OnVesselAssociation.Add(new EventData <GameEvents.HostTargetAction <Vessel, string> > .OnEvent(OnVesselAssociation)); ContractVesselTracker.OnVesselDisassociation.Add(new EventData <GameEvents.HostTargetAction <Vessel, string> > .OnEvent(OnVesselDisassociation)); GameEvents.Contract.onCompleted.Add(new EventData <Contract> .OnEvent(OnContractCompleted)); GameEvents.Contract.onFailed.Add(new EventData <Contract> .OnEvent(OnContractFailed)); GameEvents.Contract.onCancelled.Add(new EventData <Contract> .OnEvent(OnContractFailed)); // Add a waypoint for each possible vessel in the list foreach (string vesselKey in vesselList) { VesselWaypoint vesselWaypoint = new VesselWaypoint(Root, vesselKey); vesselWaypoints.Add(vesselWaypoint); vesselWaypoint.Register(); } }
protected override void OnRegister() { base.OnRegister(); GameEvents.onVesselWillDestroy.Add(new EventData<Vessel>.OnEvent(OnVesselWillDestroy)); GameEvents.onVesselWasModified.Add(new EventData<Vessel>.OnEvent(OnVesselWasModified)); // Add a waypoint for each possible vessel in the list foreach (string vesselKey in vessels) { VesselWaypoint vesselWaypoint = new VesselWaypoint(Root, vesselKey); vesselWaypoints.Add(vesselWaypoint); vesselWaypoint.Register(); } }