27 lines
987 B
TypeScript
27 lines
987 B
TypeScript
// Content/UE/InputMappingContext.ts
|
|
|
|
import { DataAsset } from '/Content/UE/DataAsset.ts';
|
|
import { EnhancedActionKeyMapping } from '/Content/UE/EnhancedActionKeyMapping.ts';
|
|
import type { InputAction } from '/Content/UE/InputAction.ts';
|
|
import type { InputModifier } from '/Content/UE/InputModifier.ts';
|
|
import type { InputTrigger } from '/Content/UE/InputTrigger.ts';
|
|
import type { Key } from '/Content/UE/Key.ts';
|
|
import { Name } from '/Content/UE/Name.ts';
|
|
import type { UEArray } from '/Content/UE/UEArray.ts';
|
|
import type { UEObject } from '/Content/UE/UEObject.ts';
|
|
|
|
export class InputMappingContext extends DataAsset {
|
|
constructor(outer: UEObject | null = null, name: Name | string = Name.NONE) {
|
|
super(outer, name);
|
|
}
|
|
|
|
public mapKey(action: InputAction, toKey: Key): EnhancedActionKeyMapping {
|
|
return new EnhancedActionKeyMapping(
|
|
[] as unknown as UEArray<InputTrigger>,
|
|
[] as unknown as UEArray<InputModifier>,
|
|
action,
|
|
toKey
|
|
);
|
|
}
|
|
}
|