Пример #1
0
    /// <summary>
    /// XMLからゲーム用クラスに変換
    /// </summary>
    public CdjData(CdjXmlData data)
    {
        BPM        = data.BPM;
        TITLE      = data.TITLE;
        LEVEL      = data.LEVEL;
        SOUND      = data.SOUND;
        GAP        = data.GAP;
        JACKET     = data.JACKET;
        LABEL      = data.LABEL;
        lstquedata = new List <DiscQueCutData>();
        DiscQueCutData preque = new DiscQueCutData
        {
            startstep = 0
        };
        bool bfirst = true;

        foreach (OneData o in data.quedata)
        {
            DiscQueCutData q = new DiscQueCutData();
            if (bfirst)
            {
                q.ActiveState = EnumActiveState.NEXT;
            }
            else
            {
                q.ActiveState = EnumActiveState.INACTIVE;
            }
            q.startstep = o.startstep;
            q.endstep   = o.endstep;
            q.lr        = o.lr;
            q.quecount  = o.data[0];
            if (q.quecount < 360)
            {
                if (preque.endstep - preque.startstep > datacalc.resolution)
                {
                    q.activemillis = datacalc.step2millis(BPM, preque.endstep - datacalc.resolution);
                }
                else
                {
                    q.activemillis = datacalc.step2millis(BPM, preque.startstep);
                }
            }
            else
            {
                q.activemillis = datacalc.step2millis(BPM, preque.startstep);
            }

            q.judge = EnumJudge.NOTYET;
            lstquedata.Add(q);
            preque = q;
            bfirst = false;
        }
        lstscratchunit = new List <ScratchUnit>();
        foreach (OneData o in data.scratchdata)
        {
            ScratchUnit scunit = new ScratchUnit(o);
            lstscratchunit.Add(scunit);
        }
    }
Пример #2
0
    public static void SetDrawObjects()
    {
        // 画像の読み込み
        DrawObject scr     = new DrawObject("scr.png", DrawObject.EnumAlign.RIGHTCENTER, 2, 1);    //スクラッチの左右向き緑
        DrawObject scrbad  = new DrawObject("scrbad.png", DrawObject.EnumAlign.RIGHTCENTER, 2, 1); //スクラッチの左右向き緑
        DrawObject scrcore = new DrawObject("scrcore.png", DrawObject.EnumAlign.CENTERCENTER);     //スクラッチの左右向き緑
        DrawObject bar     = new DrawObject("bar.png", DrawObject.EnumAlign.CENTERBOTTOM);
        DrawObject baroff  = new DrawObject("baroff.png", DrawObject.EnumAlign.CENTERBOTTOM);

        DrawObject disk    = new DrawObject("disk.png", DrawObject.EnumAlign.CENTERCENTER);
        DrawObject light   = new DrawObject("disklight.png", DrawObject.EnumAlign.CENTERCENTER);
        DrawObject NGXMark = new DrawObject("xDisk.png", DrawObject.EnumAlign.CENTERCENTER);

        DrawObject disklightl = new DrawObject("disklightl.png", DrawObject.EnumAlign.CENTERCENTER);
        DrawObject disklightr = new DrawObject("disklightr.png", DrawObject.EnumAlign.CENTERCENTER);

        DrawObject cutinL = new DrawObject("cutinL.png", DrawObject.EnumAlign.CENTERBOTTOM);
        DrawObject cutinR = new DrawObject("cutinR.png", DrawObject.EnumAlign.CENTERBOTTOM);

        DrawObject diskshadowL = new DrawObject("diskshadowL.png", DrawObject.EnumAlign.CENTERBOTTOM, 1, 2); //アクティブ皿の裏ののびーる赤と紫
        DrawObject diskshadowR = new DrawObject("diskshadowR.png", DrawObject.EnumAlign.CENTERBOTTOM, 1, 2); //アクティブ皿の裏ののびーる赤と紫

        DrawObject barL = new DrawObject("playlinel.png", DrawObject.EnumAlign.CENTERBOTTOM);
        DrawObject barR = new DrawObject("playliner.png", DrawObject.EnumAlign.CENTERBOTTOM);

        DrawObject cue  = new DrawObject("cue.png", DrawObject.EnumAlign.CENTERCENTER, 1, 36);
        DrawObject cueL = new DrawObject("cueL.png", DrawObject.EnumAlign.CENTERCENTER, 1, 37);
        DrawObject cueR = new DrawObject("cueR.png", DrawObject.EnumAlign.CENTERCENTER, 1, 37);

        DrawObject fader  = new DrawObject("fader.png", DrawObject.EnumAlign.CENTERBOTTOM);
        DrawObject faderC = new DrawObject("faderC.png", DrawObject.EnumAlign.CENTERBOTTOM);
        DrawObject faderL = new DrawObject("faderL.png", DrawObject.EnumAlign.CENTERBOTTOM);
        DrawObject faderR = new DrawObject("faderR.png", DrawObject.EnumAlign.CENTERBOTTOM);

        DrawObject particle = new DrawObject("star.png", DrawObject.EnumAlign.CENTERCENTER, 1, 3);

        DrawObject frame   = new DrawObject("frame.png", DrawObject.EnumAlign.LEFTTOP);
        DrawObject rainbow = new DrawObject("Rainbow.png", DrawObject.EnumAlign.LEFTTOP, 1, 8);

        DrawObject barBeat    = new DrawObject("barBeat.png", DrawObject.EnumAlign.LEFTTOP);
        DrawObject barMeasure = new DrawObject("barMeasure.png", DrawObject.EnumAlign.LEFTTOP);

        DrawObject COOL    = new DrawObject("!!!COOL!!!.png", DrawObject.EnumAlign.CENTERCENTER);
        DrawObject PERFECT = new DrawObject("PERFECT.png", DrawObject.EnumAlign.CENTERCENTER);
        DrawObject GREAT   = new DrawObject("GREAT.png", DrawObject.EnumAlign.CENTERCENTER);
        DrawObject GOOD    = new DrawObject("GOOD.png", DrawObject.EnumAlign.CENTERCENTER);
        DrawObject BAD     = new DrawObject("BAD.png", DrawObject.EnumAlign.CENTERCENTER);

        DiscQueCutData.SetDrawObject(disk, cue, null, light, NGXMark);
        DiscQueCutData.SetLDrawObject(cueL, diskshadowL, cutinL, barL);
        DiscQueCutData.SetRDrawObject(cueR, diskshadowR, cutinR, barR);
        ScratchUnit.SetDrawObject(scr, scrbad, scrcore, bar, baroff);

        EffectParticle.SetDrawObject(particle);
        EffectJudge.SetDrawObject(COOL, PERFECT, GREAT, GOOD, BAD);
        EffectRecord.SetDrawObject(disklightl, disklightr);

        drawfader.setdrawobject(fader, faderC, faderL, faderR);
        DrawLowFrame.SetDrawObject(frame, rainbow);
        DrawBeatline.SetDrawObject(barBeat, barMeasure);
    }
