Esempio n. 1
0
 public BasicVehicle(GetPositionFunction getPositionFunction, GetRotationFunction getRotationFunction, MoveToPositionFunction moveToPositionFunction, JumpFunction jumpFunction, ObjectManager objectManager, float maxSteering, float maxVelocity, float maxAcceleration)
 {
     Velocity        = new Vector3(0, 0, 0);
     MaxSteering     = maxSteering;
     MaxVelocity     = maxVelocity;
     MaxAcceleration = maxAcceleration;
     GetRotation     = getRotationFunction;
     GetPosition     = getPositionFunction;
     MoveToPosition  = moveToPositionFunction;
     ObjectManager   = objectManager;
     Jump            = jumpFunction;
 }
Esempio n. 2
0
        public SmartMovementEngine(GetPositionFunction getPositionFunction, GetRotationFunction getRotationFunction, MoveToPositionFunction moveToPositionFunction, GeneratePathFunction generatePathFunction, JumpFunction jumpFunction, ObjectManager objectManager, MovementSettings movementSettings)
        {
            State            = MovementEngineState.None;
            GetPosition      = getPositionFunction;
            GetRotation      = getRotationFunction;
            MoveToPosition   = moveToPositionFunction;
            GeneratePath     = generatePathFunction;
            MovementSettings = movementSettings;
            ObjectManager    = objectManager;
            Jump             = jumpFunction;

            PlayerVehicle = new BasicVehicle(getPositionFunction, getRotationFunction, moveToPositionFunction, jumpFunction, objectManager, movementSettings.MaxSteering, movementSettings.MaxVelocity, movementSettings.MaxAcceleration);
        }