forked from Tencent/UnLua
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path10_Replications.lua
More file actions
Latest commit
34 lines (24 loc) · 707 Bytes
/
Copy path10_Replications.lua
File metadata and controls
34 lines (24 loc) · 707 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
--[[
说明:
使用 {函数名}_RPC 可以覆盖蓝图中RPC函数的实现
使用 OnRep_{变量名} 可以覆盖蓝图中变量同步消息的处理
蓝图示例:
Content/Tutorials/10_Replications/ChatCharacter.uasset
脚本示例:
Content/Script/Tutorials/ChatCharacter.lua
]]--
localScreen=require"Tutorials.Screen"
localM=UnLua.Class()
functionM:ReceiveBeginPlay()
ifnotself:HasAuthority() then
return
end
localmsg=[[
试试使用多人模式运行示例吧
方向键:移动
空格:跳跃
—— 本示例来自 "Content/Script/Tutorials.10_Replications.lua"
]]
Screen.Print(msg)
end
returnM