// really should have a ConvoyManager to encapsulate these details... private Convoy RegisterConvoy(IMyCubeGrid leaderGrid, NpcGroupState npcGroupState, UnitType unitType, Vector3D destination, DateTime spawnTime) { leaderGrid.StartTimerBlocks(); Convoy convoy; if (unitType == UnitType.Air) { convoy = new ConvoyAir(destination, npcGroupState, heatSystem, audioSystem, leaderGrid, spawnTime); } else { convoy = new ConvoyGround(destination, npcGroupState, heatSystem, audioSystem, leaderGrid, spawnTime); } npcGroups.Add(convoy); return(convoy); }
internal BackupGroup(NpcGroupState initialState, Vector3D destination, IMyCubeGrid leader, HeatSystem heatSystem, QueuedAudioSystem audioSystem, DateTime groupSpawnTime) : base(leader.EntityId, initialState, destination, NpcGroupType.Backup, groupSpawnTime, heatSystem) { this.leader = leader; this.audioSystem = audioSystem; this.heat = heatSystem; var InterceptingBeaconSuffixID = MyStringId.TryGet("InterceptingBeaconSuffix"); InterceptingBeaconSuffix = VRage.MyTexts.Get(InterceptingBeaconSuffixID).ToString(); var ReturningToBaseID = MyStringId.TryGet("ReturningToBase"); ReturningToBase = VRage.MyTexts.Get(ReturningToBaseID).ToString(); var InvestigatingBackupCallID = MyStringId.TryGet("InvestigatingBackupCall"); InvestigatingBackupCall = VRage.MyTexts.Get(InvestigatingBackupCallID).ToString(); }
public ConvoyGround(Vector3D destination, NpcGroupState initialState, NpcGroupArrivalObserver arrivalObserver, QueuedAudioSystem audioSystem, IMyCubeGrid leader, DateTime groupSpawnTime) : base(destination, initialState, arrivalObserver, audioSystem, leader, groupSpawnTime) { }