Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
 public virtual void Initialize()
 {
     BatterySwitch.Initialize();
     MasterKey.Initialize();
     ElectricTrainSupplySwitch.Initialize();
 }