コード例 #1
0
 void Start()
 {
     spawner   = GameObject.FindObjectOfType <BeatmapParser>();
     text      = GetComponentInChildren <TextMeshPro>();
     detection = GameObject.Find("DetectionZone");
     core      = GameObject.Find("Core");
     animator  = GetComponentInChildren <Animator>();
     score     = FindObjectOfType <Score>();
     animator.transform.RotateAround(animator.transform.position, Vector3.forward, Random.Range(0, 360));
     render           = GetComponentInChildren <Renderer>();
     render.enabled   = false;
     animator.enabled = false;
     text.enabled     = false;
 }
コード例 #2
0
        public static OsuDb ParseFromStream(FileStream dbStream)
        {
            try
            {
                using (OsuBinaryReader reader = new OsuBinaryReader(dbStream))
                {
                    Dictionary <int, IBeatmapSet> beatmapSets = new Dictionary <int, IBeatmapSet>();
                    int ver = reader.ReadInt32();

                    bool old = ver < 20140609;

                    int folderCount = reader.ReadInt32();

                    bool     locked     = reader.ReadBoolean();
                    DateTime unlockDate = reader.ReadDateTime();

                    string playerName = reader.ReadString();

                    int beatmapCount = reader.ReadInt32();

                    for (int i = 0; i < beatmapCount; i++)
                    {
                        IBeatmap    info = BeatmapParser.ParseFromReader(reader, old);
                        IBeatmapSet set;

                        if (beatmapSets.ContainsKey(info.SetId))
                        {
                            set = beatmapSets[info.SetId];
                        }
                        else
                        {
                            set = new OsuBeatmapSet(info.RankedName, info.RankedNameUnicode,
                                                    info.Artist, info.ArtistUnicode,
                                                    info.Tags,
                                                    info.SetId, "binary");
                            beatmapSets[set.RankedID] = set;
                        }

                        set.Beatmaps[info.Id] = info;
                    }
                    reader.ReadByte();//last Point
                    return(new OsuDb(ver, folderCount, locked, unlockDate, playerName, beatmapSets));
                }
            } catch (Exception e)
            {
                throw new BeatmapParseException($"Failed to parse Db {dbStream.Name}", e);
            }
        }
コード例 #3
0
        static void WhiteLabelMainMenDASDSADSADt(BeatmapParser __instance)
        {
            // I don't know why, but if this patch doesn't exist it doesn't detect beatmapInfo as a CustomBeatmapInfo class.
            // So I guess I'm just leaving it here?
            BeatmapInfo beatmapInfo = __instance.beatmapIndex.FindByPath(__instance.beatmapPath);

            // CustomBeatsPlugin.LOGGER.LogInfo(beatmapInfo.name);

            if (beatmapInfo is CustomBeatmapInfo)
            {
                // CustomBeatsPlugin.LOGGER.LogInfo("I am losing my mind.");
            }
            else
            {
                // CustomBeatsPlugin.LOGGER.LogInfo("I am losing my mind even more.");
            }
        }
コード例 #4
0
 private void Awake()
 {
     player = GameObject.FindObjectOfType <BeatmapParser>();
 }
コード例 #5
0
ファイル: Score.cs プロジェクト: Norgg/breakjam
 void Start() {
     text = GetComponent<TextMeshPro>();
     parser = GameObject.FindObjectOfType<BeatmapParser>();
 }