public virtual void Initialize() { if (!Activated) { if (ScriptName != null && ScriptName != "Default") { Script = Simulator.ScriptManager.Load(Path.Combine(Path.GetDirectoryName(Wagon.WagFilePath), "Script"), ScriptName) as PassengerCarPowerSupply; } if (Script == null) { Script = new DefaultPassengerCarPowerSupply(); } AssignScriptFunctions(); Script.Initialize(); Activated = true; } BatterySwitch.Initialize(); }
public virtual void Initialize() { BatterySwitch.Initialize(); MasterKey.Initialize(); ElectricTrainSupplySwitch.Initialize(); }