xx 1 سال پیش
والد
کامیت
bf295ec800
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      assets/script/game/car.ts

+ 2 - 2
assets/script/game/car.ts

@@ -357,7 +357,7 @@ export class car extends Component {
                 }
 
                 if(x<=left){
-                    x = this.node.position.x
+                    x = left+size.width*0.5
                 }
             }
 
@@ -368,7 +368,7 @@ export class car extends Component {
                     x = right_x-5
                 }
                 if(x>=right){
-                    x = this.node.position.x
+                    x = right-size.width*0.5
                 }
             }