/// <summary> /// 图片置灰(go上要绑定GreyMaterialComponent组件) /// </summary> /// <returns></returns> public void SetGrey(GameObject go, bool grey) { GreyMaterialComponent greyComponent = go.GetComponent <GreyMaterialComponent>(); if (greyComponent != null) { greyComponent.IsGrey = grey; } }
static int _g_get_IsGrey(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); try { GreyMaterialComponent __cl_gen_to_be_invoked = (GreyMaterialComponent)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushboolean(L, __cl_gen_to_be_invoked.IsGrey); } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } return(1); }
public void SetGrey(bool isGrey) { if (mImage == null) { return; } if (mGrey == null) { mGrey = mImage.GetComponent <GreyMaterialComponent>(); if (mGrey == null) { mGrey = mImage.AddComponent <GreyMaterialComponent>(); } } mGrey.IsGrey = isGrey; }
static int __CreateInstance(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); try { if (LuaAPI.lua_gettop(L) == 1) { GreyMaterialComponent __cl_gen_ret = new GreyMaterialComponent(); 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 GreyMaterialComponent constructor!")); }
static int _m_Awake(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); GreyMaterialComponent __cl_gen_to_be_invoked = (GreyMaterialComponent)translator.FastGetCSObj(L, 1); try { { __cl_gen_to_be_invoked.Awake( ); return(0); } } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } }
public void FreshLockIcon(LockIcon lockIcon) { if (lockIcon == null) { return; } if (lockIcon.SystemId == 0) { return; } bool isOpenSystem = SysConfigManager.GetInstance().CheckSysHasOpened(lockIcon.SystemId); if (lockIcon.RealObj != null) { lockIcon.RealObj.gameObject.SetActive(isOpenSystem == false); } if (lockIcon.TargetImage != null) { if (lockIcon.Model == LockIcon.State.USE_COLOR) { if (isOpenSystem) { lockIcon.TargetImage.color = Color.white; } else { lockIcon.TargetImage.color = lockIcon.ExpectColor; } } else { GreyMaterialComponent greyComponent = lockIcon.GreyComponent as GreyMaterialComponent; if (greyComponent == null) { greyComponent = lockIcon.TargetImage.gameObject.AddComponent <GreyMaterialComponent>(); lockIcon.GreyComponent = greyComponent; } greyComponent.IsGrey = isOpenSystem == false; } } }