1 using System.Collections;
2 using System.Collections.Generic;
5 public class PlatformBird : MonoBehaviour
9 public Transform rightTurningPoint;
10 public Transform leftTurningPoint;
14 // Update is called once per frame
17 if (transform.position.x > leftTurningPoint.position.x)
22 else if (transform.position.x < rightTurningPoint.position.x)
29 transform.position += transform.right * (Time.deltaTime * speed);
33 transform.position -= transform.right * (Time.deltaTime * speed);