Exemplo n.º 1
0
    // Clear Outside Word Item
    void UpdateTableItem()
    {
        if (mParentTrans == null)
        {
            return;
        }
        EndlessScroller table = mParentTrans.GetComponent <EndlessScroller>();
        Vector3         pos   = mParentTrans.localPosition + mTrans.localPosition;

        if (pos.y > table.cellHeight * 2f || pos.y < table.cellHeight * -6f)
        {
            Destroy(gameObject);
        }
    }
Exemplo n.º 2
0
    private static int get_totalHeight(IntPtr L)
    {
        object obj = null;
        int    result;

        try
        {
            obj = ToLua.ToObject(L, 1);
            EndlessScroller endlessScroller = (EndlessScroller)obj;
            float           totalHeight     = endlessScroller.totalHeight;
            LuaDLL.lua_pushnumber(L, (double)totalHeight);
            result = 1;
        }
        catch (Exception ex)
        {
            result = LuaDLL.toluaL_exception(L, ex, (obj != null) ? ex.Message : "attempt to index totalHeight on a nil value");
        }
        return(result);
    }
Exemplo n.º 3
0
    private static int set_windowHeight(IntPtr L)
    {
        object obj = null;
        int    result;

        try
        {
            obj = ToLua.ToObject(L, 1);
            EndlessScroller endlessScroller = (EndlessScroller)obj;
            float           windowHeight    = (float)LuaDLL.luaL_checknumber(L, 2);
            endlessScroller.windowHeight = windowHeight;
            result = 0;
        }
        catch (Exception ex)
        {
            result = LuaDLL.toluaL_exception(L, ex, (obj != null) ? ex.Message : "attempt to index windowHeight on a nil value");
        }
        return(result);
    }
Exemplo n.º 4
0
 void Awake()
 {
     instance = this;
     Invoke("TransitionColor", ColorTransitioningInterval);
 }
Exemplo n.º 5
0
 void Awake()
 {
     instance = this;
 }