using System.Collections; using System.Collections.Generic; using UnityEngine; public class DroneMovement : MonoBehaviour { public float speed = 20f; private bool _moving = true; public void StopMoving() { _moving = false; } public void ResumeMoving() { _moving = true; } void Update() { if (!_moving) return; transform.position += Vector3.forward * speed * Time.deltaTime; } }