/// <summary>
        /// Compiles a <see cref="PlaySoundEffectTriggerAction"/> from the specified syntax node.
        /// </summary>
        private static PlaySoundEffectTriggerAction CompilePlaySfxTriggerAction(UvssPlaySfxTriggerActionSyntax node, CultureInfo culture)
        {
            var sfxAssetID =
                SourcedAssetID.Parse(node.Value.Value);

            return(new PlaySoundEffectTriggerAction(sfxAssetID));
        }
Beispiel #2
0
        /// <inheritdoc/>
        public override SyntaxNode VisitPlaySfxTriggerAction(UvssPlaySfxTriggerActionSyntax node)
        {
            var unchanged = true;

            var newPlaySfxKeyword = (SyntaxToken)Visit(node.PlaySfxKeyword);

            if (newPlaySfxKeyword != node.PlaySfxKeyword)
            {
                unchanged = false;
            }

            var newValue = (UvssPropertyValueWithBracesSyntax)Visit(node.Value);

            if (newValue != node.Value)
            {
                unchanged = false;
            }

            return(unchanged ? node : new UvssPlaySfxTriggerActionSyntax(
                       newPlaySfxKeyword,
                       newValue));
        }
 /// <summary>
 /// Visits the specified play-sfx trigger action node.
 /// </summary>
 /// <param name="node">The node to visit.</param>
 /// <returns>A node which should replace the visited node, or a reference to the visited node
 /// itself if no changes were made.</returns>
 public virtual SyntaxNode VisitPlaySfxTriggerAction(UvssPlaySfxTriggerActionSyntax node)
 {
     return(VisitSyntaxNode(node));
 }