public/js-roguelike-skeleton/src/mouse.js
function(e){
            if(e.type === 'mousemove' && this.onHover){
                this.onHover(e.clientX, e.clientY);
            }
            else if(e.type === 'mouseenter' && this.onHover){
                this.onHover(e.clientX, e.clientY);
            }
            else if(e.type === 'mouseleave' && this.onHover){
                this.onHover(false);
            }
            else if(e.type === 'click' && this.onClick){
                this.onClick(e.clientX, e.clientY);
            }
        }
function(e){
            if(e.type === 'mousemove' && this.onHover){
                this.onHover(e.clientX, e.clientY);
            }
            else if(e.type === 'mouseenter' && this.onHover){
                this.onHover(e.clientX, e.clientY);
            }
            else if(e.type === 'mouseleave' && this.onHover){
                this.onHover(false);
            }
            else if(e.type === 'click' && this.onClick){
                this.onClick(e.clientX, e.clientY);
            }
        }
function ( e ) { if ( e . type === 'mousemove' && this . onHover ) { this . onHover ( e . clientX , e . clientY ) ; } else if ( e . type === 'mouseenter' && this . onHover ) { this . onHover ( e . clientX , e . clientY ) ; } else if ( e . type === 'mouseleave' && this . onHover ) { this . onHover ( false ) ; } else if ( e . type === 'click' && this . onClick ) { this . onClick ( e . clientX , e . clientY ) ; } }
Hander for mouse events
@method handleEvent
@param {Event} e - mouse event
Hander for mouse events