예제 #1
0
    protected void Move(float accel, float turn)
    {
        finalStats = baseStats;
        inputAccel = accel;

        MoveVehicle(accel, turn);
    }
예제 #2
0
    void Awake()
    {
        Rigidbody = GetComponent <Rigidbody>();
        Collider  = GetComponentInChildren <BoxCollider>();

        sensor           = gameObject.AddComponent <NPCSensor>();
        sensor.Vehicle   = this;
        sensor.rayLength = SENSOR_LENGTH;

        Weight = 200;

        baseStats = new Vehicle.Stats
        {
            TopSpeed            = 10f,
            Acceleration        = 5f,
            AccelerationCurve   = 5f,
            Braking             = 10f,
            ReverseAcceleration = 5f,
            ReverseSpeed        = 5f,
            Steer        = 10f,
            CoastingDrag = 8f,
            Grip         = 1f,
            AddedGravity = 1f,
            Suspension   = .2f
        };
    }
예제 #3
0
    void Awake()
    {
        Rigidbody = GetComponent <Rigidbody>();
        Collider  = GetComponentInChildren <BoxCollider>();

        baseStats = new Vehicle.Stats
        {
            TopSpeed            = 11f,
            Acceleration        = 5f,
            AccelerationCurve   = 5f,
            Braking             = 10f,
            ReverseAcceleration = 5f,
            ReverseSpeed        = 5f,
            Steer        = 10f,
            CoastingDrag = 4f,
            Grip         = .95f,
            AddedGravity = 5f,
            Suspension   = .2f
        };

        Weight = 2000;
    }