Step 1:

In your MonoBehaviour script add IControllable after MonoBehaviour.

public class YourController: MonoBehaviour,IControllable 

Step 2:

Add the following variables and methods to your script.

//Variables
GameObject GetObject{get;}
bool AllowControl{get;set;}
bool AllowMovement{get;set;}

//Method
void Move(Vector3 direction,float duration=0);
//Variables
GameObject GetObject{get;}
bool AllowControl{get;set;}
bool AllowMovement{get;set;}

//Method
void Move(Vector3 direction,float duration=0);

Step 3:

GetObject (GameObject) - assign gameObject to this in Start();

AllowControl (bool) - use this to allow or block input for your controller. Optional

AllowMovement (bool) - use this to allow or block movement for your controller. Optional

void Move()

add your movement logic with direction as the input vector and duration specifying for how long the character should move.