I have one sprite wit 3 animation frames: 1kg, 2kg, 5kg
What events should looks like when i want to calculate total weight?
if frame animation 0 is displayed add 1kg
if frame is 1 add to total 2kg
if frame displays 2 animation frame add 5kg to total weight
also when i click mouse button on one sprite weight total weight should calculate again
when i spawn new weight also should sum all weights on game and display on text?