Removing Dependency Incomplete

I understand the concept of removing dependency, and a mediator pattern came to mind but the mover script dependency in fighter is not removed,
the mover code is still used inside the fighter update method.

is there any further lecture on it down the road, or we have to do it manually by ourselves ?

We don’t.
We’re not as concerned with the dependency of Fighter on Mover. Every class will have some dependencies. What we’re concerned with is that these are one way dependencies.

If we had multiple classes for movement (for example, if in addition to having the NavMesh based Mover, you had characters who teleport to move), then it would be profitable to have some sort of an IMove interface which Fighter (and other classes down the road) could use to move a character.

Privacy & Terms