public bool HandleInput(InputState inputState) { if (_selectionType == SelectionType.Target) { HandleSelectableTargeting(inputState); } else if (_selectionType == SelectionType.Area) { HandleLocationTargeting(inputState); } else if (_selectionType == SelectionType.Line) { HandleLocationTargeting(inputState); } if (inputState.IsKeyPressed(Keys.Enter)) { _targetable.SelectTarget(_cursorPosition); StopTargeting(); return(true); } return(false); }
public bool HandleKey(RLKey key) { if (_selectionType == SelectionType.Target) { HandleSelectableTargeting(key); } else if (_selectionType == SelectionType.Area) { HandleLocationTargeting(key); } else if (_selectionType == SelectionType.Line) { HandleLocationTargeting(key); } if (key == RLKey.Enter) { _targetable.SelectTarget(_cursorPosition); StopTargeting(); return(true); } return(false); }
public bool HandleKey(KeyboardKeys key) { if (selectionType == SelectionType.Target) { HandleSelectableTargeting(key); } else if (selectionType == SelectionType.Area) { HandlePositionTargeting(key); } else if (selectionType == SelectionType.Line) { HandlePositionTargeting(key); } if (key == KeyboardKeys.EnterKey) { targetable.SelectTarget(cursorPosition); StopTargeting(); return(true); } return(false); }