예제 #1
0
    static int BindTouchUp(IntPtr L)
    {
        try
        {
            ToLua.CheckArgsCount(L, 2);
            GuideMask            obj       = (GuideMask)ToLua.CheckObject(L, 1, typeof(GuideMask));
            System.Action <bool> arg0      = null;
            LuaTypes             funcType2 = LuaDLL.lua_type(L, 2);

            if (funcType2 != LuaTypes.LUA_TFUNCTION)
            {
                arg0 = (System.Action <bool>)ToLua.CheckObject(L, 2, typeof(System.Action <bool>));
            }
            else
            {
                LuaFunction func = ToLua.ToLuaFunction(L, 2);
                arg0 = DelegateFactory.CreateDelegate(typeof(System.Action <bool>), func) as System.Action <bool>;
            }

            obj.BindTouchUp(arg0);
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
예제 #2
0
 static int IsRaycastLocationValid(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         GuideMask           obj  = (GuideMask)ToLua.CheckObject(L, 1, typeof(GuideMask));
         UnityEngine.Vector2 arg0 = ToLua.ToVector2(L, 2);
         UnityEngine.Camera  arg1 = (UnityEngine.Camera)ToLua.CheckUnityObject(L, 3, typeof(UnityEngine.Camera));
         bool o = obj.IsRaycastLocationValid(arg0, arg1);
         LuaDLL.lua_pushboolean(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
예제 #3
0
    static int set_target(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            GuideMask obj = (GuideMask)o;
            UnityEngine.RectTransform arg0 = (UnityEngine.RectTransform)ToLua.CheckUnityObject(L, 2, typeof(UnityEngine.RectTransform));
            obj.target = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index target on a nil value" : e.Message));
        }
    }
예제 #4
0
    static int get_target(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            GuideMask obj = (GuideMask)o;
            UnityEngine.RectTransform ret = obj.target;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index target on a nil value" : e.Message));
        }
    }
예제 #5
0
 public void Init()
 {
     _targetArea = gameObject.transform.Find("TargetArea") as RectTransform;
     Self        = this;
     Close();
 }
예제 #6
0
 void Awake()
 {
     Instance = this;
     _materia = _rawImage.material;
     ev       = transform.GetComponent <EventPenetrate>();
 }