コード例 #1
0
 public void Add(PathDescription file)
 {
     _playlist.Enqueue(file);
     if (!_isPlaying)
     {
         PlayNextSong();
     }
 }
コード例 #2
0
        public void PlayNextSong()
        {
            CheckIfMpg321IsRunning();
            bool playlistIsNotEmpty = _playlist.Count > 0;

            Trace.WriteLine("PlayNextSong > playlistIsNotEmpty:" + playlistIsNotEmpty);

            if (playlistIsNotEmpty)
            {
                var file = _playlist.Dequeue();
                CurrentTrack = file;
                Trace.WriteLine("PlayNextSong > Dequeued an trying to play: " + file.FullPath);
                Command("LOAD " + file.FullPath);
                _isPlaying = true;
            }
        }
コード例 #3
0
 public void UpdateCurrentSShipDisplay()
 {
     if (currentPathSelected == 1)
     {
         PathNameDisplay.GetComponent <Text>().text     = "The Purple Path:";
         PathDescription.GetComponent <Text>().text     = "This is the main path.\nBalanced in atack damage and hp.\nFor the basic ones.";
         SpaceShipPreview.GetComponent <Image>().sprite = NavePath1[SpaceShipLVLSelected];
     }
     if (currentPathSelected == 2)
     {
         PathNameDisplay.GetComponent <Text>().text     = "The Blue Path:";
         PathDescription.GetComponent <Text>().text     = "This is the chill path.\nStay still even after a bunch of pokes.\nFor the lazy ones.";
         SpaceShipPreview.GetComponent <Image>().sprite = NavePath2[SpaceShipLVLSelected];
     }
     if (currentPathSelected == 3)
     {
         PathNameDisplay.GetComponent <Text>().text     = "The Red Path:";
         PathDescription.GetComponent <Text>().text     = "This is the RAGE path.\nThe best defence is the attack right?.\nFor the brutal ones.";
         SpaceShipPreview.GetComponent <Image>().sprite = NavePath3[SpaceShipLVLSelected];
     }
     if ((UpgradesHandler.OwnedSShip[SpaceShipLVLSelected, currentPathSelected] && UpgradesHandler.CurrentSShip[SpaceShipLVLSelected, currentPathSelected]) || (SpaceShipLVLSelected == 1 && (UpgradesHandler.CurrentSShip[1, 1] || UpgradesHandler.CurrentSShip[1, 3] || UpgradesHandler.CurrentSShip[1, 2])))
     {
         BuyEquipBtnText.GetComponent <Text>().text = "Equiped";
         CurrentCost.SetActive(false);
     }
     else if (UpgradesHandler.OwnedSShip[SpaceShipLVLSelected, currentPathSelected])
     {
         BuyEquipBtnText.GetComponent <Text>().text = "Equip";
         CurrentCost.SetActive(false);
     }
     else
     {
         CurrentCost.SetActive(true);
         BuyEquipBtnText.GetComponent <Text>().text = "Buy";
         CurrentCost.GetComponent <Text>().text     = "" + ShipUpgrades.Preco[SpaceShipLVLSelected] + " X ";
     }
     ShipBaseAtributes.GetComponent <Text>().text = "LEVEL: " + SpaceShipLVLSelected +
                                                    "\nHP: " + ShipUpgrades.Hp[SpaceShipLVLSelected] +
                                                    "\nMANA:" + ShipUpgrades.Mana[SpaceShipLVLSelected] +
                                                    "\nFIRE RATE:" + ShipUpgrades.FireRate[SpaceShipLVLSelected] +
                                                    "\nDAMAGE: " + ShipUpgrades.Damage[SpaceShipLVLSelected] +
                                                    "\nCRITICAL CHANCE: " + ShipUpgrades.CriticalChance[SpaceShipLVLSelected] + " % ";
     GameObject.Find("CoinDisplay").GetComponent <Text>().text = UpgradesHandler.coin + " X ";
 }