home *** CD-ROM | disk | FTP | other *** search
/ Champak 108 / jogo-disk-108.iso / Games / rush_hour.swf / scripts / __Packages / PlayerCar.as < prev    next >
Text File  |  2010-05-15  |  529b  |  28 lines

  1. class PlayerCar extends Car1
  2. {
  3.    var cartype = "playercar";
  4.    function PlayerCar()
  5.    {
  6.       super();
  7.    }
  8.    function onRelease()
  9.    {
  10.       super.onRelease();
  11.       if(this.ypos == 5)
  12.       {
  13.          if(this._parent.mode == "training")
  14.          {
  15.             this._parent.endOfGame();
  16.          }
  17.          else if(this._parent.mode == "competition")
  18.          {
  19.             this._parent.endOfCompetition();
  20.          }
  21.       }
  22.    }
  23.    function onReleaseOutside()
  24.    {
  25.       this.onRelease();
  26.    }
  27. }
  28.