home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Aventura / starisland.swf / scripts / __Packages / org / cove / flade / primitives / RectangleParticle.as < prev    next >
Encoding:
Text File  |  2007-12-10  |  853 b   |  32 lines

  1. class org.cove.flade.primitives.RectangleParticle extends org.cove.flade.primitives.Particle
  2. {
  3.    var width;
  4.    var height;
  5.    var vertex;
  6.    var extents;
  7.    var isVisible;
  8.    var dmc;
  9.    var curr;
  10.    function RectangleParticle(px, py, w, h, rootmc)
  11.    {
  12.       super(px,py,rootmc);
  13.       this.width = w;
  14.       this.height = h;
  15.       this.vertex = new org.cove.flade.util.Vector(0,0);
  16.       this.extents = new org.cove.flade.util.Vector(w / 2,h / 2);
  17.    }
  18.    function paint()
  19.    {
  20.       if(this.isVisible)
  21.       {
  22.          this.dmc.clear();
  23.          this.dmc.lineStyle(0,6710886,100);
  24.          org.cove.flade.graphics.Graphics.paintRectangle(this.dmc,this.curr.x,this.curr.y,this.width,this.height);
  25.       }
  26.    }
  27.    function checkCollision(surface, sysObj)
  28.    {
  29.       surface.resolveRectangleCollision(this,sysObj);
  30.    }
  31. }
  32.