Пример #3
0
    /// <summary>
    /// XML読み込み後実際の曲データに変換して返す
    /// </summary>
    /// <returns></returns>
    public CdjData MakeCdjData()
    {
        CdjData rtn = new CdjData();

        rtn.BPM        = this.BPM;
        rtn.TITLE      = this.TITLE;
        rtn.LEVEL      = this.LEVEL;
        rtn.SOUND      = this.SOUND;
        rtn.GAP        = this.GAP;
        rtn.JACKET     = this.JACKET;
        rtn.LABEL      = this.LABEL;
        rtn.lstquedata = new List <DiscQueCutData>();
        DiscQueCutData preque = new DiscQueCutData
        {
            startstep = 0
        };
        bool bfirst = true;

        foreach (RECORD o in this.quedata)
        {
            DiscQueCutData q = new DiscQueCutData();
            if (bfirst)
            {
                q.ActiveState = EnumActiveState.NEXT;
            }
            else
            {
                q.ActiveState = EnumActiveState.INACTIVE;
            }
            q.startstep = o.startstep;
            q.endstep   = o.endstep;
            q.lr        = o.lr;
            q.quecount  = o.data[0];
            if (q.quecount < 360)
            {
                if (preque.endstep - preque.startstep > datacalc.resolution)
                {
                    q.activemillis = datacalc.step2millis(BPM, preque.endstep - datacalc.resolution);
                }
                else
                {
                    q.activemillis = datacalc.step2millis(BPM, preque.startstep);
                }
            }
            else
            {
                q.activemillis = datacalc.step2millis(BPM, preque.startstep);
            }

            q.judge = EnumJudge.NOTYET;
            rtn.lstquedata.Add(q);
            preque = q;
            bfirst = false;
        }
        rtn.lstscratchunit = new List <ScratchUnit>();
        foreach (RECORD o in this.scratchdata)
        {
            ScratchUnit scunit = MakeScratchUnit(o);
            rtn.lstscratchunit.Add(scunit);
        }
        return(rtn);
    }