Example #1
0
        public DetectPress(BaseRpHitableObject baseRpObject, RpJudgement judgement)
        {
            _baseRPObject = baseRpObject;
            //預�E取得那些按鍵按亁E��有作用
            _compareKey = RpKeyManager.GetListKey(baseRpObject);

            Children = new Drawable[]
            {
            };
        }
Example #2
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);
        }
Example #3
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);
                }
            }
        }
Example #4
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);
        }
Example #5
0
        /// <summary>
        ///     Get List Key
        /// </summary>
        /// <returns></returns>
        private Key getKeyByHitObject(BaseRpHitableObject hitObject)
        {
            var listCompareKeys = RpKeyManager.GetListKey(hitObject);

            return(listCompareKeys[0]);
        }
Example #6
0
 /// <summary>
 ///     get the keys that currently use
 /// </summary>
 /// <returns></returns>
 public override IEnumerable <KeyCounter> CreateGameplayKeys() => new RpKeyCounterCollection(RpKeyManager.GetCurrentKeyConfig()).ListKey;