home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Acao / midnightstrike1.swf / scripts / __Packages / com / neodelight / v2D / AnimationManager.as next >
Encoding:
Text File  |  2007-04-02  |  972 b   |  41 lines

  1. class com.neodelight.v2D.AnimationManager
  2. {
  3.    var mc;
  4.    var engine;
  5.    var config;
  6.    var fxLib;
  7.    var prefix;
  8.    var fader;
  9.    function AnimationManager(mc, engine)
  10.    {
  11.       this.mc = mc;
  12.       this.engine = engine;
  13.       this.config = engine.config;
  14.       this.fxLib = this.config.animManagerFx;
  15.       this.prefix = "";
  16.       this.fader = new com.neodelight.std.ColorFader(this.mc);
  17.    }
  18.    function visualize(stat, priority)
  19.    {
  20.       if(this.fxLib[stat])
  21.       {
  22.          this.fader.fadeTo(this.fxLib[stat],0);
  23.          this.fader.fadeTo(com.neodelight.std.ColorFader.FX_NONE,this.fxLib[stat].dt);
  24.          this.engine.animMgrStep = true;
  25.       }
  26.       else
  27.       {
  28.          this.fader.reset();
  29.          this.engine.animMgrStep = false;
  30.          this.mc.gfx.gotoAndPlay(this.prefix + stat);
  31.       }
  32.    }
  33.    function move()
  34.    {
  35.       if(!this.fader.step())
  36.       {
  37.          this.engine.animMgrStep = false;
  38.       }
  39.    }
  40. }
  41.