Skip to main content

PlayerBinder

Binds the given class to each player in the game

Functions

new

PlayerBinder.new(
tagstring,
...any
) → PlayerBinder<T>

Returns a new PlayerBinder

Init

PlayerBinder.Init(
selfPlayerBinder<T>,
serviceBagany,
...any
) → ...any

Initializes the binder. Captures the owning ServiceBag so PlayerBinder.Start can discover mock players from it. Done via a ServiceBag.

Start

PlayerBinder.Start(selfPlayerBinder<T>) → ...any

Starts the binder. See Binder.Start. Should be done via a ServiceBag.

Show raw api
{
    "functions": [
        {
            "name": "new",
            "desc": "Returns a new PlayerBinder",
            "params": [
                {
                    "name": "tag",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "class",
                    "desc": "",
                    "lua_type": "BinderContructor"
                },
                {
                    "name": "...",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "PlayerBinder<T>"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 27,
                "path": "src/playerbinder/src/Server/PlayerBinder.lua"
            }
        },
        {
            "name": "Init",
            "desc": "Initializes the binder. Captures the owning [ServiceBag] so [PlayerBinder.Start] can discover mock\nplayers from it. Done via a ServiceBag.",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "PlayerBinder<T>"
                },
                {
                    "name": "serviceBag",
                    "desc": "",
                    "lua_type": "any"
                },
                {
                    "name": "...",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "...any\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 37,
                "path": "src/playerbinder/src/Server/PlayerBinder.lua"
            }
        },
        {
            "name": "Start",
            "desc": "Starts the binder. See [Binder.Start].\nShould be done via a [ServiceBag].",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "PlayerBinder<T>"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "...any\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 55,
                "path": "src/playerbinder/src/Server/PlayerBinder.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "PlayerBinder",
    "desc": "Binds the given class to each player in the game",
    "source": {
        "line": 6,
        "path": "src/playerbinder/src/Server/PlayerBinder.lua"
    }
}