예제 #1
0
        private void CreateResource()
        {
            var pathes         = new List <string>(30);
            var checktracelist = new List <string>(10);

            for (ButtonType type = ButtonType.Square; type < ButtonType.Start; type++)
            {
                pathes.Add(imagepathes.GetMarkImagePath(type));
                pathes.Add(imagepathes.GetMarkColorImagePath(type));
                string tracepath = imagepathes.GetTraceImagePath(type);
                pathes.Add(tracepath);
                if (!checktracelist.Contains(tracepath))
                {
                    checktracelist.Add(tracepath);
                    simpiclist.Add((int)type + 1);
                }
            }
            pathes.Add(imagepathes.GetCircleAxisImagePath());
            pathes.Add(imagepathes.GetClockAxisImagePath());
            imagepathes.GetLongNoteCircleInfo(out PathObject fn, out float inner, out float outer);
            pathes.Add(fn);
            imagepathes.GetHoldInfo(out fn, out float x, out float y);
            pathes.Add(fn);
            CreateCirclePoints(inner, outer);

            for (MarkEvaluateType type = MarkEvaluateType.Cool; type <= MarkEvaluateType.Worst; type++)
            {
                var effectfilename = imagepathes.GetEvaluateEffectPath(type);
                if (File.Exists(effectfilename))
                {
                    ppdem.CreateEffect(effectfilename);
                    effectfilenames[5 - (int)type] = effectfilename;
                }
            }
            var appearname = imagepathes.GetAppearEffectPath();

            if (File.Exists(appearname))
            {
                ppdem.CreateEffect(appearname);
                effectfilenames[(int)EffectType.Appear] = appearname;
            }
            var slidername = imagepathes.GetSlideEffectPath();

            if (File.Exists(slidername))
            {
                ppdem.CreateEffect(slidername);
                effectfilenames[(int)EffectType.Slide] = slidername;
            }
        }
예제 #2
0
 public virtual void Initialize(CreateMarkFunc createMark, GetScriptAllowedButtonsFunc getScriptAllowedButtons)
 {
     createMark(this, out mark, out GameComponent colorMark, out axis, out GameComponent slideMark, out GameComponent slideColorMark, out PictureObject trace);
     isMarkCreated                 = mark != null;
     mark                          = mark ?? new PictureObject(device, resourceManager, filenames.GetMarkImagePath(GetButtonType()), true);
     mark.Scale                    = Vector2.Zero;
     colorMark                     = colorMark ?? new PictureObject(device, resourceManager, filenames.GetMarkColorImagePath(GetButtonType()), true);
     axis                          = axis ?? new PictureObject(device, resourceManager, filenames.GetClockAxisImagePath(), true);
     this.trace                    = trace ?? new PictureObject(device, resourceManager, filenames.GetTraceImagePath(GetButtonType()), false);
     colorMarkInfo                 = new ColorMarkInfo(device, colorMark, Vector2.Zero, this.trace);
     colorMark.PostDrawManager     = postDrawManager;
     colorMarkInfo.PostDrawManager = postDrawManager;
     getScriptAllowedButtons(this, out scriptAllowedButtons);
     this.matrix = Matrix.Transformation2D(Vector2.Zero, 0, Vector2.One, Vector2.Zero, -Angle, Vector2.Zero);
     Hidden      = true;
     ColorHidden = true;
     this.AddChild(colorMark);
     this.AddChild(axis);
     this.AddChild(mark);
     this.AddChild(colorMarkInfo);
 }