// Use this for initialization
    void Start()
    {
        myTransform = transform;
        runnerPosition = RunnerPosition.MIDDLE;
        movementLeft = 0;
        moving = false;
        movingHorizontal = false;
        direction = new Vector3(0, 1, 0);
        directionHorizontal = new Vector3(1, 0, 0);
        horizontalMovement = 0;
        repere1 = GameObject.Find("LeftMark").transform;
        repere2 = GameObject.Find("RightMark").transform;

    }
 public void MoveDown()
 {
     switch (runnerPosition)
     {
         case RunnerPosition.MIDDLE:
             moving = true;
             direction = new Vector3(0, -1, 0);
             movementLeft = nextPositionDistance;
             runnerPosition = RunnerPosition.BOTTOM;
             break;
         case RunnerPosition.TOP:
             moving = true;
             direction = new Vector3(0, -1, 0);
             movementLeft = nextPositionDistance;
             runnerPosition = RunnerPosition.MIDDLE;
             break;
     }
 }
 public void MoveUp()
 {
     //Debug.Log("UP");
     switch (runnerPosition)
     {
         case RunnerPosition.MIDDLE:
             moving = true;
             direction = new Vector3(0, 1, 0);
             movementLeft = nextPositionDistance;
             runnerPosition = RunnerPosition.TOP;
            // Debug.Log("MIDDLE -> TOP");
             break;
         case RunnerPosition.BOTTOM:
             moving = true;
             direction = new Vector3(0, 1, 0);
             movementLeft = nextPositionDistance;
             runnerPosition = RunnerPosition.MIDDLE;
            // Debug.Log("BOTTOM -> MIDDLE");
             break;
     }
 }