Skip to content

server.modules.InputParser

Mahatma Kollu edited this page Oct 19, 2021 · 2 revisions

Module: server/modules/InputParser

Table of contents

Functions

Functions

ParseInput

ParseInput(input): string

This function takes in enums and parses them to be a string. It can take in 3 types of enums, UserInputState, UserInputType, and Keycode or a table which contains all 3 of these enums. When parsing the table, if the Enum.Keycode is "Unknown" it will pass in the InputType as the input.

Parameters

Name Type Description
input UserInputState either a userinputstate, a userinputtype, a keycode, or a table which contains those 3 enums.

Returns

string

  • either a table containing an Input and State as strings or a string

Defined in

src/server/modules/InputParser.ts:1

ParseInput(input): string

This function takes in enums and parses them to be a string. It can take in 3 types of enums, UserInputState, UserInputType, and Keycode or a table which contains all 3 of these enums. When parsing the table, if the Enum.Keycode is "Unknown" it will pass in the InputType as the input.

Parameters

Name Type Description
input UserInputType either a userinputstate, a userinputtype, a keycode, or a table which contains those 3 enums.

Returns

string

  • either a table containing an Input and State as strings or a string

Defined in

src/server/modules/InputParser.ts:2

ParseInput(input): string

This function takes in enums and parses them to be a string. It can take in 3 types of enums, UserInputState, UserInputType, and Keycode or a table which contains all 3 of these enums. When parsing the table, if the Enum.Keycode is "Unknown" it will pass in the InputType as the input.

Parameters

Name Type Description
input KeyCode either a userinputstate, a userinputtype, a keycode, or a table which contains those 3 enums.

Returns

string

  • either a table containing an Input and State as strings or a string

Defined in

src/server/modules/InputParser.ts:3

ParseInput(input): Object

This function takes in enums and parses them to be a string. It can take in 3 types of enums, UserInputState, UserInputType, and Keycode or a table which contains all 3 of these enums. When parsing the table, if the Enum.Keycode is "Unknown" it will pass in the InputType as the input.

Parameters

Name Type Description
input Object either a userinputstate, a userinputtype, a keycode, or a table which contains those 3 enums.
input.KeyCode KeyCode -
input.UserInputState UserInputState -
input.UserInputType UserInputType -

Returns

Object

  • either a table containing an Input and State as strings or a string
Name Type
Input string
State string

Defined in

src/server/modules/InputParser.ts:4

Clone this wiki locally