Skip to content

Commit

Permalink
修改代码
Browse files Browse the repository at this point in the history
  • Loading branch information
pangdogs committed Aug 30, 2024
1 parent 0a7f380 commit 8bbe9c2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions comp_rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,16 @@ func (c *ComponentBehavior) GlobalBroadcastOnewayRPC(excludeSelf bool, comp, met
}

// CliRPC 向客户端发送RPC
func (c *ComponentBehavior) CliRPC(method string, args ...any) async.AsyncRet {
return rpcutil.ProxyEntity(c, c.GetEntity().GetId()).CliRPC(method, args...)
func (c *ComponentBehavior) CliRPC(proc, method string, args ...any) async.AsyncRet {
return rpcutil.ProxyEntity(c, c.GetEntity().GetId()).CliRPC(proc, method, args...)
}

// CliOnewayRPC 向客户端发送单向RPC
func (c *ComponentBehavior) CliOnewayRPC(method string, args ...any) error {
return rpcutil.ProxyEntity(c, c.GetEntity().GetId()).CliOnewayRPC(method, args...)
func (c *ComponentBehavior) CliOnewayRPC(proc, method string, args ...any) error {
return rpcutil.ProxyEntity(c, c.GetEntity().GetId()).CliOnewayRPC(proc, method, args...)
}

// BroadcastCliOnewayRPC 向包含实体的所有分组发送单向RPC
func (c *ComponentBehavior) BroadcastCliOnewayRPC(method string, args ...any) error {
return rpcutil.ProxyEntity(c, c.GetEntity().GetId()).BroadcastCliOnewayRPC(method, args...)
func (c *ComponentBehavior) BroadcastCliOnewayRPC(proc, method string, args ...any) error {
return rpcutil.ProxyEntity(c, c.GetEntity().GetId()).BroadcastCliOnewayRPC(proc, method, args...)
}
12 changes: 6 additions & 6 deletions entity_rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,16 @@ func (e *EntityBehavior) GlobalBroadcastOnewayRPC(excludeSelf bool, comp, method
}

// CliRPC 向客户端发送RPC
func (e *EntityBehavior) CliRPC(method string, args ...any) async.AsyncRet {
return rpcutil.ProxyEntity(e, e.GetId()).CliRPC(method, args...)
func (e *EntityBehavior) CliRPC(proc, method string, args ...any) async.AsyncRet {
return rpcutil.ProxyEntity(e, e.GetId()).CliRPC(proc, method, args...)
}

// CliOnewayRPC 向客户端发送单向RPC
func (e *EntityBehavior) CliOnewayRPC(method string, args ...any) error {
return rpcutil.ProxyEntity(e, e.GetId()).CliOnewayRPC(method, args...)
func (e *EntityBehavior) CliOnewayRPC(proc, method string, args ...any) error {
return rpcutil.ProxyEntity(e, e.GetId()).CliOnewayRPC(proc, method, args...)
}

// BroadcastCliOnewayRPC 向包含实体的所有分组发送单向RPC
func (e *EntityBehavior) BroadcastCliOnewayRPC(method string, args ...any) error {
return rpcutil.ProxyEntity(e, e.GetId()).BroadcastCliOnewayRPC(method, args...)
func (e *EntityBehavior) BroadcastCliOnewayRPC(proc, method string, args ...any) error {
return rpcutil.ProxyEntity(e, e.GetId()).BroadcastCliOnewayRPC(proc, method, args...)
}

0 comments on commit 8bbe9c2

Please sign in to comment.