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); } }
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(); }
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(); }
public void VisitNodePlaySound(NodePlaySound nps) { }
public void VisitNodePlaySound(NodePlaySound nps) { UsedResources.Add(nps.Sound); }