How Can I Turn This Javascript Code Into Phaser Code? -


if(mouse.x && mouse.y) {   mygameball.x = mouse.x;   mygameball.y = mouse.y; } 

how can turn javascript code phaser code?

you can use game.input, this

create = function() {     // ..     this.game.input.addmovecallback(this.domygamemousemove, this); }  domygamemousemove = function(evt) {     if (evt.isdown) {         mygameball.x = evt.x;         mygameball.y = evt.y;     } } 

Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -