1 local SELECTOR = 1
2 local SEQUENCE = 2
3 local CONDITION = 3
4 local ACTION = 4
5
6 local function Traverse(node, ...)
7 local t = node.type
8 if t == SELECTOR then
9 ...……
time:2015/04/21
1. string.format()
function GetPreciseDecimal(nNum, n)
if type(nNum) ~= amp;quot;numberamp;quot; then
return nNum;
end
n = n or 0;
n = math.floor(n)
l ...……
function And(num1,num2)
local tmp1 = num1
local tmp2 = num2
local ret = 0
local count = 0
repeat
local s1 = tmp1 % 2
local s2 = tmp2 % 2
if s1 == s2 and s1 == 1 then
ret = ret + 2^count……