Inheritance: MonoBehaviour
 void Awake()
 {
     if (mToggle == null) mToggle = GetComponent<UIToggle>();
     if (mToggleObjects == null) mToggleObjects = GetComponent<UIToggledObjects>();
     if (mPlaySound == null) mPlaySound = GetComponent<UIPlaySound>();
     if (mBtnActivate == null) mBtnActivate = GetComponent<UIButtonActivate>();
 }
Beispiel #2
0
 static public int Toggle(IntPtr l)
 {
     try {
         UIToggledObjects self = (UIToggledObjects)checkSelf(l);
         self.Toggle();
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Beispiel #3
0
 static public int get_deactivate(IntPtr l)
 {
     try {
         UIToggledObjects self = (UIToggledObjects)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.deactivate);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Beispiel #4
0
 static public int set_deactivate(IntPtr l)
 {
     try {
         UIToggledObjects self = (UIToggledObjects)checkSelf(l);
         System.Collections.Generic.List <UnityEngine.GameObject> v;
         checkType(l, 2, out v);
         self.deactivate = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static int Toggle(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         UIToggledObjects obj = (UIToggledObjects)ToLua.CheckObject(L, 1, typeof(UIToggledObjects));
         obj.Toggle();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Beispiel #6
0
    private static int Toggle(IntPtr L)
    {
        int result;

        try
        {
            ToLua.CheckArgsCount(L, 1);
            UIToggledObjects uIToggledObjects = (UIToggledObjects)ToLua.CheckObject(L, 1, typeof(UIToggledObjects));
            uIToggledObjects.Toggle();
            result = 0;
        }
        catch (Exception e)
        {
            result = LuaDLL.toluaL_exception(L, e, null);
        }
        return(result);
    }
    static int get_deactivate(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UIToggledObjects obj = (UIToggledObjects)o;
            System.Collections.Generic.List <UnityEngine.GameObject> ret = obj.deactivate;
            ToLua.PushObject(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index deactivate on a nil value" : e.Message));
        }
    }
    static int get_IsComplex(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UIToggledObjects obj = (UIToggledObjects)o;
            bool             ret = obj.IsComplex;
            LuaDLL.lua_pushboolean(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index IsComplex on a nil value" : e.Message));
        }
    }
    static int set_deactivate(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UIToggledObjects obj = (UIToggledObjects)o;
            System.Collections.Generic.List <UnityEngine.GameObject> arg0 = (System.Collections.Generic.List <UnityEngine.GameObject>)ToLua.CheckObject(L, 2, typeof(System.Collections.Generic.List <UnityEngine.GameObject>));
            obj.deactivate = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index deactivate on a nil value" : e.Message));
        }
    }
    static int set_IsComplex(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UIToggledObjects obj  = (UIToggledObjects)o;
            bool             arg0 = LuaDLL.luaL_checkboolean(L, 2);
            obj.IsComplex = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index IsComplex on a nil value" : e.Message));
        }
    }
Beispiel #11
0
    private static int get_deactivate(IntPtr L)
    {
        object obj = null;
        int    result;

        try
        {
            obj = ToLua.ToObject(L, 1);
            UIToggledObjects  uIToggledObjects = (UIToggledObjects)obj;
            List <GameObject> deactivate       = uIToggledObjects.deactivate;
            ToLua.PushObject(L, deactivate);
            result = 1;
        }
        catch (Exception ex)
        {
            result = LuaDLL.toluaL_exception(L, ex, (obj != null) ? ex.Message : "attempt to index deactivate on a nil value");
        }
        return(result);
    }
Beispiel #12
0
    private static int set_deactivate(IntPtr L)
    {
        object obj = null;
        int    result;

        try
        {
            obj = ToLua.ToObject(L, 1);
            UIToggledObjects  uIToggledObjects = (UIToggledObjects)obj;
            List <GameObject> deactivate       = (List <GameObject>)ToLua.CheckObject(L, 2, typeof(List <GameObject>));
            uIToggledObjects.deactivate = deactivate;
            result = 0;
        }
        catch (Exception ex)
        {
            result = LuaDLL.toluaL_exception(L, ex, (obj != null) ? ex.Message : "attempt to index deactivate on a nil value");
        }
        return(result);
    }
Beispiel #13
0
 protected override void OnAwake()
 {
     base.OnAwake();
     _toggledObj = GetComponent <UIToggledObjects>();
 }