public void Start()
    {
        addWheel(flightTimeCounterMin, hour0);
        addWheel(flightTimeCounterMin, hour1);
        addWheel(flightTimeCounterHour, hour2);
        addWheel(flightTimeCounterHour, hour3);
        addWheel(flightTimeCounterHour, hour4);
        addWheel(cycleCounter, cycle0);
        addWheel(cycleCounter, cycle1);
        addWheel(cycleCounter, cycle2);

        flightTimeCounterHour.rotationAxis = rotationAxis;
        flightTimeCounterHour.defaultRotation = defaultRotation;
        flightTimeCounterMin.rotationAxis = rotationAxis;
        flightTimeCounterMin.defaultRotation = defaultRotation;
        cycleCounter.rotationAxis = rotationAxis;
        cycleCounter.defaultRotation = defaultRotation;
        //Debug.Log("altimeter Counter list: " + analogCounter.wheels.Count);

        maintenanceInfo = part.Modules.OfType<FSmaintenanceInfo>().FirstOrDefault();
        if (maintenanceInfo != null)
        {
            flightTime = maintenanceInfo.flightTime;
            cycles = maintenanceInfo.cycles;
        }

        cycleButton = base.internalProp.FindModelTransform(cycleButtonName).gameObject;
        cycleButtonHandler = cycleButton.AddComponent<FSgenericButtonHandler>();
        cycleButtonHandler.mouseDownFunction = addCycle;
    }
Пример #2
0
    public void Start()
    {
        addWheel(flightTimeCounterMin, hour0);
        addWheel(flightTimeCounterMin, hour1);
        addWheel(flightTimeCounterHour, hour2);
        addWheel(flightTimeCounterHour, hour3);
        addWheel(flightTimeCounterHour, hour4);
        addWheel(cycleCounter, cycle0);
        addWheel(cycleCounter, cycle1);
        addWheel(cycleCounter, cycle2);

        flightTimeCounterHour.rotationAxis    = rotationAxis;
        flightTimeCounterHour.defaultRotation = defaultRotation;
        flightTimeCounterMin.rotationAxis     = rotationAxis;
        flightTimeCounterMin.defaultRotation  = defaultRotation;
        cycleCounter.rotationAxis             = rotationAxis;
        cycleCounter.defaultRotation          = defaultRotation;
        //Debug.Log("altimeter Counter list: " + analogCounter.wheels.Count);

        maintenanceInfo = part.Modules.OfType <FSmaintenanceInfo>().FirstOrDefault();
        if (maintenanceInfo != null)
        {
            flightTime = maintenanceInfo.flightTime;
            cycles     = maintenanceInfo.cycles;
        }

        cycleButton        = base.internalProp.FindModelTransform(cycleButtonName).gameObject;
        cycleButtonHandler = cycleButton.AddComponent <FSgenericButtonHandler>();
        cycleButtonHandler.mouseDownFunction = addCycle;
    }