public SpaceInvadersSoundsMng() { m_BackgroundSound = new VolumeInstance(0.5f, 0, 1f, 0.1f, typeof(BackgroundSound)); m_SoundEffect = new VolumeInstance(0.5f, 0, 1f, 0.1f, typeof(SoundEffect)); this.AddVolumeInstance("Background", m_BackgroundSound); this.AddVolumeInstance("SoundEffect", m_SoundEffect); }
public VolumeInstance this[string i_InstanceName] { get { VolumeInstance instance = null; m_VolumeInstances.TryGetValue(i_InstanceName, out instance); return(instance); } }
private void LoadVolume(VolumeInstance volume) { _volume = volume; _backupScripts = _volume.Scripts.Clone(); _backupState = _volume.Activators; cmbEvent.SelectedIndex = 0; // Select first script tbScript.TextEditor.Text = _volume.Scripts.OnEnter; // Force tbName.Text = _volume.Scripts.Name; UpdateFlags(); }
public FormVolume(VolumeInstance volume) { InitializeComponent(); Editor.Instance.EditorEventRaised += EditorEventRaised; LoadVolume(volume); tbScript.TextEditor.Background = new SolidColorBrush((Color)ColorConverter.ConvertFromString(_configs.Lua.ColorScheme.Background)); tbScript.TextEditor.Foreground = new SolidColorBrush((Color)ColorConverter.ConvertFromString(_configs.Lua.ColorScheme.Foreground)); tbScript.TextEditor.SyntaxHighlighting = new LuaSyntaxHighlighting(_configs.Lua.ColorScheme); tbScript.TextEditor.UpdateSettings(_configs.Lua); }
public void SaveAndReopenVolume(VolumeInstance volume) { SaveCurrentScript(); LoadVolume(volume); }
public void AddVolumeInstance(string i_InstanceName, VolumeInstance i_VolumeInstance) { i_VolumeInstance.VolumeChange += updateSoundList; m_VolumeInstances.Add(i_InstanceName, i_VolumeInstance); }