We need to write something into those textboxes. What we'll do in this case is call an
update method in
HUD periodically, so that it can refresh the data and print it on the screen:
function HUD:update () local x, y = Character.prop:getScl ()
if x > 0 then self.leftRightIndicator:setString ( "Left" ) else self.leftRightIndicator:setString ( "Right" ) end
xaxis, and to
1to turn the character to the left. So that's what we're doing here. If the
xvalue of the scale is positive, then we're facing left. ...