1 decade ago by ansimuz
Hi
I want to override a function defined in a parent entity. How can i do this.
The parent has this:
I want the child entity to behave different. For example i dont want it to have a wall collision return.
Hope it makes sense.
I want to override a function defined in a parent entity. How can i do this.
The parent has this:
handleMovementTrace: function(res){ this.parent(res); // wall collision if(res.collision.x){ this.flip = !this.flip; } },
I want the child entity to behave different. For example i dont want it to have a wall collision return.
handleMovementTrace: function(res){ // remove wall collision this.parent(res); if(res.collision.x){ this.flip = this.flip; } }
Hope it makes sense.