Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Entita.prototype.draw = function (){
- this.context.rect(this.posizione_x,this.posizione_y,this.width,this.height);
- this.context.stroke();
- };
- Entita.prototype.clear = function () {
- // this.context.clearRect(this.posizione_x, this.posizione_y, this.width, this.height);
- //Richiamo il metodo per la creazione di un rettangolo con background
- this.context.clearRect(this.posizione_x-4, this.posizione_y-4, this.width+10, this.height+10);
- };
- Entita.prototype.enlarge = function (w,h) {
- this.clear();
- this.width = w;
- this.height = h;
- this.draw();
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement