public bool TryShow(string dialogName) { RootObject rootObject = GlobalContent.GetFile(dialogName) as RootObject; return(TryShow(rootObject)); }
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); } }