Esempio n. 1
0
        internal bool HandlePressAt(TrackingPoint point)
        {
            HitObject found = FindObjectAt(point);

            if (found == null)
            {
                return(false);
            }

            if (Clock.AudioTime < found.StartTime - DifficultyManager.HitWindow300)
            {
                List <HitObject> objects = ActiveStreamObjects;

                int index = objects.IndexOf(found);

                if (index > 0)
                {
                    //check last hitObject has been hit already and isn't still active
                    HitObject last = ActiveStreamObjects[index - 1];
                    if (found.connectedObject != last && !last.IsHit && Clock.AudioTime < last.StartTime)
                    {
                        found.Shake();
                        return(true);
                    }
                }
            }

            TriggerScoreChange(found.Hit(), found);
            return(true);
        }