// Update is called once per frame
 public override void OnInspectorGUI()
 {
     DrawDefaultInspector();
     if (GUILayout.Button("change target position"))
     {
         pos = (pos + 1) % 5;
         Debug.Log(pos);
         targetDebug.RepositionCurrentTargetTo(positions[pos]);
     }
 }
    // Use this for initialization
    void Start()
    {
        if (currentTarget == null)
        {
            GameObject newTarget = GameObject.CreatePrimitive(PrimitiveType.Cube);
            currentTarget = newTarget.AddComponent <TargetDebug>();
            currentTarget.RepositionCurrentTargetTo(Vector3.zero);
        }

        currentTarget.posChangeEvent += TargetPositionUpdate;

        characterController = GetComponent <CharacterController>();
        lineRenderer        = GetComponent <LineRenderer>();
        lineRenderer.SetPosition(0, currentTarget.transform.position);
        currentAngle = Vector3.SignedAngle(Vector3.forward, transform.position, Vector3.up);
    }