My question arises when I started to work on a second enemy for my game. Essentially, I want to be able to use one script for the decision making of all enemies, while each prefab has a different script concerning what moves correspond to those decisions.
I was wondering if its possible to ‘drop’ scripts the same way transforms can be dropped in to access functions on one script with the same name as functions on a different script.
I’ve included a part of my code to hopefully make my question more clear:
What I would like is that the script 'EnemyMovesScript does not have to only refer to one script, but that for each prefab I can attach a different script describing the moves that are available to that enemy prefab.
Thanks in advance!