示例#1
0
        public bool TryShow(string dialogName)
        {
            RootObject rootObject =
                GlobalContent.GetFile(dialogName) as RootObject;

            return(TryShow(rootObject));
        }
示例#2
0
        private void PlayTypingSoundEffect()
        {
            if (lastTypePlayAttemptSuccessful)
            {
                lastTypeSoundEffectNumber = FlatRedBallServices.Random.Next(1, 6);
            }
            var soundType           = "TypewriterKey";
            var stringName          = $"{soundType}{lastTypeSoundEffectNumber}Sound";
            var soundEffectAsObject = GlobalContent.GetFile(stringName);

            if (soundEffectAsObject is SoundEffect soundEffect)
            {
                lastTypePlayAttemptSuccessful = SoundManager.PlayIfNotPlaying(soundEffect, soundType);
            }
        }