home *** CD-ROM | disk | FTP | other *** search
/ Champak 48 / cdrom_image.iso / Games / bobsleddin.swf / scripts / __Packages / GamePoint.as < prev    next >
Encoding:
Text File  |  2007-09-28  |  842 b   |  33 lines

  1. class GamePoint extends Collectable
  2. {
  3.    var linkageID;
  4.    var value;
  5.    static var LOW_VALUE = 0;
  6.    static var MEDIUM_VALUE = 1;
  7.    static var HIGH_VALUE = 2;
  8.    var collisionGroup = BB.POINTS;
  9.    var collectedSound = "Point Small";
  10.    function GamePoint(type)
  11.    {
  12.       super();
  13.       switch(type)
  14.       {
  15.          case GamePoint.LOW_VALUE:
  16.          default:
  17.             this.linkageID = "PointLowValue";
  18.             this.value = 250;
  19.             this.collectedSound = "Point Small";
  20.             break;
  21.          case GamePoint.HIGH_VALUE:
  22.             this.linkageID = "PointHighValue";
  23.             this.value = 1000;
  24.             this.collectedSound = "Point Large";
  25.             this.setObjectSound("Point Large",_root);
  26.       }
  27.    }
  28.    function awardValue(obj)
  29.    {
  30.       obj.addPoints(this.value);
  31.    }
  32. }
  33.