public void ReplaceInputRequest(byte newRpcByteID, BeardedManStudios.Forge.Networking.RpcArgs newArgs)
    {
        var index     = GameComponentsLookup.InputRequest;
        var component = CreateComponent <InputRequestComponent>(index);

        component.rpcByteID = newRpcByteID;
        component.args      = newArgs;
        ReplaceComponent(index, component);
    }
コード例 #2
0
    public void AddRPCInput(string newContext, uint newNetworkID, byte newRpcByteID, BeardedManStudios.Forge.Networking.RpcArgs newArgs)
    {
        var index     = InputComponentsLookup.RPCInput;
        var component = CreateComponent <RPCInputComponent>(index);

        component.context   = newContext;
        component.networkID = newNetworkID;
        component.rpcByteID = newRpcByteID;
        component.args      = newArgs;
        AddComponent(index, component);
    }