Question by
ThomasKang · Sep 27, 2016 at 10:55 PM ·
componentsarchitecture
How to get custom classes (or components) to talk with each other?
Right now I have a script "Movement" that controls all the movement, and the scripts for "Player", "Enemy", and "Bullet" inherit from that movement script since they all move.
Player and Enemy have health, but Bullet does not, while Player has input and Enemy does not.
How do I make this more component based? I'm thinking about using interfaces or separate scripts for Health, Movement, and Input. But I don't understand how to get the different scripts to communicate with each other.
Comment