home *** CD-ROM | disk | FTP | other *** search
/ Champak 48 / cdrom_image.iso / Games / breakawish.swf / scripts / __Packages / TrailTimmy.as < prev   
Encoding:
Text File  |  2007-09-28  |  898 b   |  45 lines

  1. class TrailTimmy extends BaseObject
  2. {
  3.    var mcRef;
  4.    static var nSTATICRotation = 0;
  5.    function TrailTimmy(__mcRef, _sAddonState)
  6.    {
  7.       super(__mcRef);
  8.       if(_sAddonState == undefined)
  9.       {
  10.          this.doDestroy();
  11.       }
  12.       else
  13.       {
  14.          TrailTimmy.nSTATICRotation += 30;
  15.          this.mcRef._rotation = TrailTimmy.nSTATICRotation;
  16.          this.setState("Out" + _sAddonState);
  17.          LevelManager.Instance.doAddListener(this);
  18.       }
  19.    }
  20.    function doDestroy()
  21.    {
  22.       LevelManager.Instance.doRemoveListener(this);
  23.       super.doDestroy();
  24.    }
  25.    function doOutSuit()
  26.    {
  27.       this.doOut();
  28.    }
  29.    function doOutNormal()
  30.    {
  31.       this.doOut();
  32.    }
  33.    function doOutGum()
  34.    {
  35.       this.doOut();
  36.    }
  37.    function doOut()
  38.    {
  39.       if(this.isStateComplete())
  40.       {
  41.          this.doDestroy();
  42.       }
  43.    }
  44. }
  45.