Example #1
0
 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);
 }
Example #2
0
 public VolumeInstance this[string i_InstanceName]
 {
     get
     {
         VolumeInstance instance = null;
         m_VolumeInstances.TryGetValue(i_InstanceName, out instance);
         return(instance);
     }
 }
Example #3
0
 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();
 }
Example #4
0
        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);
        }
Example #5
0
 public void SaveAndReopenVolume(VolumeInstance volume)
 {
     SaveCurrentScript();
     LoadVolume(volume);
 }
Example #6
0
 public void AddVolumeInstance(string i_InstanceName, VolumeInstance i_VolumeInstance)
 {
     i_VolumeInstance.VolumeChange += updateSoundList;
     m_VolumeInstances.Add(i_InstanceName, i_VolumeInstance);
 }