Пример #1
0
        private IEnumerator PlayFlightAnimation()
        {
            System.Random random = new System.Random();
            while (true)
            {
                // TODO: animate

                _audioSource.PlayOneShot(Type.FlightAudioClip);

                float wait = random.NextSingle(PlayerManager.Instance.PlayerData.MinFlightAnimationCooldown, PlayerManager.Instance.PlayerData.MaxFlightAnimationCooldown);
                yield return(new WaitForSeconds(wait));
            }
        }