コード例 #1
0
    private void PanelHandleBack(UIStationPanel panel, TrainData trainData, int operationOut = 2)
    {
        int count = 0;

        for (int j = 1; j < trainData.Cars.Length + 1; j++)
        {
            panel.CarPanels [j].CalcAndSetCarIcon(trainData.Cars [count]);
            count++;
        }
        panel.CarPanels [0].CalcAndSetOperationIcon(operationOut, trainData.TrainDirection);
    }
コード例 #2
0
    private void PanelHandleForward(UIStationPanel panel, TrainData trainData, int operationBefore = 2)
    {
        int count = 0;

        for (int j = NUM_OF_CAR_PANELS - 2; j >= NUM_OF_CAR_PANELS - trainData.Cars.Length - 1; j--)
        {
            panel.CarPanels [j].CalcAndSetCarIcon(trainData.Cars [count]);
            count++;
        }
        panel.CarPanels [NUM_OF_CAR_PANELS - 1].CalcAndSetOperationIcon(operationBefore, trainData.TrainDirection);
    }