home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Acao / germ_roundup.swf / scripts / __Packages / MaggieHome.as < prev    next >
Encoding:
Text File  |  2007-03-20  |  500 b   |  23 lines

  1. class MaggieHome extends BuildingPart
  2. {
  3.    function MaggieHome()
  4.    {
  5.       super();
  6.    }
  7.    function render()
  8.    {
  9.       var _loc1_ = this;
  10.       var _loc2_ = smashing.Viewport.getPos(_loc1_);
  11.       if(_loc2_.x > smashing.Viewport.halfWidth)
  12.       {
  13.          _loc1_._visible = false;
  14.       }
  15.       else
  16.       {
  17.          _loc1_._visible = true;
  18.          _loc1_._x = _loc2_.x + smashing.Viewport.centerX;
  19.          _loc1_._y = _loc2_.y + smashing.Viewport.centerY;
  20.       }
  21.    }
  22. }
  23.