i am making the invador game and i want to move the shooter by mouse touch in html5 but i cant here is my code
shooter1.mousemove = shooter1.touchmove = function(data)
{
if(this.dragging)
{
// need to get parent coords..
var newPosition = this.data.getLocalPosition(this.parent);
shooter1.style.x = newPosition.x;
shooter1.style.y = newPosition.y;
}
}
Comments
Leave a comment