OpenBve.Scripting.Train.rightDoorsTarget C# (CSharp) Method

rightDoorsTarget() public static method

Returns whether the left doors are opening for the selected train
public static rightDoorsTarget ( TrainManager Train ) : bool
Train TrainManager The selected train
return bool
            public static bool rightDoorsTarget(TrainManager.Train Train)
            {
                if (Train == null) return false;
                for (int j = 0; j < Train.Cars.Length; j++)
                {
                    for (int k = 0; k < Train.Cars.Length; k++)
                    {
                        if (Train.Cars[j].Specs.AnticipatedRightDoorsOpened)
                        {
                            return true;
                        }
                    }
                }
                return false;
            }

Same methods

Scripting.Train::rightDoorsTarget ( TrainManager Train, int CarIndex ) : bool