Example #1
0
    public void set_valarrs(string v_header_name, int v_row, LuaTable v_table)
    {
        LuaArrayTable arr_info = v_table.ToArrayTable();
        StringBuilder sb       = new StringBuilder();

        for (int i = 1; i < arr_info.Length; i++)
        {
            var data = arr_info[i];
            if (sb.Length > 0)
            {
                sb.Append(',');
            }
            if (data != null)
            {
                if (data is string)
                {
                    sb.Append(Convert.ToString(data));
                }
                else
                {
                    ZFDebug.Info(string.Format("v_table[{0}] is not string", i));
                }
            }
            else
            {
                ZFDebug.Info(string.Format("v_table[{0}] = nil", i));
            }
        }
        set_val(v_header_name, v_row, sb.ToString());
    }
Example #2
0
    public void set_valarri(string v_header_name, int v_row, LuaTable v_table)
    {
        LuaArrayTable arr_info = v_table.ToArrayTable();
        StringBuilder sb       = new StringBuilder();
        int           idx      = 1;

        for (int i = 1; i < arr_info.Length; i++)
        {
            var data = arr_info[i];
            if (sb.Length > 0)
            {
                sb.Append(',');
            }
            if (data != null)
            {
                if (data is double || data is int)
                {
                    sb.Append((int)Convert.ToDouble(data));
                }
                else
                {
                    ZFDebug.Info(string.Format("v_table[{0}] is not number", idx));
                }
            }
            else
            {
                ZFDebug.Info(string.Format("v_table[{0}] = nil", idx));
            }
            idx = idx + 1;
        }
        set_val(v_header_name, v_row, sb.ToString());
    }
Example #3
0
        public void Show(int v_layer, string name)
        {
            var       panelName = name;
            Transform Parent    = getParent(v_layer);
            var       panelObj  = Parent.Find(panelName);

            if (panelObj == null)
            {
                ZFDebug.Info(Parent.name + " " + Parent.childCount.ToString());
                ZFDebug.Error("can't find the panel named " + panelName);
                return;
            }
            panelObj.gameObject.SetActive(true);
        }