public override void Trigger(int Direction, EventTriggerType TriggerType, AbstractTrain Train, AbstractCar Car) { if (Train == null) { return; } if (TriggerType == EventTriggerType.RearCarRearAxle & !Train.IsPlayerTrain) { Train.Dispose(); } else if (Train.IsPlayerTrain) { Train.Derail(Car, 0.0); } if (TriggerType == EventTriggerType.Camera) { Camera.AtWorldEnd = !Camera.AtWorldEnd; } }
public override void Trigger(int direction, TrackFollower trackFollower) { AbstractTrain train = trackFollower.Train; if (train == null) { return; } if (trackFollower.TriggerType == EventTriggerType.RearCarRearAxle & !train.IsPlayerTrain) { train.Dispose(); } else if (train.IsPlayerTrain) { train.Derail(trackFollower.Car, 0.0); } if (trackFollower.TriggerType == EventTriggerType.Camera) { currentHost.CameraAtWorldEnd(); } }