Beispiel #1
0
        static int __CreateInstance(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                if (LuaAPI.lua_gettop(L) == 1)
                {
                    UnityEngine.UI.Dropdown.OptionData __cl_gen_ret = new UnityEngine.UI.Dropdown.OptionData();
                    translator.Push(L, __cl_gen_ret);

                    return(1);
                }
                if (LuaAPI.lua_gettop(L) == 2 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING))
                {
                    string text = LuaAPI.lua_tostring(L, 2);

                    UnityEngine.UI.Dropdown.OptionData __cl_gen_ret = new UnityEngine.UI.Dropdown.OptionData(text);
                    translator.Push(L, __cl_gen_ret);

                    return(1);
                }
                if (LuaAPI.lua_gettop(L) == 2 && translator.Assignable <UnityEngine.Sprite>(L, 2))
                {
                    UnityEngine.Sprite image = (UnityEngine.Sprite)translator.GetObject(L, 2, typeof(UnityEngine.Sprite));

                    UnityEngine.UI.Dropdown.OptionData __cl_gen_ret = new UnityEngine.UI.Dropdown.OptionData(image);
                    translator.Push(L, __cl_gen_ret);

                    return(1);
                }
                if (LuaAPI.lua_gettop(L) == 3 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && translator.Assignable <UnityEngine.Sprite>(L, 3))
                {
                    string             text  = LuaAPI.lua_tostring(L, 2);
                    UnityEngine.Sprite image = (UnityEngine.Sprite)translator.GetObject(L, 3, typeof(UnityEngine.Sprite));

                    UnityEngine.UI.Dropdown.OptionData __cl_gen_ret = new UnityEngine.UI.Dropdown.OptionData(text, image);
                    translator.Push(L, __cl_gen_ret);

                    return(1);
                }
            }
            catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.UI.Dropdown.OptionData constructor!"));
        }
 private void TryUpdateValue(StoryInstance instance)
 {
     if (m_Index.HaveValue)
     {
         m_HaveValue = true;
         int index = m_Index.Value;
         UnityEngine.Sprite obj = SpriteManager.GetActorIcon(index);
         if (null != obj)
         {
             m_Value = obj;
         }
         else
         {
             m_Value = null;
         }
     }
 }
        /// <summary>
        /// Skip SetStat if stat is 0
        /// </summary>
        public static bool Prefix(
            UIItemTooltip __instance, MethodInfo __originalMethod,
            LocalizedTextBind statLocalization, bool secondObject, object statValue,
            object statCompareValue = null, UnityEngine.Sprite statIcon = null )
        {
            float svFloat,scvFloat;
            string svType, scvType = "";
            string svString = statValue as string ?? "null" ;
            string scvString = statCompareValue as string ?? "null";
            string zeroPercent = Base.UI.UIUtil.PercentageStat(0f, __instance.PercentageString.Localize(null));

            try {
                svFloat = (float)statValue;
            } catch (InvalidCastException) {
                svFloat = 12.34f;
            }
            try {
                scvFloat = (float)statValue;
            } catch (InvalidCastException) {
                scvFloat = 12.34f;
            }
            try {
                svType = statValue.GetType().ToString();
            } catch (NullReferenceException) {
                svType = "NULL";
            }
            try {
                scvType = statCompareValue.GetType().ToString();
            } catch (NullReferenceException) {
                scvType = "NULL";
            }

            bool svSkip = svString == "0" || svString == zeroPercent || svFloat == 0f;
            bool scvSkip = scvString == "0" || scvString == zeroPercent || scvFloat == 0f;
#if DEBUG
            BasicUtil.Log($"Injected into {__instance.GetType()}.{__originalMethod.Name}()", MyMod.storedAPI);
            BasicUtil.Log($"  {statLocalization.Localize()} [2nd: {secondObject}]", MyMod.storedAPI);
            BasicUtil.Log($"  SV: {statValue ?? 0,4} [{svType}]", MyMod.storedAPI);
            BasicUtil.Log($"  CV: {statCompareValue ?? 0,4} [{scvType}]", MyMod.storedAPI);
            BasicUtil.Log($"  SVSkip: {svSkip}", MyMod.storedAPI);
            BasicUtil.Log($"  CVSkip: {scvSkip}", MyMod.storedAPI);
#endif

            return !(scvSkip && svSkip) || MyMod.Config.show_zeros;
        }
        static StackObject *Add_0(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.Sprite @item = (UnityEngine.Sprite) typeof(UnityEngine.Sprite).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            System.Collections.Generic.List <UnityEngine.Sprite> instance_of_this_method = (System.Collections.Generic.List <UnityEngine.Sprite>) typeof(System.Collections.Generic.List <UnityEngine.Sprite>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.Add(@item);

            return(__ret);
        }
        static StackObject *OverridePhysicsShape_19(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Collections.Generic.IList <UnityEngine.Vector2[]> @physicsShapes = (System.Collections.Generic.IList <UnityEngine.Vector2[]>) typeof(System.Collections.Generic.IList <UnityEngine.Vector2[]>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UnityEngine.Sprite instance_of_this_method = (UnityEngine.Sprite) typeof(UnityEngine.Sprite).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.OverridePhysicsShape(@physicsShapes);

            return(__ret);
        }
        static int __CreateInstance(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                if (LuaAPI.lua_gettop(L) == 1)
                {
                    UnityEngine.Sprite __cl_gen_ret = new UnityEngine.Sprite();
                    translator.Push(L, __cl_gen_ret);

                    return(1);
                }
            }
            catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.Sprite constructor!"));
        }
Beispiel #7
0
        static StackObject *Invoke_0(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.Sprite @obj = (UnityEngine.Sprite) typeof(UnityEngine.Sprite).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 0);
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            System.Action <UnityEngine.Sprite> instance_of_this_method = (System.Action <UnityEngine.Sprite>) typeof(System.Action <UnityEngine.Sprite>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 8);
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.Invoke(@obj);

            return(__ret);
        }
        int UnityEngineSprite_m_OverridePhysicsShape(RealStatePtr L, int gen_param_count)
        {
            ObjectTranslator translator = this;


            UnityEngine.Sprite gen_to_be_invoked = (UnityEngine.Sprite)translator.FastGetCSObj(L, 1);


            {
                System.Collections.Generic.IList <UnityEngine.Vector2[]> _physicsShapes = (System.Collections.Generic.IList <UnityEngine.Vector2[]>)translator.GetObject(L, 2, typeof(System.Collections.Generic.IList <UnityEngine.Vector2[]>));

                gen_to_be_invoked.OverridePhysicsShape(_physicsShapes);



                return(0);
            }
        }
