示例#1
0
        /// <summary>
        ///     Change objects into drawable
        /// </summary>
        /// <param name="h"></param>
        /// <returns></returns>
        protected override DrawableHitObject <BaseRpObject, RpJudgement> GetVisualRepresentation(BaseRpObject h)
        {
            DrawableHitObject <BaseRpObject, RpJudgement> returnObject = null;

            if (h is RpHitObject)
            {
                returnObject = new DrawableRpHitObject((RpHitObject)h);
            }
            if (h is RpHoldObject)
            {
                returnObject = new DrawableRpHoldObject((RpHoldObject)h);
            }
            if (h is RpContainerLineHoldObject)
            {
                returnObject = new DrawableRpContainerLineHoldObject((RpContainerLineHoldObject)h);
            }
            if (h is RpContainerLineGroup)
            {
                returnObject = new DrawableRpContainerLineGroup((RpContainerLineGroup)h);
            }

            //adding Mods
            _modProcessor.ProcessHitObject(returnObject);

            return(returnObject);
        }
示例#2
0
        public static void AddDrawableRpHitObject(this IHasGameField field, DrawableRpHitObject drawableRpHitObject)
        {
            DrawableRpContainerLineGroup drawableRpContainerLineGroup = GeDrawableByRpObject <DrawableRpContainerLineGroup>(field, drawableRpHitObject.HitObject.ParentObject.ParentObject);

            drawableRpContainerLineGroup.GameFieldContainer.Add(drawableRpHitObject);

            DrawableRpContainerLine drawableRpContainerLine = GeDrawableByRpObject <DrawableRpContainerLine>(field, drawableRpHitObject.HitObject.ParentObject);

            drawableRpContainerLine.AddObject(drawableRpHitObject);
            drawableRpHitObject.ParentObject = drawableRpContainerLine;
            //
            field.ListDrawableObject.Add(drawableRpContainerLine);
        }