コード例 #1
0
        private Mark CreateMark(MarkDataBase ipdata, bool hasSameTimingMark, int sameTimingMarks)
        {
            var  emd = ipdata as ExMarkData;
            Mark mk  = null;

            if (emd != null)
            {
                var noteType     = EventManager.GetNoteType(ipdata.Time);
                var displayState = EventManager.GetCorrectDisplaystate(ipdata.Time);
                switch (noteType)
                {
                case NoteType.Normal:
                    mk = new NormalExMark(device, resourceManager, imagepathes, emd, randomChangeManager[emd.ButtonType],
                                          evals, adjustgaptime, circlepoints, displayState, noteType, sameTimingMarks, ipdata.Parameters, postDrawManager);
                    break;

                case NoteType.AC:
                    mk = new HoldExMark(device, resourceManager, imagepathes, emd, randomChangeManager[emd.ButtonType],
                                        evals, adjustgaptime, displayState, noteType, sameTimingMarks, ipdata.Parameters, postDrawManager);
                    break;

                case NoteType.ACFT:
                    if (IsScratch(ipdata.ButtonType, sameTimingMarks))
                    {
                        var slideScale = EventManager.GetSlideScale(ipdata.Time);
                        mk = new SlideExMark(device, resourceManager, imagepathes, emd, randomChangeManager[emd.ButtonType],
                                             evals, adjustgaptime, displayState, noteType, slideScale, sameTimingMarks, ipdata.Parameters, postDrawManager);
                    }
                    else
                    {
                        goto case NoteType.AC;
                    }
                    break;
                }
            }
            else
            {
                var md = ipdata as MarkData;
                mk = new Mark(device, resourceManager, imagepathes, md, randomChangeManager[md.ButtonType], evals, adjustgaptime,
                              EventManager.GetCorrectDisplaystate(ipdata.Time), EventManager.GetNoteType(ipdata.Time), sameTimingMarks, ipdata.Parameters, postDrawManager);
            }
            mk.HasSameTimingMark = hasSameTimingMark;
            if (scriptManager.ProcessMarkBPMManager.Process(mk, out float bpm))
            {
                mk.FixedBPM = bpm;
            }

            if (mk != null)
            {
                MarkLayer.InsertChild(mk, 0);
                mk.Initialize(scriptManager.CreateMarkManager.CreateMark, scriptManager.ProcessAllowedButtonsManager.Process);
                mk.CheckColorPosition += mk_CheckColorPosition;
                mk.ChangeMarkEvaluate += mk_ChangeMarkEvaluate;
            }

            return(mk);
        }
コード例 #2
0
ファイル: SlideMarkInfo.cs プロジェクト: KHCmaster/PPD
 public SlideMarkInfo(SlideExMark mark, SlideColorMarkInfo slideColorMarkInfo)
 {
     this.mark = mark;
     this.slideColorMarkInfo = slideColorMarkInfo;
 }
コード例 #3
0
ファイル: SlideColorMarkInfo.cs プロジェクト: KHCmaster/PPD
 public SlideColorMarkInfo(PPDDevice device, SlideExMark exMark, GameComponent colorMark, Vector2 basePosition, PictureObject trace, float markTime)
     : base(device, colorMark, basePosition, trace)
 {
     MarkTime      = markTime;
     SlideMarkInfo = new SlideMarkInfo(exMark, this);
 }