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

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

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