Beispiel #9
0
        static StackObject *set_sprite_0(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.Sprite @value = (UnityEngine.Sprite) typeof(UnityEngine.Sprite).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UnityEngine.UI.Image instance_of_this_method = (UnityEngine.UI.Image) typeof(UnityEngine.UI.Image).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.sprite = value;

            return(__ret);
        }
Beispiel #10
0
        public IEnumerator GetAndSetImageSprite()
        {
            if (IsLoadingImage)
            {
                yield break;
            }

            IsLoadingImage = true;
            UnityEngine.Sprite newSprite = null;
            yield return(UnityExtensionMethods.RunOutputCoroutine <UnityEngine.Sprite>(
                             UnityExtensionMethods.CreateAndOutputSpriteFromImageFile(ImageFilePath, ImageWebUrl)
                             , output => newSprite = output));

            if (newSprite != null)
            {
                ImageSprite = newSprite;
            }
            IsLoadingImage = false;
        }
        int UnityEngineSprite_m_OverrideGeometry(RealStatePtr L, int gen_param_count)
        {
            ObjectTranslator translator = this;


            UnityEngine.Sprite gen_to_be_invoked = (UnityEngine.Sprite)translator.FastGetCSObj(L, 1);


            {
                UnityEngine.Vector2[] _vertices = (UnityEngine.Vector2[])translator.GetObject(L, 2, typeof(UnityEngine.Vector2[]));
                ushort[] _triangles             = (ushort[])translator.GetObject(L, 3, typeof(ushort[]));

                gen_to_be_invoked.OverrideGeometry(_vertices, _triangles);



                return(0);
            }
        }
        static StackObject *GetPhysicsShapePointCount_17(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Int32 @shapeIdx = ptr_of_this_method->Value;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UnityEngine.Sprite instance_of_this_method = (UnityEngine.Sprite) typeof(UnityEngine.Sprite).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = instance_of_this_method.GetPhysicsShapePointCount(@shapeIdx);

            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value      = result_of_this_method;
            return(__ret + 1);
        }
        int UnityEngineSprite_m_GetPhysicsShapePointCount(RealStatePtr L, int gen_param_count)
        {
            ObjectTranslator translator = this;


            UnityEngine.Sprite gen_to_be_invoked = (UnityEngine.Sprite)translator.FastGetCSObj(L, 1);


            {
                int _shapeIdx = LuaAPI.xlua_tointeger(L, 2);

                int gen_ret = gen_to_be_invoked.GetPhysicsShapePointCount(_shapeIdx);
                LuaAPI.xlua_pushinteger(L, gen_ret);



                return(1);
            }
        }
        int UnityEngineSprite_m_GetPhysicsShape(RealStatePtr L, int gen_param_count)
        {
            ObjectTranslator translator = this;


            UnityEngine.Sprite gen_to_be_invoked = (UnityEngine.Sprite)translator.FastGetCSObj(L, 1);


            {
                int _shapeIdx = LuaAPI.xlua_tointeger(L, 2);
                System.Collections.Generic.List <UnityEngine.Vector2> _physicsShape = (System.Collections.Generic.List <UnityEngine.Vector2>)translator.GetObject(L, 3, typeof(System.Collections.Generic.List <UnityEngine.Vector2>));

                int gen_ret = gen_to_be_invoked.GetPhysicsShape(_shapeIdx, _physicsShape);
                LuaAPI.xlua_pushinteger(L, gen_ret);



                return(1);
            }
        }
        static StackObject *set_disabledSprite_5(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.Sprite value = (UnityEngine.Sprite) typeof(UnityEngine.Sprite).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);
            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method);
            UnityEngine.UI.SpriteState instance_of_this_method;
            instance_of_this_method = (UnityEngine.UI.SpriteState) typeof(UnityEngine.UI.SpriteState).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));

            instance_of_this_method.disabledSprite = value;

            WriteBackInstance(__domain, ptr_of_this_method, __mStack, ref instance_of_this_method);

            return(__ret);
        }
        static StackObject *CanBindTo_3(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.Sprite @sprite = (UnityEngine.Sprite) typeof(UnityEngine.Sprite).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UnityEngine.U2D.SpriteAtlas instance_of_this_method = (UnityEngine.U2D.SpriteAtlas) typeof(UnityEngine.U2D.SpriteAtlas).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = instance_of_this_method.CanBindTo(@sprite);

            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value      = result_of_this_method ? 1 : 0;
            return(__ret + 1);
        }
        static int _m_GetOuterUV_xlua_st_(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



            try {
                {
                    UnityEngine.Sprite sprite = (UnityEngine.Sprite)translator.GetObject(L, 1, typeof(UnityEngine.Sprite));

                    UnityEngine.Vector4 __cl_gen_ret = UnityEngine.Sprites.DataUtility.GetOuterUV(sprite);
                    translator.PushUnityEngineVector4(L, __cl_gen_ret);



                    return(1);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
        static int _m_GetSprite(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            Engine.ISprite __cl_gen_to_be_invoked = (Engine.ISprite)translator.FastGetCSObj(L, 1);


            try {
                {
                    UnityEngine.Sprite __cl_gen_ret = __cl_gen_to_be_invoked.GetSprite(  );
                    translator.Push(L, __cl_gen_ret);



                    return(1);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
Beispiel #19
0
        static int _m_GetPhysicsShapeCount(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            UnityEngine.Sprite __cl_gen_to_be_invoked = (UnityEngine.Sprite)translator.FastGetCSObj(L, 1);


            try {
                {
                    int __cl_gen_ret = __cl_gen_to_be_invoked.GetPhysicsShapeCount(  );
                    LuaAPI.xlua_pushinteger(L, __cl_gen_ret);



                    return(1);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
Beispiel #20
0
        public void __Gen_Delegate_Imp17(UnityEngine.Sprite p0)
        {
#if THREAD_SAFE || HOTFIX_ENABLE
            lock (luaEnv.luaEnvLock)
            {
#endif
            RealStatePtr L = luaEnv.rawL;
            int errFunc    = LuaAPI.pcall_prepare(L, errorFuncRef, luaReference);
            ObjectTranslator translator = luaEnv.translator;
            translator.Push(L, p0);

            PCall(L, 1, 0, errFunc);



            LuaAPI.lua_settop(L, errFunc - 1);

#if THREAD_SAFE || HOTFIX_ENABLE
        }
#endif
        }
        static int _m_TextureToSprite_xlua_st_(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



                {
                    UnityEngine.Texture _texture = (UnityEngine.Texture)translator.GetObject(L, 1, typeof(UnityEngine.Texture));

                    UnityEngine.Sprite gen_ret = BabyEngine.Utility.TextureToSprite(_texture);
                    translator.Push(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Beispiel #22
0
        static StackObject *Invoke_0(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 3);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.Sprite @arg2 = (UnityEngine.Sprite) typeof(UnityEngine.Sprite).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            System.Int32 @arg1 = ptr_of_this_method->Value;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
            System.Action <System.Int32, UnityEngine.Sprite> instance_of_this_method = (System.Action <System.Int32, UnityEngine.Sprite>) typeof(System.Action <System.Int32, UnityEngine.Sprite>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.Invoke(@arg1, @arg2);

            return(__ret);
        }
        static int _m_LoadSpriteByBaseWindow_xlua_st_(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



            try {
                {
                    xc.ui.ugui.UIBaseWindow win = (xc.ui.ugui.UIBaseWindow)translator.GetObject(L, 1, typeof(xc.ui.ugui.UIBaseWindow));
                    string spriteName           = LuaAPI.lua_tostring(L, 2);

                    UnityEngine.Sprite __cl_gen_ret = xc.ui.ugui.UIHelper.LoadSpriteByBaseWindow(win, spriteName);
                    translator.Push(L, __cl_gen_ret);



                    return(1);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
        static StackObject *OverrideGeometry_20(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 3);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.UInt16[] @triangles = (System.UInt16[]) typeof(System.UInt16[]).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UnityEngine.Vector2[] @vertices = (UnityEngine.Vector2[]) typeof(UnityEngine.Vector2[]).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
            UnityEngine.Sprite instance_of_this_method = (UnityEngine.Sprite) typeof(UnityEngine.Sprite).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.OverrideGeometry(@vertices, @triangles);

            return(__ret);
        }
Beispiel #25
0
        static int _m_OverridePhysicsShape(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            UnityEngine.Sprite __cl_gen_to_be_invoked = (UnityEngine.Sprite)translator.FastGetCSObj(L, 1);


            try {
                {
                    System.Collections.Generic.IList <UnityEngine.Vector2[]> physicsShapes = (System.Collections.Generic.IList <UnityEngine.Vector2[]>)translator.GetObject(L, 2, typeof(System.Collections.Generic.IList <UnityEngine.Vector2[]>));

                    __cl_gen_to_be_invoked.OverridePhysicsShape(physicsShapes);



                    return(0);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
Beispiel #26
0
 // Construct that the JSON serializer uses to build achievement database
 public Achievement(int id, string title, UnityEngine.Sprite icon, int value, string description, int neededValue, bool displayAsPercentage, int points, bool secret, string iconPath = "")
 {
     this.id       = id;
     this.title    = title;
     this.iconPath = iconPath;
     if (iconPath != "")
     {
         this.icon = UnityEngine.Resources.Load <UnityEngine.Sprite>(iconPath);
     }
     else
     {
         this.icon = icon;
     }
     UnityEngine.Debug.Log(iconPath);
     this.value               = value;
     this.description         = description;
     this.neededValue         = neededValue;
     this.displayAsPercentage = displayAsPercentage;
     this.points              = points;
     this.completed           = value >= neededValue;
     this.secret              = secret;
 }
        static StackObject *SetResult_5(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.Sprite @ret = (UnityEngine.Sprite) typeof(UnityEngine.Sprite).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method);
            ETModel.ETAsyncTaskMethodBuilder <UnityEngine.Sprite> instance_of_this_method = (ETModel.ETAsyncTaskMethodBuilder <UnityEngine.Sprite>) typeof(ETModel.ETAsyncTaskMethodBuilder <UnityEngine.Sprite>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));

            instance_of_this_method.SetResult(@ret);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            WriteBackInstance(__domain, ptr_of_this_method, __mStack, ref instance_of_this_method);

            __intp.Free(ptr_of_this_method);
            return(__ret);
        }
Beispiel #28
0
        static int _m_SetHandBookBorder(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            xc.ui.UIHandBookItemSlot __cl_gen_to_be_invoked = (xc.ui.UIHandBookItemSlot)translator.FastGetCSObj(L, 1);


            try {
                {
                    UnityEngine.Sprite border = (UnityEngine.Sprite)translator.GetObject(L, 2, typeof(UnityEngine.Sprite));

                    __cl_gen_to_be_invoked.SetHandBookBorder(border);



                    return(0);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
        static int _m_SetSprite(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                JW.Framework.UGUI.UIHttpImage __cl_gen_to_be_invoked = (JW.Framework.UGUI.UIHttpImage)translator.FastGetCSObj(L, 1);



                {
                    UnityEngine.Sprite ss = (UnityEngine.Sprite)translator.GetObject(L, 2, typeof(UnityEngine.Sprite));

                    __cl_gen_to_be_invoked.SetSprite(ss);



                    return(0);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
        static int _m_OverrideGeometry(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            UnityEngine.Sprite __cl_gen_to_be_invoked = (UnityEngine.Sprite)translator.FastGetCSObj(L, 1);


            try {
                {
                    UnityEngine.Vector2[] vertices = (UnityEngine.Vector2[])translator.GetObject(L, 2, typeof(UnityEngine.Vector2[]));
                    ushort[] triangles             = (ushort[])translator.GetObject(L, 3, typeof(ushort[]));

                    __cl_gen_to_be_invoked.OverrideGeometry(vertices, triangles);



                    return(0);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
Beispiel #31
0
 public BlocSpriteDescription(BlocColor color, UnityEngine.Sprite sprite)
 {
     this.Color = color;
     this.Sprite = sprite;
 }