示例#1
0
 static int SetValue(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         UISliderControl obj  = (UISliderControl)ToLua.CheckObject(L, 1, typeof(UISliderControl));
         float           arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
         obj.SetValue(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
示例#2
0
    static int set_KeyPointList(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UISliderControl obj = (UISliderControl)o;
            System.Collections.Generic.List <UISliderControl.KeyPoint> arg0 = (System.Collections.Generic.List <UISliderControl.KeyPoint>)ToLua.CheckObject(L, 2, typeof(System.Collections.Generic.List <UISliderControl.KeyPoint>));
            obj.KeyPointList = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index KeyPointList on a nil value" : e.Message));
        }
    }
示例#3
0
    static int get_Value(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UISliderControl obj = (UISliderControl)o;
            float           ret = obj.Value;
            LuaDLL.lua_pushnumber(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index Value on a nil value" : e.Message));
        }
    }
示例#4
0
    static int get_KeyPointList(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UISliderControl obj = (UISliderControl)o;
            System.Collections.Generic.List <UISliderControl.KeyPoint> ret = obj.KeyPointList;
            ToLua.PushObject(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index KeyPointList on a nil value" : e.Message));
        }
    }
示例#5
0
    static int set_Value(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UISliderControl obj  = (UISliderControl)o;
            float           arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
            obj.Value = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index Value on a nil value" : e.Message));
        }
    }
示例#6
0
    public void Setup(Camera camera, GameManager gamemanager, Collider[] holecollider)
    {
        // Get ref to GameManager
        m_Manager = gamemanager;

        // Set script used to push ball
        m_Movement = m_Instance.GetComponent <BallMovement>();
        m_Movement.SetCamera(camera);
        m_Movement.SetPower(m_ChargeTime, m_Force);
        m_Movement.SetHole(m_Hole);
        m_Movement.SetCollider(holecollider);
        m_Movement.SetManager(this);

        // Set slider
        uislider = m_Instance.GetComponentInChildren <UISliderControl>();
        uislider.SetCamera(camera);
        uislider.SetRigidbody(m_Instance.GetComponent <Rigidbody>());
    }