📜  javascript代码示例中对象的移动

📅  最后修改于: 2022-03-11 15:02:26.730000             🧑  作者: Mango

代码示例1
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);
}