class Lapis::Multiplayer::PeerContext

Overview

Context representing a single simulated peer (Server or Client) Represents an isolated peer context (Server or Client) within the test harness

Defined in:

libgodot/multiplayer/harness.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(peer_id : Int32, role : String, root_node : Godot::Node, multiplayer_api : Godot::MultiplayerAPI, spy : Spy, peer : Godot::MultiplayerPeer | Nil = nil) #

Instance Method Detail

def client? : Bool #

def dispatch_rpc(method : String | Symbol, *args) : Void #

def get_node(path : String) : Godot::Node | Nil #

def harness : Harness | Nil #

def harness=(harness : Harness | Nil) #

def multiplayer_api : Godot::MultiplayerAPI #


def peer_id : Int32 #

def role : String #

def root_node : Godot::Node #

def rpc(method : String | Symbol, *args) : Godot::Error #

def rpc_id(target_peer_id : Int32 | Int64, method : String | Symbol, *args) : Godot::Error #

def send_action(action : String | Symbol, pressed : Bool = true, strength : Float32 = 1.0_f32) : Void #

def server? : Bool #

def spawn(node_class : T.class, name : String | Nil = nil) : T forall T #

def spawned_nodes : Array(Godot::Node) #

def spy : Spy #