public static DroneRacerJoystickInput FindDroneRacerJoystickInput()
        {
            DroneRacerJoystickInput drji = null;

            DroneRacer dr = DroneRacer.FindDroneRacer();

            if (dr != null)
            {
                drji = dr.GetComponent <DroneRacerJoystickInput>();
            }

            return(drji);
        }
Пример #2
0
        public static DroneRacerArm FindDroneRacerArm()
        {
            DroneRacerArm dra = null;

            DroneRacer dr = DroneRacer.FindDroneRacer();

            if (dr != null)
            {
                dra = dr.GetComponent <DroneRacerArm>();
            }

            return(dra);
        }
        public static void UpdateSettings()
        {
            DroneRacer dr = DroneRacer.FindDroneRacer();

            if (dr != null)
            {
                DroneRacerJoystickInput drji = dr.gameObject.GetComponent <DroneRacerJoystickInput>();

                drji.rotationRate     = PlayerPrefs.GetFloat(Constants.RotationRate);
                drji.halfRotationRate = drji.rotationRate / 2;

                drji.exponentialRate = PlayerPrefs.GetInt(Constants.ExponentialRate) == 0 ? false : true;

                drji.exponentialRateFactor = PlayerPrefs.GetFloat(Constants.ExponentialRateFactor);

                drji.throttleChangeRate = PlayerPrefs.GetFloat(Constants.ThrottleChangeRate);
            }
        }