public void doNothing()
 {
     if (!checkingButton && playerIsActive)
     {
         checkingButton = true;
         playerCarScript.doNothing();
         playerHaveMadeNextAction();
         checkingButton = false;
     }
 }
    public void nextCarAction()
    {
        if (debugMode)
        {
            print("NextCarAction");
        }
        TileForList nextMove = getNextMove();

        Debug.Log(nextMove.ToString());
        string nextAction = nextMove.thisAction;

        if (nextAction.Equals("Finish"))
        {
            if (debugMode)
            {
                print("Car has finished");
            }
            haveFinished = true;
        }
        else if (nextAction.Equals("Accelerate"))
        {
            if (debugMode)
            {
                print("AccelerateCar");
            }
            carScript.accelerate();
        }
        else if (nextAction.Equals("Deaccelerate"))
        {
            if (debugMode)
            {
                print("DeaccelerateCar");
            }
            carScript.deaccelerate();
        }
        else if (nextAction.Equals("Do Nothing"))
        {
            if (debugMode)
            {
                print("Do No action with car");
            }
            carScript.doNothing();
        }
        else if (nextAction.Equals("Move Up"))
        {
            if (debugMode)
            {
                print("Move car up");
            }
            carScript.moveUp();
        }
        else if (nextAction.Equals("Move Down"))
        {
            if (debugMode)
            {
                print("Move car down");
            }
            carScript.moveDown();
        }
        else
        {
            if (debugMode)
            {
                print("AI could not find an action with this name: " + nextAction);
            }
        }
        if (debugMode)
        {
            print("End NextCarAction");
        }
    }