Appearance
图文信息模块管理接口 Graphics
具体函数名及描述如下:
MakeGraphicsText
- 参数及类型:
- 返回值及类型:
- info:
table
文本信息内容
- info:
- 该方法的主要作用: 创建文字板信息
- 具体使用案例如下:
lua
local data = Graphics:MakeGraphicsText([=[123]=], 16, 0, 1, true)
MakeflotageText
- 参数及类型:
- 返回值及类型:
- info:
table
漂浮文字信息内容
- info:
- 该方法的主要作用: 创建漂浮文字信息
- 具体使用案例如下:
lua
local data = Graphics:MakeflotageText([=[123]=], 16, 1)
MakeGraphicsProgress
- 参数及类型:
- 返回值及类型:
- info:
table
进度条信息内容
- info:
- 该方法的主要作用: 创建进度条信息
- 具体使用案例如下:
lua
local data = Graphics:MakeGraphicsProgress(100, 100, [=[0xf44336]=], 1)
MakeGraphicsArrowToPos
- 参数及类型:
- 返回值及类型:
- info:
table
箭头信息内容
- info:
- 该方法的主要作用: 生成指向位置的箭头数据
- 具体使用案例如下:
lua
local x, y, z = Actor:GetPosition(Player:GetHostUin())
local data = Graphics:MakeGraphicsArrowToPos(x + 10, y, z, 1, [=[0xf44336]=], 1)
MakeGraphicsLineToPos
- 参数及类型:
- 返回值及类型:
- info:
table
线信息内容
- info:
- 该方法的主要作用: 生成指向位置的线数据
- 具体使用案例如下:
lua
local x, y, z = Actor:GetPosition(Player:GetHostUin())
local data = Graphics:MakeGraphicsLineToPos(x + 10, y, z, 1, [=[0xf44336]=], 1)
MakeGraphicsSurfaceToPos
- 参数及类型:
- 返回值及类型:
- info:
table
面信息内容
- info:
- 该方法的主要作用: 生成指向位置的面数据
- 具体使用案例如下:
lua
local x, y, z = Actor:GetPosition(Player:GetHostUin())
local data = Graphics:MakeGraphicsSurfaceToPos(x + 10, y, z, 1, [=[0xf44336]=], 1)
MakeGraphicsArrowToActor
- 参数及类型:
- 返回值及类型:
- info:
table
箭头信息内容
- info:
- 该方法的主要作用: 生成指向对象的箭头数据
- 具体使用案例如下:
lua
local data = Graphics:MakeGraphicsArrowToActor(Player:GetHostUin(), 1, [=[0xf44336]=], 1)
MakeGraphicsLineToActor
- 参数及类型:
- 返回值及类型:
- info:
table
线信息内容
- info:
- 该方法的主要作用: 生成指向对象的线数据
- 具体使用案例如下:
lua
local data = Graphics:MakeGraphicsLineToActor(Player:GetHostUin(), 1, [=[0xf44336]=], 1)
MakeGraphicsSurfaceToActor
- 参数及类型:
- 返回值及类型:
- info:
table
面信息内容
- info:
- 该方法的主要作用: 生成指向对象的面数据
- 具体使用案例如下:
lua
local data = Graphics:MakeGraphicsSurfaceToActor(Player:GetHostUin(), 1, [=[0xf44336]=], 1)
MakeGraphicsImage
- 参数及类型:
- 返回值及类型:
- info:
table
图片信息内容
- info:
- 该方法的主要作用: 生成图片信息
- 具体使用案例如下:
lua
local data = Graphics:MakeGraphicsImage([=[0_10004]=], 1, 100, 1)
CreateGraphicsTxtByPos
- 参数及类型:
- 返回值及类型:
- ret:
number
图文对象id
- ret:
- 该方法的主要作用: 创建图文信息
- 具体使用案例如下:
lua
local x, y, z = Actor:GetPosition(Player:GetHostUin())
local data = Graphics:CreateGraphicsTxtByPos(x, y, z, Graphics:MakeGraphicsText([=[123]=], 16, 0, 1, true), 0 , 100)
CreateGraphicsTxtByActor
- 参数及类型:
- 返回值及类型:
- ret:
number
图文实例ID
- ret:
- 该方法的主要作用: 在生物身上创建文字板
- 具体使用案例如下:
lua
local data = Graphics:CreateGraphicsTxtByActor(Player:GetHostUin(), Graphics:MakeGraphicsText([=[123]=], 16, 0, 1, true), {x = 0, y = 1, z = 0}, 20)
CreateflotageTextByPos
- 参数及类型:
- 返回值及类型:
- ret:
number
图文实例ID
- ret:
- 该方法的主要作用: 在位置上创建漂浮文字
- 具体使用案例如下:
lua
local x, y, z = Actor:GetPosition(Player:GetHostUin())
local data = Graphics:CreateflotageTextByPos(x, y, z, Graphics:MakeflotageText([=[123]=], 16, 1))
CreateflotageTextByActor
- 参数及类型:
- 返回值及类型:
- ret:
number
实例ID
- ret:
- 该方法的主要作用: 在生物身上创建漂浮文字
- 具体使用案例如下:
lua
local data = Graphics:CreateflotageTextByActor(Player:GetHostUin(), Graphics:MakeflotageText([=[123]=], 16, 1), {x = 0, y = 1, z = 0}, 100)
CreateGraphicsProgressByPos
- 参数及类型:
- 返回值及类型:
- ret:
number
实例ID
- ret:
- 该方法的主要作用: 在位置上创建进度条
- 具体使用案例如下:
lua
local x, y, z = Actor:GetPosition(Player:GetHostUin())
local data = Graphics:CreateGraphicsProgressByPos(x, y, z, Graphics:MakeGraphicsProgress(100, 100, [=[0xf44336]=], 1))
CreateGraphicsProgressByActor
- 参数及类型:
- 返回值及类型:
- ret:
number
实例ID
- ret:
- 该方法的主要作用: 在生物身上创建进度条
- 具体使用案例如下:
lua
local data = Graphics:CreateGraphicsProgressByActor(Player:GetHostUin(), Graphics:MakeGraphicsProgress(100, 100, [=[0xf44336]=], 1), {x = 0, y = 1, z = 0}, 100)
RemoveGraphicsByPos
- 参数及类型:
- 返回值及类型:
- ret:
bool
成功(true)
- ret:
- 该方法的主要作用: 删除位置上的图文信息
- 具体使用案例如下:
lua
local result = Graphics:RemoveGraphicsByPos(x, y, z, 11, GraphicsType.Progress)
RemoveGraphicsByObjID
- 参数及类型:
- 返回值及类型:
- ret:
bool
成功(true)
- ret:
- 该方法的主要作用: 删除生物的图文信息
- 具体使用案例如下:
lua
local result = Graphics:RemoveGraphicsByObjID(Player:GetHostUin(), 11, GraphicsType.Progress)
CreateGraphicsArrowByActorToPos
- 参数及类型:
- 返回值及类型:
- ret:
bool
成功(true)
- ret:
- 该方法的主要作用: 创建生物指向位置的箭头
- 具体使用案例如下:
lua
local x, y, z = Actor:GetPosition(Player:GetHostUin())
local isSuccess = Graphics:CreateGraphicsArrowByActorToPos(Player:GetHostUin(), Graphics:MakeGraphicsArrowToPos(x + 10, y, z, 1, [=[0xf44336]=], 1), {x = 0, y = 1, z = 0}, 20)
CreateGraphicsArrowByActorToActor
- 参数及类型:
- 返回值及类型:
- ret:
bool
成功(true)
- ret:
- 该方法的主要作用: 创建生物指向生物的箭头
- 具体使用案例如下:
lua
local isSuccess = Graphics:CreateGraphicsArrowByActorToActor(Player:GetHostUin(), Graphics:MakeGraphicsArrowToActor(Player:GetHostUin(), 1, [=[0xf44336]=], 1), {x = 0, y = 1, z = 0}, 20)
CreateGraphicsArrowByPosToPos
lua
local x, y, z = Actor:GetPosition(Player:GetHostUin())
local isSuccess = Graphics:CreateGraphicsArrowByPosToPos({x = x, y = y, z = z}, Graphics:MakeGraphicsArrowToPos(x + 10, y, z, 1, [=[0xf44336]=], 1))
CreateGraphicsArrowByPosToActor
lua
local x, y, z = Actor:GetPosition(Player:GetHostUin())
local isSuccess = Graphics:CreateGraphicsArrowByPosToActor({x = x, y = y, z = z}, Graphics:MakeGraphicsArrowToActor(Player:GetHostUin(), 1, [=[0xf44336]=], 1))
CreateGraphicsLineByActorToPos
- 参数及类型:
- 返回值及类型:
- ret:
bool
成功(true)
- ret:
- 该方法的主要作用: 创建生物与位置的线
- 具体使用案例如下:
lua
local x, y, z = Actor:GetPosition(Player:GetHostUin())
local isSuccess = Graphics:CreateGraphicsLineByActorToPos(Player:GetHostUin(), Graphics:MakeGraphicsLineToPos(x + 10, y, z, 1, [=[0xf44336]=], 1), {x = 0, y = 1, z = 0}, 20)
CreateGraphicsLineByActorToActor
- 参数及类型:
- 返回值及类型:
- ret:
bool
成功(true)
- ret:
- 该方法的主要作用: 创建指向生物的线
- 具体使用案例如下:
lua
local isSuccess = Graphics:CreateGraphicsLineByActorToActor(Player:GetHostUin(), Graphics:MakeGraphicsLineToActor(Player:GetHostUin(), 1, [=[0xf44336]=], 1), {x = 0, y = 1, z = 0}, 20)
CreateGraphicsLineByPosToPos
lua
local x, y, z = Actor:GetPosition(Player:GetHostUin())
local isSuccess = Graphics:CreateGraphicsLineByPosToPos({x = x, y = y, z = z}, Graphics:MakeGraphicsLineToPos(x + 10, y, z, 1, [=[0xf44336]=], 1))
CreateGraphicsLineByPosToActor
lua
local x, y, z = Actor:GetPosition(Player:GetHostUin())
local isSuccess = Graphics:CreateGraphicsLineByPosToActor({x = x, y = y, z = z}, Graphics:MakeGraphicsLineToActor(Player:GetHostUin(), 1, [=[0xf44336]=], 1))
CreateGraphicsSurfaceByActorToPos
- 参数及类型:
- 返回值及类型:
- ret:
bool
成功(true)
- ret:
- 该方法的主要作用: 创建生物与位置的面
- 具体使用案例如下:
lua
local x, y, z = Actor:GetPosition(Player:GetHostUin())
local isSuccess = Graphics:CreateGraphicsSurfaceByActorToPos(Player:GetHostUin(), Graphics:MakeGraphicsSurfaceToPos(x + 10, y, z, 1, [=[0xf44336]=], 1), {x = 0, y = 1, z = 0}, 20)
CreateGraphicsSurfaceByActorToActor
- 参数及类型:
- 返回值及类型:
- ret:
bool
成功(true)
- ret:
- 该方法的主要作用: 创建生物与生物的引导面
- 具体使用案例如下:
lua
local isSuccess = Graphics:CreateGraphicsSurfaceByActorToActor(Player:GetHostUin(), Graphics:MakeGraphicsSurfaceToActor(Player:GetHostUin(), 1, [=[0xf44336]=], 1), {x = 0, y = 1, z = 0}, 20)
CreateGraphicsSurfaceByPosToPos
lua
local x, y, z = Actor:GetPosition(Player:GetHostUin())
local isSuccess = Graphics:CreateGraphicsSurfaceByPosToPos({x = x, y = y, z = z}, Graphics:MakeGraphicsSurfaceToPos(x + 10, y, z, 1, [=[0xf44336]=], 1))
CreateGraphicsSurfaceByPosToActor
- 参数及类型: pos:table:位置坐标(x|y|z)info:table:图文信息
- 返回值及类型:
- ret:
bool
成功(true)
- ret:
- 该方法的主要作用: 创建位置指向生物的面
- 具体使用案例如下:
lua
local x, y, z = Actor:GetPosition(Player:GetHostUin())
local isSuccess = Graphics:CreateGraphicsSurfaceByPosToActor({x = x, y = y, z = z}, Graphics:MakeGraphicsSurfaceToActor(Player:GetHostUin(), 1, [=[0xf44336]=], 1))
CreateGraphicsImageByPos
- 参数及类型:
- 返回值及类型:
- ret:
bool
是否成功
- ret:
- 该方法的主要作用: 在位置上创建图像
- 具体使用案例如下:
lua
local x, y, z = Actor:GetPosition(Player:GetHostUin())
local isSuccess = Graphics:CreateGraphicsImageByPos(x, y, z, Graphics:MakeGraphicsImage([=[0_10004]=], 1, 100, 1))
CreateGraphicsImageByActor
- 参数及类型:
- 返回值及类型:
- ret:
bool
是否成功
- ret:
- 该方法的主要作用: 在生物上创建图像
- 具体使用案例如下:
lua
local isSuccess = Graphics:CreateGraphicsImageByActor(Player:GetHostUin(), Graphics:MakeGraphicsImage([=[0_10004]=], 1, 100, 1), {x = 0, y = 1, z = 0}, 20)
GetInnerGraphicsOffset
- 参数及类型:
- objid:
number
对象ID - itype:
number
类型 PlayerNameTypePlayerNameType
- objid:
- 返回值及类型:
- ret:
number
高度值(未展示 0)
- ret:
- 该方法的主要作用: 获取玩家昵称或称号的偏移高度 玩家脚本调用
- 具体使用案例如下:
lua
Graphics:GetInnerGraphicsOffset(Player:GetHostUin(), PlayerNameType.Nick, function (height)
if height == 0 then
print("未展示")
else
print("高度", height)
end
end)