public Railcar(SharedTrain train, RailcarModel model, TrackPosition position) : base(train, model, position) { dummyObject = new WorldObject(321, Vector3.Zero) { Alpha = 0, CollisionsEnabled = false, }; dummyObject.SetStreamable(false); ClientRailManager m = (ClientRailManager)train.RailManager; trainVehicle = new Slipe.Client.Vehicles.Train(m.GetVehicleModelFromRailcar(model), Vector3.Zero) { Derailed = true }; trainVehicle.SetStreamable(false); if (!model.IsEngine) { trainVehicle.OverrideLights = Slipe.Shared.Vehicles.OverrideLightState.ForcedOff; } trainVehicle.AttachTo(dummyObject, new Vector3(0, 0, model.Height), Vector3.Zero); FrontPosition = position; random = new Random(); OnNodePass += PlaySoundEffect; }
public Train(ClientRailManager manager, RailcarModel engineModel, TrackPosition position) : base(manager, engineModel, position) { Railcar engine = new Railcar(this, engineModel, position); Railcars.Add(engine); }