public DoorManager(SpeakerManager inSpeakers, AirManager inAirTanks) { hangarDoors = GridTerminalSystem.GetBlockGroupWithName(hangarDoorGroupName); if (hangarDoors == null) { Echo("Hangar Doors group not found"); throw new ArgumentException("Cannot find Door group: " + hangarDoorGroupName); } doorList = new List <IMyAirtightHangarDoor>(); speakers = inSpeakers; airTanks = inAirTanks; }
/* Planned future features * Projector controls * Welding zones * Entry Airlock control * Read Custom Data of programming block to get Group Names * Read Custom Data of control panels to get welder/projector group names * Write to LCD status of zones, connectors, doors, air pressure, build progress */ public Program() { // The constructor, called only once every session and // always before any other method is called. Use it to // initialize your script. // // The constructor is optional and can be removed if not // needed. // // It's recommended to set Runtime.UpdateFrequency // here, which will allow your script to run itself without a // timer block. Runtime.UpdateFrequency = UpdateFrequency.Update100; speakers = new SpeakerManager(); airTanks = new AirManager(); welders = new WelderManager(); doors = new DoorManager(speakers, airTanks); }
private void Awake() { instance = GetComponent <AirManager>(); InvokeRepeating("AirGenUpdate", 0, 0.02f); }