home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Acao / batman_cobble.swf / scripts / frame_16 / DoAction_17.as < prev    next >
Encoding:
Text File  |  2006-06-13  |  863 b   |  33 lines

  1. _global.comboLogic = function()
  2. {
  3.    if(_root.comboMeter)
  4.    {
  5.       this.gotoAndStop(_root.hitCount);
  6.       targetx = _root.game.player._x - _root.playerDir * 70;
  7.       targety = _root.game.player._y - 20;
  8.       _root.comboCount = _root.comboCount - 1;
  9.       if(_root.comboCount < 0)
  10.       {
  11.          this._alpha -= 10;
  12.          if(this._alpha < 0)
  13.          {
  14.             _root.comboMeter = false;
  15.             _root.score += _root.hitCount * 10;
  16.             _root.hitCount = 0;
  17.          }
  18.       }
  19.       else if(this._alpha < 100)
  20.       {
  21.          this._alpha += (100 - this._alpha) / 4;
  22.       }
  23.    }
  24.    else
  25.    {
  26.       this._alpha = 0;
  27.       targetx = _root.game.player._x + _root.playerDir * 70;
  28.       targety = _root.game.player._y - 20;
  29.    }
  30.    this._x += (targetx - this._x) * 1.8;
  31.    this._y += (targety - this._y) * 1.8;
  32. };
  33.