Ejemplo n.º 1
0
        //Gets the type of hitobject specified at index
        static public HitObjectType GetHitObjectType(string hitobject)
        {
            //Get the hitobject type
            string type = GetProperty(hitobject, "type");

            BinaryString typeid = new BinaryString(Convert.ToInt32(type));

            //Binary 1
            if (typeid.GetBit(0) == 1)
            {
                return(HitObjectType.Circle);
            }
            //Binary 2
            else if (typeid.GetBit(1) == 1)
            {
                return(HitObjectType.Slider);
            }
            //Binary 8
            else if (typeid.GetBit(3) == 1)
            {
                return(HitObjectType.Spinner);
            }
            else
            {
                throw new ArgumentException("Hitobject type is not valid");
            }
        }