home *** CD-ROM | disk | FTP | other *** search
/ Champak 48 / cdrom_image.iso / Games / alex_trax.swf / scripts / __Packages / com / neodelight / game / Player.as < prev    next >
Encoding:
Text File  |  2007-10-01  |  842 b   |  39 lines

  1. class com.neodelight.game.Player
  2. {
  3.    var config;
  4.    var name;
  5.    var abilities;
  6.    var items;
  7.    function Player(config)
  8.    {
  9.       trace("config: " + com.neodelight.std.XString.dump(config));
  10.       this.config = config;
  11.       this.name = config.name;
  12.       for(var _loc4_ in config.playerProps)
  13.       {
  14.          trace("prop:" + _loc4_);
  15.          this[_loc4_] = config.playerProps[_loc4_];
  16.       }
  17.       this.reset();
  18.       _global.player = this;
  19.    }
  20.    function reset()
  21.    {
  22.       trace("");
  23.       for(var _loc2_ in this.config.playerProps)
  24.       {
  25.          com.neodelight.game.PlayerProp(this[_loc2_]).reset();
  26.       }
  27.       this.abilities = new Object();
  28.       this.items = new Object();
  29.    }
  30.    function init()
  31.    {
  32.       trace("");
  33.    }
  34.    function toString()
  35.    {
  36.       return "[Player]";
  37.    }
  38. }
  39.