1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
package fortress; /** * Score the score gained from something at a location on the screen. */ class ScoreLiveObject extends TextLiveObject { /** * @param lo [in] LiveObject to place score beside, if null score will be centered * @param score [in] which score to display */ public function new( gd :GameDriver, lo : LiveObject, score : Int ) { var text = if( score >= 0 ) "+" + score else "" + score; super( gd, lo, text, true ); } } |