MA2 Lua 函数库

  1. 主页
  2. 文档
  3. MA2 Lua 函数库
  4. gma.show.getobj.compare() 【对象比较函数】

gma.show.getobj.compare() 【对象比较函数】

函数名:对象比较函数
调 用:gma.show.getobj.compare(number:handle1,number:handle2)
参 数:第一个参数为数字:对象1的handle;第二个参数为数字:对象2的handle
返回值:布尔值:根据给定的两个对象handle比较是否相等,真为‘ture’,假为‘false’
结 果:
备 注:获取对象handle可以使用 gma.show.getobj.handle()

例子:

  • 以下一般用法
local handle1 = gma.show.getobj.handle('Group 1')
local handle1 = gma.show.getobj.handle('Group 101')
if gma.show.getobj.compare(handle1, handle2) then .... 
标签 , ,
这篇文章对您有用吗?

发表回复

您的电子邮箱地址不会被公开。