public void SetMatchScore(int scoreValue, int speedValue)
 {
     if (mDynamicsOnly == true)
     {
         DynamicsHandler _dynamicsHandlerScript = getDynamicsHandlerClass();
         _dynamicsHandlerScript.SetMatchScore(scoreValue, speedValue);
     }
     else
     {
         FuelHandler _fuelHandlerScript = getFuelHandlerClass();
         _fuelHandlerScript.SetMatchScore(scoreValue, speedValue);
     }
 }
 public void syncUserValues()
 {
     if (mDynamicsOnly == true)
     {
         DynamicsHandler _dynamicsHandlerScript = getDynamicsHandlerClass();
         _dynamicsHandlerScript.syncUserValues();
     }
     else
     {
         FuelHandler _fuelHandlerScript = getFuelHandlerClass();
         _fuelHandlerScript.syncUserValues();
     }
 }
 public void launchSinglePlayerGame()
 {
     if (mDynamicsOnly == true)
     {
         DynamicsHandler _dynamicsHandlerScript = getDynamicsHandlerClass();
         _dynamicsHandlerScript.launchSinglePlayerGame();
     }
     else
     {
         FuelHandler _fuelHandlerScript = getFuelHandlerClass();
         _fuelHandlerScript.launchSinglePlayerGame();
     }
 }
 public string getSplit1Name()
 {
     if (mDynamicsOnly == true)
     {
         DynamicsHandler _dynamicsHandlerScript = getDynamicsHandlerClass();
         return(_dynamicsHandlerScript.Split1Name);
     }
     else
     {
         FuelHandler _fuelHandlerScript = getFuelHandlerClass();
         return(_fuelHandlerScript.Split1Name);
     }
 }
 public float getGearFriction()
 {
     if (mDynamicsOnly == true)
     {
         DynamicsHandler _dynamicsHandlerScript = getDynamicsHandlerClass();
         return(_dynamicsHandlerScript.GearFriction);
     }
     else
     {
         FuelHandler _fuelHandlerScript = getFuelHandlerClass();
         return(_fuelHandlerScript.GearFriction);
     }
 }
 public int getGearShapeType()
 {
     if (mDynamicsOnly == true)
     {
         DynamicsHandler _dynamicsHandlerScript = getDynamicsHandlerClass();
         return(_dynamicsHandlerScript.GearShapeType);
     }
     else
     {
         FuelHandler _fuelHandlerScript = getFuelHandlerClass();
         return(_fuelHandlerScript.GearShapeType);
     }
 }
 public float getGameTime()
 {
     if (mDynamicsOnly == true)
     {
         DynamicsHandler _dynamicsHandlerScript = getDynamicsHandlerClass();
         return(_dynamicsHandlerScript.GameTime);
     }
     else
     {
         FuelHandler _fuelHandlerScript = getFuelHandlerClass();
         return(_fuelHandlerScript.GameTime);
     }
 }
 public GameMatchData getMatchData()
 {
     if (mDynamicsOnly == true)
     {
         DynamicsHandler _dynamicsHandlerScript = getDynamicsHandlerClass();
         return(_dynamicsHandlerScript.getMatchData());
     }
     else
     {
         FuelHandler _fuelHandlerScript = getFuelHandlerClass();
         return(_fuelHandlerScript.getMatchData());
     }
 }
    private DynamicsHandler getDynamicsHandlerClass()
    {
        GameObject _dynamicsHandler = GameObject.Find("DynamicsHandlerObject");

        if (_dynamicsHandler != null)
        {
            DynamicsHandler _dynamicsHandlerScript = _dynamicsHandler.GetComponent <DynamicsHandler> ();
            if (_dynamicsHandlerScript != null)
            {
                return(_dynamicsHandlerScript);
            }
            throw new Exception();
        }
        throw new Exception();
    }