Exemple #1
0
    private void Update()
    {
        CPlayerState PlayerState = MGameplayStatic.GetPlayerState();

        if (PlayerState == null)
        {
            return;
        }

        SCarInfo CarInfo = PlayerState.CurrentCar.CarInfo;

        FuelRatio = CarInfo.Fuel / CarInfo.MaxFuel;
    }
Exemple #2
0
    SCarInfo(SCarInfo CarInfo)
    {
        /*
         * Type type = typeof(SCarInfo);
         *
         * foreach(FieldInfo field in type.GetFields())
         * {
         *  field.SetValue(this, field.GetValue(CarInfo));
         * }
         */

        this.MaxSpeed     = CarInfo.MaxSpeed;
        this.Acceleration = CarInfo.Acceleration;
        this.Friction     = CarInfo.Friction;
        this.Braking      = CarInfo.Braking;
        this.MaxAngle     = CarInfo.MaxAngle;
        this.MaxFuel      = CarInfo.MaxFuel;
        this.Fuel         = CarInfo.Fuel;
    }