Greetings.
I'm trying to make an enemies units, using a two family for that.
Enemy unit made of two objects:
Base (sprite) - using for all interaction with other game bases.
Art (sprite) - using for visualisation of current enemy activity.
I have a two family, Base for all bases sprites and Art for all art sprites.
Also i'm using a containers for each type of unit and put into that containers base and art sprites.
So container 1 contain (base1 and art1).
Container 2 (base2, art2).
Container 3 (base3, art3).
Art have a variable "baseUID".
When art sprites created i'm put into that variable value of base.UID. So i'm can anytime compare value of base.UID and art.baseUID for choosing correct base and art of unit.
Bases have a variable "currentAnimation". I'm seting this variable when i need to play a certain animation.
Then i'm set animations for "Art" based on base.currentAnim value.
And here i have a problem with correctly chsoosing of "art" sprites.
This is an example: drive.google.com/file/d/1QhrTKNo-1PSF3KfJ9YDlk0dw3sBmZI2K/view
As you can see (in debug mode of cource) the variable "currentAnimation" get correct value.
But animation of art is incorrect.
Help me please to understand what i'm doing wrong.
Hope my engrish is understandable and i'm discribed my problem well.