So i'm trying to make enemy tanks, where each enemy tank is made up of a few layers. My idea was to make a class dedicated to the coords of the enemy and a subclass for the layers. How would i let my subclass know the coords of the enemy when there are multiple enemies in the world? I tried using the subclass inheritance-creating public variables for x&y in the main class and then using them in the subclass but the layers just move to 0,0. How can i make this work?
