示例#1
0
        // Manjea cuando sueltas un Drum que se estaba arrastrando
        private bool OnDrumDrop(Drum dr, HandState handState, Point handPosition)
        {
            if (handState == HandState.Open)
            {
                dragDropCount--;

                if (dragDropCount <= 0)
                {
                    if (dr.HandHit == 2)
                    {
                        ((Hihat)dr).MoveTo(handPosition);
                    }
                    else
                    {
                        dr.MoveTo(handPosition);
                    }

                    //Si está sobre la papelera lo elimina
                    if (bin.Contains(handPosition))
                    {
                        this.OnDeleteDrum(dr);
                        binBrush = new SolidColorBrush(LightGrey);
                    }

                    return(true);
                }
            }

            else
            {
                dragDropCount = 5;
            }

            return(false);
        }
示例#2
0
        // Manjea cuando arrastras un Drum con la mano cerrada
        private void OnDrumDrag(Drum dr, Point handPosition)
        {
            if (dr.HandHit == 2)
            {
                ((Hihat)dr).MoveTo(handPosition);
            }
            else
            {
                dr.MoveTo(handPosition);
            }

            if (bin.Contains(handPosition))
            {
                binBrush = new SolidColorBrush(LightRed);
            }
            else
            {
                binBrush = new SolidColorBrush(LightGrey);
            }
        }