Skip to main content

ScoredActionServiceClient

This item only works when running on the client. Client

Scores actions and picks the highest rated one every frame.

Functions

Init

ScoredActionServiceClient.Init() → ()

Initializes the ScoredActionServiceClient. Should be done via ServiceBag.

Start

ScoredActionServiceClient.Start(selfScoredActionServiceClient) → ()

Starts the scored action service. Should be done via ServiceBag.

GetScoredAction

ScoredActionServiceClient.GetScoredAction() → ScoredAction

Gets a new scored action to use

ObserveNewFromInputKeyMapList

ScoredActionServiceClient.ObserveNewFromInputKeyMapList(
scoreValueValueObject<number>
) → (sourceObservable<InputKeyMapList>) → Observable<ScoredAction>

Observes a new scored action from a scoring value.

WARNING

This MUTATES state of the scored action service whenever an object is emitted.

WARNING

Each emitted ScoredAction is owned by the subscription, and is destroyed when the next one is emitted or when the subscription ends. A source that completes as soon as it emits (such as Rx.of) therefore hands back an already-destroyed action. Keep the source open for as long as the action should live.

Show raw api
{
    "functions": [
        {
            "name": "Init",
            "desc": "Initializes the ScoredActionServiceClient. Should be done via [ServiceBag].",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "ScoredActionServiceClient"
                },
                {
                    "name": "serviceBag",
                    "desc": "",
                    "lua_type": "ServiceBag"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 37,
                "path": "src/scoredactionservice/src/Client/ScoredActionServiceClient.lua"
            }
        },
        {
            "name": "Start",
            "desc": "Starts the scored action service. Should be done via [ServiceBag].",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "ScoredActionServiceClient"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 52,
                "path": "src/scoredactionservice/src/Client/ScoredActionServiceClient.lua"
            }
        },
        {
            "name": "GetScoredAction",
            "desc": "Gets a new scored action to use",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "ScoredActionServiceClient"
                },
                {
                    "name": "inputKeyMapList",
                    "desc": "",
                    "lua_type": "InputKeyMapList"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "ScoredAction"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 65,
                "path": "src/scoredactionservice/src/Client/ScoredActionServiceClient.lua"
            }
        },
        {
            "name": "ObserveNewFromInputKeyMapList",
            "desc": "Observes a new scored action from a scoring value.\n\n:::warning\nThis MUTATES state of the scored action service whenever an object is emitted.\n:::\n\n:::warning\nEach emitted [ScoredAction] is owned by the subscription, and is destroyed when the next one is\nemitted or when the subscription ends. A source that completes as soon as it emits (such as\n[Rx.of]) therefore hands back an already-destroyed action. Keep the source open for as long as\nthe action should live.\n:::",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "ScoredActionServiceClient"
                },
                {
                    "name": "scoreValue",
                    "desc": "",
                    "lua_type": "ValueObject<number>"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "(source: Observable<InputKeyMapList>) -> Observable<ScoredAction>"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 119,
                "path": "src/scoredactionservice/src/Client/ScoredActionServiceClient.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "ScoredActionServiceClient",
    "desc": "Scores actions and picks the highest rated one every frame.",
    "realm": [
        "Client"
    ],
    "source": {
        "line": 8,
        "path": "src/scoredactionservice/src/Client/ScoredActionServiceClient.lua"
    }
}