danpost wrote...
You need to declare the double values outside the method so the value is retained between act cycles. Then you need to set their initial values using your lines 11 and 12 (minus the declared types) in the addedToWorld method. Setting their initial values cannot be accomplished until the actor is added into the world (so, the constructor is ruled out as a place to put that code) and you only want to set their initial values once (so, the act method is ruled out as a place to put that code). From then on, you will be adjusting those values by adding the results of lines 18 and 19 (continuous action goes in the act method).
