protected void Update() { MovementService.TranslateObjectVertically(this.gameObject, verticalDirection, minSpeed); MovementService.TranslateObjectHorizontally(this.gameObject, horizontalDirection, minSpeed); SetSpriteDirection(); }
private void Update() { MovementService.TranslateObjectHorizontally(this.gameObject, horizontalDirection, speed); if (horizontalDirection == 1 && transform.position.x > rightEdge + offSetAfterLimit) { RecallProp(); } if (horizontalDirection == -1 && transform.position.x < leftEdge - offSetAfterLimit) { RecallProp(); } }