using UnityEngine; public class FlappyBird : MonoBehaviour { public float jumpForce = 0.1f; public float moveSpeedX = 200.0f; public float moveSpeedY = 0f; public float moveSpeedZ = 0f; Rigidbody rb; void Start() { rb = GetComponent(); } void Update() { if (Input.GetButton("Jump")) { rb.AddForce(new Vector3(0f, jumpForce, 0f)); } } void FixedUpdate() { transform.position += new Vector3(moveSpeedX, moveSpeedY, moveSpeedZ); } }