~eda-qa/dhlib/main

« back to all changes in this revision

Viewing changes to restricted/app-fortress/fortress/ScoreLiveObject.hx

  • Committer: edA-qa mort-ora-y
  • Date: 2010-02-16 05:36:32 UTC
  • Revision ID: eda-qa@disemia.com-20100216053632-60lt7fndfi3fgblw
first

Show diffs side-by-side

added added

removed removed

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