using UnityEngine; public class soundBird_CanFly : MonoBehaviour { public bool canFly = true; // Start is called once before the first execution of Update after the MonoBehaviour is created void Start() { } public void birdCanHear(bool canhear) { if (canhear) { canFly = true; } else { canFly = false; } } }