.claude/skills/input-module/SKILL.md
InputModule reference — Unity Input System wrapper with reactive properties, action map switching, and haptic feedback. Use when working with player input, controls, or action maps.
npx skillsauth add punkfuncgames/tetris-clone input-moduleInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Package: com.punkfuncgames.input | Define: PUNKFUNC_INPUT
Location: Packages/com.punkfuncgames.input/Runtime/PunkFuncGames.Input/
Namespace: PunkFuncGames.Input
Continuous Inputs (ReactiveProperty):
ReadOnlyReactiveProperty<Vector2> Movement — WASD / Left StickReadOnlyReactiveProperty<Vector2> Look — Mouse delta / Right StickReadOnlyReactiveProperty<Vector2> MousePosition — Screen spaceReadOnlyReactiveProperty<bool> IsPrimaryHeld — LMB / Gamepad A heldReadOnlyReactiveProperty<bool> IsSecondaryHeld — RMB / Gamepad B heldEvent Observables:
Observable<Unit> OnPrimaryAction — Primary pressedObservable<Unit> OnSecondaryAction — Secondary pressedObservable<Unit> OnInteract — Interact pressedObservable<Unit> OnPause — Pause pressed (always fires, ignores enabled state)Observable<Unit> OnCancel — Cancel pressed (UI map)Control:
bool IsEnabled / SetEnabled(bool) — globally enable/disable (resets values when disabled)string CurrentActionMap / SwitchActionMap(string) — switch "Player" or "UI" mapsVibrate(float lowFreq, float highFreq, float duration) — gamepad haptics with auto-resetConstructor dependency: InputActionAsset (required, throws if null)
Observable.EveryUpdate()IsEnabled stateCompositeDisposable for cleanupInputInstaller.Install(builder, inputActionAsset);
// Registers: InputService (Singleton) as IInputService, with InputActionAsset parameter
public sealed class PlayerMovement : ITickable, IDisposable
{
private readonly IInputService _input;
private readonly CompositeDisposable _disposables = new();
public PlayerMovement(IInputService input) => _input = input;
public void Tick()
{
Vector2 move = _input.Movement.CurrentValue;
// Apply movement...
}
}
// Subscribe to events
_input.OnPrimaryAction
.Subscribe(_ => Attack())
.AddTo(_disposables);
_input.OnPause
.Subscribe(_ => _gameState.ChangeState(GameState.Paused))
.AddTo(_disposables);
// Switch to UI input during menus
_input.SwitchActionMap("UI");
development
WalletModule reference — currency management with BigDouble support, reactive properties, caps, lifetime stats, and persistence. Use when working with currencies, wallets, or financial systems.
development
UnlockConditionModule reference — composable unlock conditions using ScriptableObjects with AND/OR/NOT logic, stat/currency/upgrade/prestige/gamestate/boolean checks, reactive service layer with progress tracking. Use when implementing unlock systems, gating, or progression requirements.
development
UndoModule reference — command pattern with undo/redo stacks, command merging, and reactive state. Use when implementing undo/redo, undoable actions, or command patterns.
tools
Unity UI Toolkit reference — UXML documents, USS styling, MVVM pattern (ViewModel + Presenter), custom VisualElements, responsive layout, animations, performance guidelines, and complete Figma-to-UI-Toolkit property mapping. Use when building or modifying UI with UI Toolkit, creating UXML/USS files, writing ViewModels or Presenters, designing screens/panels/components, or converting Figma designs to UI Toolkit.