y3-editor / y3-lualib

MIT License
141 stars 42 forks source link

帧逻辑顺序问题 #427

Closed kneesbuster closed 4 months ago

kneesbuster commented 4 months ago

image

local hero = y3.object.unit[134239533]
hero:event("单位-创建", function(_, data)
    if data.unit:has_tag("hero") then
        log.info("(lualib 0帧判定)是英雄")
    else
        log.info("(lualib 0帧判定)不是英雄")
    end
    y3.timer.wait(0, function()
        if data.unit:has_tag("hero") then
            log.info("(lualib 1帧判定)是英雄")
        else
            log.info("(lualib 1帧判定)不是英雄")
        end
    end)
end)

image kv等也有类似问题,kv_save后必须下一帧才能load到

sumneko commented 4 months ago

6月27号的版本似乎会修,等更新了以后再看一下

kneesbuster commented 4 months ago

亲测已修复