public DetectPress(BaseRpHitableObject baseRpObject, RpJudgement judgement) { _baseRPObject = baseRpObject; //預�E取得那些按鍵按亁E��有作用 _compareKey = RpKeyManager.GetListKey(baseRpObject); Children = new Drawable[] { }; }
/// <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); }
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); } } }
/// <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); }
/// <summary> /// Get List Key /// </summary> /// <returns></returns> private Key getKeyByHitObject(BaseRpHitableObject hitObject) { var listCompareKeys = RpKeyManager.GetListKey(hitObject); return(listCompareKeys[0]); }
/// <summary> /// get the keys that currently use /// </summary> /// <returns></returns> public override IEnumerable <KeyCounter> CreateGameplayKeys() => new RpKeyCounterCollection(RpKeyManager.GetCurrentKeyConfig()).ListKey;