Advertisement
benshepherd

Untitled

Feb 1st, 2017
285
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     this.setHabboLeft = function(src)
  2.     {
  3.         var self = this;
  4.         var callback = function() {
  5.             self.draw(self);
  6.         }
  7.  
  8.         this.habboLeft = getImage(src, callback);
  9.     }
  10.  
  11.     this.update = function()
  12.     {  
  13.         this.draw(this);
  14.     }
  15.  
  16.     this.draw = function(options)
  17.     {
  18.         if(options.background != null) {
  19.             ctx.drawImage(options.background,0,0);
  20.         }
  21.  
  22.         if(options.habboLeft != null) {
  23.             ctx.drawImage(options.habboLeft, options.habboLeft_x, options.habboLeft_y);
  24.         }
  25.  
  26.         if(options.habboRight != null) {
  27.             ctx.drawImage(options.habboRight, options.habboRight_x, options.habboRight_y);
  28.         }      
  29.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement