//Constructor public MoveCommand(MoveCommandReceiver reciever, MoveDirection direction, float distance, GameObject gameObjectToMove) { this._receiver = reciever; this._direction = direction; this._distance = distance; this._gameObject = gameObjectToMove; }
void Start() { moveCommandReciever = new MoveCommandReceiver(); if (objectToMove == null) { Debug.LogError("objectToMove must be assigned via inspector"); this.enabled = false; } }