home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Aventura / climatechaos.swf / scripts / __Packages / Island.as < prev    next >
Encoding:
Text File  |  2008-09-12  |  1.7 KB  |  61 lines

  1. class Island extends Object
  2. {
  3.    var weather_num;
  4.    var buildings;
  5.    var people;
  6.    var objects;
  7.    var ground;
  8.    var height_map;
  9.    var low_x;
  10.    var high_x;
  11.    var low_y;
  12.    var high_y;
  13.    function Island()
  14.    {
  15.       super();
  16.       this.weather_num = 1;
  17.       this.buildings = [];
  18.       this.people = [];
  19.       this.objects = [];
  20.       this.ground = 0;
  21.       this.height_map = new flash.display.BitmapData(100,100);
  22.    }
  23.    function addPerson(p_clip, p_x, p_y, p_photo, p_speech, p_descript, p_use_item, p_show_photo)
  24.    {
  25.       this.people[this.people.length] = {clip:p_clip,x:p_x,y:p_y,photo:p_photo,speech:p_speech,descript:p_descript,use_item:p_use_item,show_photo:p_show_photo};
  26.    }
  27.    function addBuilding(p_clip, p_x, p_y, p_photo, p_room)
  28.    {
  29.       this.buildings[this.buildings.length] = {clip:p_clip,x:p_x,y:p_y,photo:p_photo,room:p_room};
  30.    }
  31.    function addObject(p_clip, p_x, p_y, p_photo, p_radius, p_pickup, p_movable)
  32.    {
  33.       this.objects[this.objects.length] = {clip:p_clip,x:p_x,y:p_y,photo:p_photo,radius:p_radius,pickup:p_pickup,movable:p_movable};
  34.    }
  35.    function setLimits(p_lx, p_hx, p_ly, p_hy)
  36.    {
  37.       this.low_x = p_lx;
  38.       this.high_x = p_hx;
  39.       this.low_y = p_ly;
  40.       this.high_y = p_hy;
  41.    }
  42.    function setGround(p_ground, p_hm)
  43.    {
  44.       this.ground = p_ground;
  45.       this.height_map = flash.display.BitmapData.loadBitmap(p_hm);
  46.    }
  47.    function setWeather(p_weather)
  48.    {
  49.       this.weather_num = p_weather;
  50.    }
  51.    function copyIsland()
  52.    {
  53.       var _loc2_ = new Island();
  54.       for(var _loc3_ in this)
  55.       {
  56.          _loc2_[_loc3_] = this[_loc3_];
  57.       }
  58.       return _loc2_;
  59.    }
  60. }
  61.