找回密码
 点一下
查看: 926|回复: 2

galaxy的action里头的两个布尔参数是干嘛用的?

[复制链接]
发表于 2011-7-14 12:24:32 | 显示全部楼层 |阅读模式
每次我都是bool fun(bool a,bool b),bool a和bool b都没有用到,但是既然存在肯定有用处的,那bool a和bool b怎么用?看了gui转化的都是判断如果非b则返回false,但是a和b这两个参数从哪里传过来的?
发表于 2011-7-14 12:46:16 | 显示全部楼层
bool gt_TriggerTest_Func (bool testConds, bool runActions) {
    // Conditions
    if (testConds) {
        if (!((UnitGetOwner(EventUnit()) == 1))) {
            return false;
        }
    }

    // Actions
    if (!runActions) {
        return true;
    }

    TriggerDebugOutput(1, StringExternal("Param/Value/2ED0C478"), true);
    return true;
}
回复

使用道具 举报

发表于 2011-7-14 13:02:06 | 显示全部楼层
一个是决定是否判断条件,一个是决定是否执行动作。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 点一下

本版积分规则

Archiver|移动端|小黑屋|地精研究院

GMT+8, 2024-8-8 03:15 , Processed in 1.037778 second(s), 19 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表