private void BackButton_Click(object sender, RoutedEventArgs e) { SoundManagerClass.GetAllSounds(Sounds); CategoryTextBlock.Text = "All Sounds"; MenuItemsListView.SelectedItem = null; BackButton.Visibility = Visibility.Collapsed; }
private void MenuItemsListView_ItemClick(object sender, ItemClickEventArgs e) { var menu = (MenuBoard)e.ClickedItem; CategoryTextBlock.Text = menu.MyCategory.ToString(); SoundManagerClass.GetSoundsByCategory(Sounds, menu.MyCategory); BackButton.Visibility = Visibility.Visible; }
void Start() { //Getting Sound Manager SoundManagereObj = GameObject.FindGameObjectWithTag("SoundManager"); SoundManScript = (SoundManagerClass)SoundManagereObj.GetComponent("SoundManagerClass"); // adding the rest of projectiles from previous level . numberOfProjectiles += PlayerPrefs.GetInt((Application.loadedLevel - 1).ToString()); projectileFullnumbers = numberOfProjectiles; projectileCounterText.text = numberOfProjectiles.ToString() + "/" + projectileFullnumbers.ToString(); staticNumberOfProjectiles = numberOfProjectiles; touchInfoArray = new TouchInfo[5]; }
public MainPage() { /** * on starting the app add to the side menu a list of * all below clickable menu items with pictures and text * sorted by category * preload the page with all sounds */ this.InitializeComponent(); Sounds = new ObservableCollection <Sound>(); SoundManagerClass.GetAllSounds(Sounds); Menu = new List <MenuBoard>(); Menu.Add(new MenuBoard { Icon = "Assets/Icons/Peter/Peter.png", MyCategory = SoundCateory.Peter }); Menu.Add(new MenuBoard { Icon = "Assets/Icons/Lois/Lois.png", MyCategory = SoundCateory.Lois }); Menu.Add(new MenuBoard { Icon = "Assets/Icons/Meg/Meg.png", MyCategory = SoundCateory.Meg }); Menu.Add(new MenuBoard { Icon = "Assets/Icons/Chris/Chris.png", MyCategory = SoundCateory.Chris }); Menu.Add(new MenuBoard { Icon = "Assets/Icons/Brian/Brian.png", MyCategory = SoundCateory.Brian }); Menu.Add(new MenuBoard { Icon = "Assets/Icons/Stewie/Stewie.png", MyCategory = SoundCateory.Stewie }); Menu.Add(new MenuBoard { Icon = "Assets/Icons/Quagmire/Quagmire.png", MyCategory = SoundCateory.Quagmire }); Menu.Add(new MenuBoard { Icon = "Assets/Icons/Cleveland/Cleveland.png", MyCategory = SoundCateory.Cleveland }); Menu.Add(new MenuBoard { Icon = "Assets/Icons/Joe/Joe.png", MyCategory = SoundCateory.Joe }); //hide back button BackButton.Visibility = Visibility.Collapsed; }
void Start() { soundManagereObj = GameObject.FindGameObjectWithTag("SoundManager"); soundMangScript = (SoundManagerClass)soundManagereObj.GetComponent("SoundManagerClass"); }
void Start() { SoundManagereObj = GameObject.FindGameObjectWithTag("SoundManager"); soundManScript = (SoundManagerClass)SoundManagereObj.GetComponent("SoundManagerClass"); once = true; }