Ejemplo n.º 1
0
 public LObjectCamera(RectBox r, object f, int width, int height,
         int horBorderPixel_0, int vertBorderPixel_1, Vector2f maxSpeed_2)
 {
     this.cameraX = 0;
     this.cameraY = 0;
     this.renderWidth = width;
     this.renderHeight = height;
     this.follow = new Bind(f);
     this.horBorderPixel = horBorderPixel_0;
     this.vertBorderPixel = vertBorderPixel_1;
     this.maxSpeed = maxSpeed_2;
     if (follow != null)
     {
         this.cameraX = follow.GetX() - (this.renderWidth / 2);
         this.cameraY = follow.GetY() - (this.renderHeight / 2);
     }
     this.cameraRect = r;
     this.visibleRect = new RectBox(cameraX - horBorderPixel_0, cameraY
             - vertBorderPixel_1, renderWidth + horBorderPixel_0, renderHeight
             + vertBorderPixel_1);
     this.moveRect = new RectBox(cameraX - horBorderPixel_0, cameraY
             - vertBorderPixel_1, renderWidth + horBorderPixel_0, renderHeight
             + vertBorderPixel_1);
     this.UpdateCamera();
 }
Ejemplo n.º 2
0
 public Gravity(string name_0, object o)
 {
     this.name = name_0;
     this.obj0 = o;
     this.bind = new Bind(o);
     this.enabled = true;
 }
Ejemplo n.º 3
0
 public virtual void Dispose()
 {
     this.enabled = false;
     this.bind = null;
 }
Ejemplo n.º 4
0
 public Gravity(object o)
 {
     this.obj0 = o;
     this.bind = new Bind(o);
     this.enabled = true;
 }