home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Nave / Graviton.swf / scripts / DefineSprite_103 / frame_1 / DoAction.as
Encoding:
Text File  |  2005-08-05  |  817 b   |  38 lines

  1. if("0" < eval("/:fuel"))
  2. {
  3.    rotation = int(getProperty("../", _rotation));
  4.    if("90" < rotation)
  5.    {
  6.       rotation = "90" - (rotation - "90");
  7.       direction = - "1";
  8.    }
  9.    else if(rotation < - "90")
  10.    {
  11.       rotation = - "90" + (rotation + "90");
  12.       direction = - "1";
  13.    }
  14.    else
  15.    {
  16.       direction = "1";
  17.    }
  18.    set("../:vx",eval("../:vx") + eval("/:thrust") * (rotation / "720"));
  19.    if(rotation < "0")
  20.    {
  21.       rotation = - rotation;
  22.    }
  23.    if(rotation < "18")
  24.    {
  25.       rotation = "1";
  26.    }
  27.    set("../:vy",eval("../:vy") - eval("/:thrust") / rotation * direction);
  28.    set("/:fuel",eval("/:fuel") - "3");
  29.    setProperty("/fuelgauge/bar", _xscale, eval("/:fuel") / "10");
  30. }
  31. else
  32. {
  33.    tellTarget("../")
  34.    {
  35.       gotoAndStop(_currentframe - "1");
  36.    }
  37. }
  38.