Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

movement of objects in javascript

var x = 0;
var y = 0;

if(right.arrow == pressed){
Math.add(this.position.x + 10);    
}    
    
if(left.arrow == pressed){
    Math.sub(this.position.x - 10);
}
 
PREVIOUS NEXT
Tagged: #movement #objects #javascript
ADD COMMENT
Topic
Name
2+9 =