Exemplo n.º 1
0
        public override PlatformData Create(string path, Game game, ProgressIndicator progress)
        {
            PlatformData data = new PlatformData(this, game);

            data.Session["path"] = path;

            if (Directory.Exists(path))
            {
                Exceptions.Error("An RBN archive must be a file.");
            }

            if (File.Exists(path))
            {
                try {
                    RBA rba = new RBA(new EndianReader(new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read), Endianness.LittleEndian));
                    data.Session["rba"] = rba;

                    SongData song = HarmonixMetadata.GetSongData(data, DTA.Create(rba.Data));

                    song.ID = ImportMap.GetShortName(song.Name);

                    AddSong(data, song, progress);
                } catch (Exception exception) {
                    Exceptions.Error(exception, "An error occurred while opening the RBN archive.");
                }
            }

            return(data);
        }
Exemplo n.º 2
0
    void EnterAnswer()
    {
        switch (questionPart)
        {
        case 1:


            if (uInput.text.Equals(Ans))
            {
                output.text = "Congrats, you have solved my first question can you solve the second one though let us find out. \n Press the button to continue...";
                questionPart++;
                QuestionCounter++;
                L1.SetActive(true);
                BText.text = "Next Part";
            }
            else
            {
                uInput.ActivateInputField();
                output.text = "Try again maybe they should have sent someone else to save the king.";
            }



            break;

        case 2:
            if (uInput.text.Equals(acceleration.ToString()))
            {
                output.text = "Wow, you really know your stuff on to the last and hardest of my questions.";
                questionPart++;
                QuestionCounter++;
                L2.SetActive(true);
                BText.text = "Final Part";
            }
            else
            {
                output.text = "You will never beat me";
            }


            break;

        case 3:
            if (uInput.text.Equals(DTA.ToString()))
            {
                output.text = "You have defeated me the king is yours; I greatly underestimated your knowledge in double pulleys.";
                QuestionCounter++;
                questionPart++;
                L3.SetActive(true);
                Winning();
            }
            else
            {
                output.text = "Wow you were so close but still wrong try again";
            }

            break;
        }
    }
Exemplo n.º 3
0
        public static void Run()
        {
            while (true)
            {
                try
                {
                    //BTC.Do();
                    BCH.Do();
                    ETH.Do();
                    ETC.Do();
                    LTC.Do();

                    EOS.Do();
                    XRP.Do();
                    OMG.Do();
                    DASH.Do();
                    ZEC.Do();
                    Thread.Sleep(1000 * 5);

                    // 创新
                    ITC.Do();
                    NAS.Do();
                    RUFF.Do();
                    ZIL.Do();
                    DTA.Do();
                    Thread.Sleep(1000 * 5);

                    LET.Do();
                    HT.Do();
                    THETA.Do();
                    HSR.Do();
                    QTUM.Do();
                    Thread.Sleep(1000 * 5);

                    SNT.Do();
                    IOST.Do();
                    NEO.Do();
                    STORJ.Do();
                    GNT.Do();
                    Thread.Sleep(1000 * 5);

                    CVC.Do();
                    SMT.Do();
                    VEN.Do();
                    ELF.Do();
                    XEM.Do();
                    Thread.Sleep(1000 * 5);
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex.Message);
                }
            }
        }
Exemplo n.º 4
0
		public override PlatformData Create(string path, Game game, ProgressIndicator progress)
		{
			PlatformData data = new PlatformData(this, game);

			DirectoryNode maindir = DirectoryNode.FromPath(path, data.Cache, FileAccess.Read);

			char[] regions = new char[] { 'E', 'P' };

			DirectoryNode dir = maindir.Navigate("private/wii/data", false, true) as DirectoryNode;
			if (dir == null)
				dir = maindir;

			for (char letter = 'A'; letter <= 'Z'; letter++) {
				foreach (char region in regions) {
					DirectoryNode subdir = dir.Find("SZ" + letter + region, true) as DirectoryNode;
					if (subdir == null)
						continue;

					foreach (FileNode file in subdir.Files) {
						if (String.Compare(Path.GetExtension(file.Name), ".bin", true) != 0)
							continue;

						try {
							file.Data.Position = 0;
							DlcBin bin = new DlcBin(file.Data);
							U8 u8;
							try {
								u8 = new U8(bin.Data);
							} catch (FormatException) {
								file.Data.Close();
								continue;
							}
							FileNode songsdta = u8.Root.Find("songs.dta", SearchOption.AllDirectories) as FileNode;
							if (songsdta == null) {
								file.Data.Close();
								continue;
							}

							DTB.NodeTree dtb = DTA.Create(songsdta.Data);
							SongsDTA dta = SongsDTA.Create(dtb);
							file.Data.Close();
							
							SongData song = HarmonixMetadata.GetSongData(data, dtb);

							string contentbin = dta.Song.Name.Substring(9, 3); // Example, "dlc/sZAE/023/content/songs/simpleman/simpleman"

							FileNode contentfile = subdir.Find(contentbin + ".bin", true) as FileNode;
							if (contentfile == null)
								continue;

							FormatData formatdata = new TemporaryFormatData(song, data);

							Create(formatdata, file.Data, contentfile.Data);
							
							data.AddSong(formatdata);

							contentfile.Data.Close();
						} catch (FormatException) { } // Not a DLC bin we care about
					}
				}
			}

			return data;
		}