-
Notifications
You must be signed in to change notification settings - Fork 7
server.components.Tool.Tool
| Name | Type |
|---|---|
A |
extends ToolAttributes
|
I |
extends ToolInstance
|
-
BaseComponent<A,I>↳
Tool↳↳
Essential
OnStart
- Actions
- ButtonedInputInfo
- InputInfo
- Player
- attributes
- id
- instance
- janitor
- maid
- state
- stateChanged
- timeCreated
- AddAction
- GetActionInfo
- Init
- InitPlayer
- InitWorkspace
- Input
- ManageAncestry
- ManageButtons
- PlayerInit
- RequirePlayer
- SetupInput
- UpdateAncestry
- UpdateButtons
- destroy
- fillButtonsInTable
- getState
- isButton
- onAttributeChanged
- onStart
- setAttribute
- setInstance
- setState
• new Tool<A, I>()
| Name | Type |
|---|---|
A |
extends ToolAttributes
|
I |
extends ToolInstance<I> |
BaseComponent<A, I>.constructor
• Abstract Actions: Actions
src/server/components/Tool.ts:54
• Private Optional ButtonedInputInfo: InputInfo
src/server/components/Tool.ts:60
• Abstract InputInfo: InputInfo
src/server/components/Tool.ts:55
• Optional Player: Player
src/server/components/Tool.ts:64
• attributes: A
Attributes attached to this instance.
BaseComponent.attributes
node_modules/@flamework/components/out/index.d.ts:20
• id: string
src/server/components/Tool.ts:61
• instance: I
The instance this component is attached to. This should only be called in a component lifecycle event.
BaseComponent.instance
node_modules/@flamework/components/out/index.d.ts:25
• Protected janitor: Janitor<void>
src/server/components/Tool.ts:59
• maid: Maid
A maid that will be destroyed when the component is.
BaseComponent.maid
node_modules/@flamework/components/out/index.d.ts:16
• state: string = "nil"
src/server/components/Tool.ts:62
• stateChanged: Signal<fn, false>
src/server/components/Tool.ts:65
• timeCreated: number
src/server/components/Tool.ts:63
▸ Private AddAction(Action): void
| Name | Type |
|---|---|
Action |
Action |
void
src/server/components/Tool.ts:168
▸ Private GetActionInfo(toolState, input): undefined | ActionInfo
| Name | Type |
|---|---|
toolState |
string |
input |
Object |
input.Input |
string |
input.State |
string |
undefined | ActionInfo
src/server/components/Tool.ts:172
▸ Optional Abstract Init(): void
void
src/server/components/Tool.ts:56
▸ Private InitPlayer(): void
void
src/server/components/Tool.ts:130
▸ Private InitWorkspace(): void
void
src/server/components/Tool.ts:140
▸ Private Input(state, input): void
| Name | Type |
|---|---|
state |
string |
input |
Object |
input.Input |
string |
input.State |
string |
void
src/server/components/Tool.ts:154
▸ Private ManageAncestry(): void
void
src/server/components/Tool.ts:103
▸ Private ManageButtons(): void
void
src/server/components/Tool.ts:92
▸ Optional Abstract PlayerInit(): void
void
src/server/components/Tool.ts:57
▸ Private RequirePlayer(): Player
Player
src/server/components/Tool.ts:122
▸ Private SetupInput(): RBXScriptConnection
RBXScriptConnection
src/server/components/Tool.ts:144
▸ Private UpdateAncestry(): void
void
src/server/components/Tool.ts:108
▸ Private UpdateButtons(): void
updates the ButtonedInputInfo to be accurate to newly assigned buttons
void
src/server/components/Tool.ts:189
▸ destroy(): void
Destroys this component instance.
void
BaseComponent.destroy
node_modules/@flamework/components/out/index.d.ts:39
▸ Private fillButtonsInTable<T>(Table): T
Takes in a table and loops through its indexes and values. Ensures that all of it's indexes if buttons are set to their actual attribute value and if any of it's values are tables that their indexes are also checked and made sure that any buttons in their indexes are set to their actual attribute values aswell.
example
const Table: InputInfo = {
Holstered: {
Begin: {
BUTTON_TOGGLE: {
Action = "Equip"
}
}
}
}
const ButtonedInputInfo = fillButtonsInTable(Table) where this.attributes = { BUTTON_TOGGLE: "One" } // "One" being representative of the 1 key on the keyboard
// what ButtonedInputInfo is equal to:
// notice the purpose is to remove all BUTTON_ and replace them with their actual value
{
Holstered: {
Begin: {
One: {
Action = "Equip"
}
}
}
}| Name | Type |
|---|---|
T |
extends Object
|
| Name | Type | Description |
|---|---|---|
Table |
T |
a table which has a string index |
T
A Table who's indexes if buttons were replaced by their actual value
src/server/components/Tool.ts:228
▸ getState(): string
string
src/server/components/Tool.ts:67
▸ Private isButton(str): boolean
returns if the string is an identifier for a button
| Name | Type |
|---|---|
str |
string |
boolean
src/server/components/Tool.ts:251
▸ onAttributeChanged<K>(name, cb): void
Connect a callback to the change of a specific attribute.
| Name | Type |
|---|---|
K |
extends string | number | symbol
|
| Name | Type | Description |
|---|---|---|
name |
K |
The name of the attribute |
cb |
(newValue: A[K], oldValue: A[K]) => void
|
The callback |
void
BaseComponent.onAttributeChanged
node_modules/@flamework/components/out/index.d.ts:35
▸ onStart(): void
void
OnStart.onStart
src/server/components/Tool.ts:76
▸ setAttribute<T>(key, value, postfix?): A[T]
| Name | Type |
|---|---|
T |
extends string | number | symbol
|
| Name | Type |
|---|---|
key |
T |
value |
A[T] |
postfix? |
boolean |
A[T]
BaseComponent.setAttribute
node_modules/@flamework/components/out/index.d.ts:27
▸ setInstance(instance, attributes): void
| Name | Type |
|---|---|
instance |
I |
attributes |
unknown |
void
BaseComponent.setInstance
node_modules/@flamework/components/out/index.d.ts:26
▸ setState(state): void
| Name | Type |
|---|---|
state |
string |
void
- client/controllers/SpringCam
- client/controllers/Direction
- client/controllers/Rotation
- client/controllers/Shake
- client/controllers/Input
- server/modules/InputParser
- server/modules/Middleware
- server/modules/AnimPlayer
- server/modules/Action
- server/modules/Defer