Example #1
0
        protected override bool OnMouseDown(MouseDownEvent e)
        {
            if (isPlacingEnd)
            {
                if (e.Button != MouseButton.Right)
                {
                    return(false);
                }

                HitObject.EndTime = EditorClock.CurrentTime;
                EndPlacement();
            }
            else
            {
                if (e.Button != MouseButton.Left)
                {
                    return(false);
                }

                BeginPlacement();
                piece.FadeTo(1f, 150, Easing.OutQuint);

                isPlacingEnd = true;
            }

            return(true);
        }
        protected override bool OnClick(ClickEvent e)
        {
            if (isPlacingEnd)
            {
                HitObject.EndTime = EditorClock.CurrentTime;
                EndPlacement();
            }
            else
            {
                HitObject.StartTime = EditorClock.CurrentTime;

                isPlacingEnd = true;
                piece.FadeTo(1f, 150, Easing.OutQuint);
            }

            return(true);
        }