Ejemplo n.º 1
0
        /// <summary>
        ///     convert list Keys to mouse position
        /// </summary>
        /// <returns></returns>
        public int ConvertRpKeysToMouseAnixX(List <Key> listStorageKeys)
        {
            var currentConfig = RpKeyManager.GetCurrentKeyConfig();
            var returnValue   = 0;

            for (var i = 0; i < currentConfig.KeyDictionary.Count; i++)
            {
                if (listStorageKeys.Contains(currentConfig.KeyDictionary[i].Key))
                {
                    returnValue = returnValue + (int)Math.Pow(2, i);
                }
            }
            return(returnValue);
        }
Ejemplo n.º 2
0
        public KeySoundLayout()
        {
            var keyList = RpKeyManager.GetCurrentKeyConfig();

            foreach (var singleKey in keyList.KeyDictionary)
            {
                if (singleKey.Type == RpBaseHitObjectType.Shape.ContainerPress)
                {
                    _containerPressKeys.Add(singleKey.Key);
                }
                else
                {
                    _listShapeKeys.Add(singleKey.Key);
                }
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        ///     Convert mouse position To key list
        /// </summary>
        /// <returns></returns>
        private List <Key> convertMouseAnixXToKeyList(int positionX)
        {
            var listKey = new List <Key>();

            if (positionX > 0)
            {
                var currentConfig = RpKeyManager.GetCurrentKeyConfig();
                for (var i = 0; i < 10; i++)
                {
                    if (Math.Ceiling(positionX / Math.Pow(2, i)) % 2 == 1)
                    {
                        listKey.Add(currentConfig.KeyDictionary[i].Key);
                    }
                }
            }
            return(listKey);
        }
Ejemplo n.º 4
0
 /// <summary>
 ///     get the keys that currently use
 /// </summary>
 /// <returns></returns>
 public override IEnumerable <KeyCounter> CreateGameplayKeys() => new RpKeyCounterCollection(RpKeyManager.GetCurrentKeyConfig()).ListKey;