public void VisitNodePlaySound(NodePlaySound nps)
 {
     if (nps.Sound == null)
     {
         _report.AddMessage(ProjectReportMessage.MessageSeverity.Error, "A play sound node has no sound.", nps);
     }
     if (nps.Volume == 0f)
     {
         _report.AddMessage(ProjectReportMessage.MessageSeverity.Warning, "A play sound node has volume set to 0.", nps);
     }
 }
Exemplo n.º 2
0
 public void VisitNodePlaySound(NodePlaySound nps)
 {
     _writer.WriteStartElement("NodePlaySound");
     if (nps.Sound != null)
     {
         _writer.WriteAttributeString("Path", _projectService.GetRelativePath(nps.Sound.Path));
     }
     _writer.WriteAttributeString("SoundType", nps.SoundType.ToString());
     _writer.WriteAttributeString("StartTime", nps.StartTime.ToString(CultureInfo.InvariantCulture));
     _writer.WriteAttributeString("Volume", nps.Volume.ToString(CultureInfo.InvariantCulture));
     _writer.WriteEndElement();
 }
Exemplo n.º 3
0
        public void VisitNodePlaySound(NodePlaySound nps)
        {
            var resourcePath = "resource/" + _projectService.GetRelativePath(nps.Sound.Path).Replace('\\', '/');

            if (nps.SoundType == NodePlaySound.SoundTypeEnum.SFX)
            {
                Sounds.Add(resourcePath);
            }

            _writer.WriteStartElement("NodePlaySound");
            if (nps.Sound != null)
            {
                _writer.WriteAttributeString("Path", resourcePath);
            }
            _writer.WriteAttributeString("SoundType", nps.SoundType.ToString());
            _writer.WriteAttributeString("StartTime", nps.StartTime.ToString(CultureInfo.InvariantCulture));
            _writer.WriteAttributeString("Volume", nps.Volume.ToString(CultureInfo.InvariantCulture));
            _writer.WriteEndElement();
        }
Exemplo n.º 4
0
 public void VisitNodePlaySound(NodePlaySound nps)
 {
 }
Exemplo n.º 5
0
 public void VisitNodePlaySound(NodePlaySound nps)
 {
     UsedResources.Add(nps.Sound);
 }