benshepherd icon

Untitled

benshepherd | PRO | 02/01/17 01:28:46 PM UTC | 0 ⭐ | 475 👁️ | Never ⏰ | []
JavaScript |

590 B

|

None

|

0 👍

/

0 👎

    this.setHabboLeft = function(src)
    {
        var self = this;
        var callback = function() {
            self.draw(self);
        }
 
        this.habboLeft = getImage(src, callback);
    }
 
    this.update = function()
    {   
        this.draw(this);
    }
 
    this.draw = function(options)
    {
        if(options.background != null) {
            ctx.drawImage(options.background,0,0);
        }
 
        if(options.habboLeft != null) {
            ctx.drawImage(options.habboLeft, options.habboLeft_x, options.habboLeft_y);
        }
 
        if(options.habboRight != null) {
            ctx.drawImage(options.habboRight, options.habboRight_x, options.habboRight_y);
        }       
    }

Comments