Documentation ¶
Index ¶
- Constants
- type INativeMethod
- type INetworkPeer
- type INode
- type IScene
- type ITree
- type MultiplayerAPI
- type NetworkCommand
- type Node
- func (n *Node) AddNativeRPCMethod(method INativeMethod)
- func (n *Node) AppendChild(node INode)
- func (n *Node) GetNode(path string) INode
- func (n *Node) GetOrNewNode(path string) INode
- func (n *Node) Instance() INode
- func (n *Node) InstanceID() uint32
- func (t *Node) ListenAndServe()
- func (n *Node) Name() string
- func (n *Node) NewNode(path string) (r INode)
- func (n *Node) Path() (result string)
- func (n *Node) Rpc(procedureName string, params ...interface{})
- func (n *Node) RpcId(id int32, procedureName string, params ...interface{})
- func (n *Node) RpcUnreliable(procedureName string, params ...interface{})
- func (n *Node) RpcUnreliableId(id int32, procedureName string, params ...interface{})
- func (t *Node) SetNetworkPeer(peer INetworkPeer)
- func (t *Node) SetScene(scene INode)
- type SentPathCache
- type StreamReader
Constants ¶
View Source
const ( NIL = iota // atomic types BOOL INT REAL STRING VECTOR2 // 5 RECT2 VECTOR3 TRANSFORM2D PLANE QUAT // 10 AABB BASIS TRANSFORM // misc types COLOR NODE_PATH // 15 OBJECT DICTIONARY ARRAY // arrays POOL_BYTE_ARRAY // 20 POOL_INT_ARRAY POOL_REAL_ARRAY POOL_STRING_ARRAY POOL_VECTOR2_ARRAY POOL_VECTOR3_ARRAY // 25 POOL_COLOR_ARRAY VARIANT_MAX )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type INativeMethod ¶
type INativeMethod interface { New() INativeMethod SetOwnerNode(INode) Name() string Call() Unmarshal(*StreamReader) }
type INetworkPeer ¶
type INetworkPeer interface { signals.ISubscribeable GetPacket() (source uint32, target int32, data []byte) PutPacket() ListenAndServe() }
type INode ¶
type INode interface { Name() string Path() string InstanceID() uint32 NewNode(path string) INode GetNode(path string) INode GetOrNewNode(path string) INode AppendChild(node INode) AddNativeRPCMethod(method INativeMethod) Rpc(procedureName string, params ...interface{}) RpcId(id int32, procedureName string, params ...interface{}) RpcUnreliable(procedureName string, params ...interface{}) RpcUnreliableId(id int32, procedureName string, params ...interface{}) // contains filtered or unexported methods }
type IScene ¶
func GetOrNewScene ¶
type ITree ¶
type ITree interface { INode SetScene(scene INode) SetNetworkPeer(peer INetworkPeer) ListenAndServe() }
type MultiplayerAPI ¶
type MultiplayerAPI struct {
// contains filtered or unexported fields
}
func (*MultiplayerAPI) ListenAndServe ¶
func (m *MultiplayerAPI) ListenAndServe()
func (*MultiplayerAPI) SetNetworkPeer ¶
func (m *MultiplayerAPI) SetNetworkPeer(peer INetworkPeer)
type NetworkCommand ¶
type NetworkCommand uint8
const ( CommandRemoteCall NetworkCommand = 0 CommandRemoteSet NetworkCommand = 1 CommandSimplifyPath NetworkCommand = 2 CommandConfirmPath NetworkCommand = 3 CommandRaw NetworkCommand = 4 )
func (NetworkCommand) Uint8 ¶
func (i NetworkCommand) Uint8() uint8
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
func (*Node) AddNativeRPCMethod ¶
func (n *Node) AddNativeRPCMethod(method INativeMethod)
func (*Node) AppendChild ¶
func (*Node) GetOrNewNode ¶
func (*Node) Instance ¶
Lets think that, /root is scene tree, like in godot, so we can call instance() method
func (*Node) InstanceID ¶
func (*Node) ListenAndServe ¶
func (t *Node) ListenAndServe()
func (*Node) RpcUnreliable ¶
func (*Node) RpcUnreliableId ¶
func (*Node) SetNetworkPeer ¶
func (t *Node) SetNetworkPeer(peer INetworkPeer)
type SentPathCache ¶
type SentPathCache struct {
// contains filtered or unexported fields
}
type StreamReader ¶
type StreamReader struct {
// contains filtered or unexported fields
}
func NewStreamReader ¶
func NewStreamReader(a []byte) *StreamReader
func (*StreamReader) ReadInt32 ¶
func (r *StreamReader) ReadInt32() (i int32)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.