private void AddSpecialBatchCmd(object sender, ExecutedRoutedEventArgs e) { ProgressionEntry entry = navigation.SelectedItem as ProgressionEntry; entry.Children.Add(new ProgressionEntry() { ItemType = ProgressionTreeItemType.SpecialBatch }); }
private void AddRegularItem(object sender, ExecutedRoutedEventArgs e) { ProgressionEntry entry = navigation.SelectedItem as ProgressionEntry; entry.Children.Add(new ProgressionEntry() { ItemType = ProgressionTreeItemType.RegularItem }); }
private void CanAddSpecialBatch(object sender, CanExecuteRoutedEventArgs e) { ProgressionEntry entry = navigation.SelectedItem as ProgressionEntry; if (entry != null) { e.CanExecute = entry.ItemType == ProgressionTreeItemType.FullBatch; } else { e.CanExecute = false; } }
void _Activate(ProgressionEntry a) { foreach (var g in a.EnableGameObjects) { g.SetActive(true); } foreach (var g in a.DisableGameObjects) { g.SetActive(false); } if (a.AudioSourceToPlay) { a.AudioSourceToPlay.Play(); } if (a.AudioSourceToStop) { a.AudioSourceToStop.Stop(); } }