static public int GetModifiedMaterial(IntPtr l) { try { #if DEBUG var method = System.Reflection.MethodBase.GetCurrentMethod(); string methodName = GetMethodName(method); #if UNITY_5_5_OR_NEWER UnityEngine.Profiling.Profiler.BeginSample(methodName); #else Profiler.BeginSample(methodName); #endif #endif UnityEngine.UI.MaskableGraphic self = (UnityEngine.UI.MaskableGraphic)checkSelf(l); UnityEngine.Material a1; checkType(l, 2, out a1); var ret = self.GetModifiedMaterial(a1); pushValue(l, true); pushValue(l, ret); return(2); } catch (Exception e) { return(error(l, e)); } #if DEBUG finally { #if UNITY_5_5_OR_NEWER UnityEngine.Profiling.Profiler.EndSample(); #else Profiler.EndSample(); #endif } #endif }
static public int SetClipRect(IntPtr l) { try { #if DEBUG var method = System.Reflection.MethodBase.GetCurrentMethod(); string methodName = GetMethodName(method); #if UNITY_5_5_OR_NEWER UnityEngine.Profiling.Profiler.BeginSample(methodName); #else Profiler.BeginSample(methodName); #endif #endif UnityEngine.UI.MaskableGraphic self = (UnityEngine.UI.MaskableGraphic)checkSelf(l); UnityEngine.Rect a1; checkValueType(l, 2, out a1); System.Boolean a2; checkType(l, 3, out a2); self.SetClipRect(a1, a2); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } #if DEBUG finally { #if UNITY_5_5_OR_NEWER UnityEngine.Profiling.Profiler.EndSample(); #else Profiler.EndSample(); #endif } #endif }
static public int get_onCullStateChanged(IntPtr l) { try { #if DEBUG var method = System.Reflection.MethodBase.GetCurrentMethod(); string methodName = GetMethodName(method); #if UNITY_5_5_OR_NEWER UnityEngine.Profiling.Profiler.BeginSample(methodName); #else Profiler.BeginSample(methodName); #endif #endif UnityEngine.UI.MaskableGraphic self = (UnityEngine.UI.MaskableGraphic)checkSelf(l); pushValue(l, true); pushValue(l, self.onCullStateChanged); return(2); } catch (Exception e) { return(error(l, e)); } #if DEBUG finally { #if UNITY_5_5_OR_NEWER UnityEngine.Profiling.Profiler.EndSample(); #else Profiler.EndSample(); #endif } #endif }
static public int set_isMaskingGraphic(IntPtr l) { try { #if DEBUG var method = System.Reflection.MethodBase.GetCurrentMethod(); string methodName = GetMethodName(method); #if UNITY_5_5_OR_NEWER UnityEngine.Profiling.Profiler.BeginSample(methodName); #else Profiler.BeginSample(methodName); #endif #endif UnityEngine.UI.MaskableGraphic self = (UnityEngine.UI.MaskableGraphic)checkSelf(l); bool v; checkType(l, 2, out v); self.isMaskingGraphic = v; pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } #if DEBUG finally { #if UNITY_5_5_OR_NEWER UnityEngine.Profiling.Profiler.EndSample(); #else Profiler.EndSample(); #endif } #endif }
static int RecalculateMasking(IntPtr L) { LuaScriptMgr.CheckArgsCount(L, 1); UnityEngine.UI.MaskableGraphic obj = (UnityEngine.UI.MaskableGraphic)LuaScriptMgr.GetUnityObjectSelf(L, 1, "UnityEngine.UI.MaskableGraphic"); obj.RecalculateMasking(); return(0); }
static int RecalculateMasking(IntPtr L) { L.ChkArgsCount(1); UnityEngine.UI.MaskableGraphic obj = (UnityEngine.UI.MaskableGraphic)L.ChkUnityObjectSelf(1, "UnityEngine.UI.MaskableGraphic"); obj.RecalculateMasking(); return(0); }
static public int set_material(IntPtr l) { UnityEngine.UI.MaskableGraphic o = (UnityEngine.UI.MaskableGraphic)checkSelf(l); UnityEngine.Material v; checkType(l, 2, out v); o.material = v; return(0); }
public void setAlpha(float alpha) { if(graphic==null) { graphic = GetComponent<MaskableGraphic>(); } graphic.canvasRenderer.SetAlpha(alpha); }
void Cache () { mCached = true; mMaskableGraphic = GetComponent<MaskableGraphic>(); Renderer ren = gameObject.GetComponent<Renderer>(); if (ren != null) mMat = ren.material; mLight = gameObject.GetComponent<Light>(); if (mMaskableGraphic == null && mMat == null && mLight == null) mMaskableGraphic = GetComponentInChildren<MaskableGraphic>(); }
static int SetClipRect(IntPtr L) { LuaScriptMgr.CheckArgsCount(L, 3); UnityEngine.UI.MaskableGraphic obj = (UnityEngine.UI.MaskableGraphic)LuaScriptMgr.GetUnityObjectSelf(L, 1, "UnityEngine.UI.MaskableGraphic"); Rect arg0 = (Rect)LuaScriptMgr.GetNetObject(L, 2, typeof(Rect)); bool arg1 = LuaScriptMgr.GetBoolean(L, 3); obj.SetClipRect(arg0, arg1); return(0); }
static int GetModifiedMaterial(IntPtr L) { LuaScriptMgr.CheckArgsCount(L, 2); UnityEngine.UI.MaskableGraphic obj = (UnityEngine.UI.MaskableGraphic)LuaScriptMgr.GetUnityObjectSelf(L, 1, "UnityEngine.UI.MaskableGraphic"); Material arg0 = (Material)LuaScriptMgr.GetUnityObject(L, 2, typeof(Material)); Material o = obj.GetModifiedMaterial(arg0); LuaScriptMgr.Push(L, o); return(1); }
static int GetModifiedMaterial(IntPtr L) { L.ChkArgsCount(2); UnityEngine.UI.MaskableGraphic obj = (UnityEngine.UI.MaskableGraphic)L.ChkUnityObjectSelf(1, "UnityEngine.UI.MaskableGraphic"); Material arg0 = (Material)L.ChkUnityObject(2, typeof(Material)); Material o = obj.GetModifiedMaterial(arg0); L.PushLightUserData(o); return(1); }
static int SetClipRect(IntPtr L) { L.ChkArgsCount(3); UnityEngine.UI.MaskableGraphic obj = (UnityEngine.UI.MaskableGraphic)L.ChkUnityObjectSelf(1, "UnityEngine.UI.MaskableGraphic"); Rect arg0 = (Rect)L.ChkUserData(2, typeof(Rect)); var arg1 = L.ChkBoolean(3); obj.SetClipRect(arg0, arg1); return(0); }
void show() { graphic = GetComponent<MaskableGraphic>(); if(graphic) { gameObject.SetActive(true); setAlpha(0); graphic.CrossFadeAlpha(showAlpha,duration,false); } }
static public int RecalculateMasking(IntPtr l) { try { UnityEngine.UI.MaskableGraphic self = (UnityEngine.UI.MaskableGraphic)checkSelf(l); self.RecalculateMasking(); return(0); } catch (Exception e) { return(error(l, e)); } }
static public int get_onCullStateChanged(IntPtr l) { try { UnityEngine.UI.MaskableGraphic self = (UnityEngine.UI.MaskableGraphic)checkSelf(l); pushValue(l, self.onCullStateChanged); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int get_maskable(IntPtr l) { try { UnityEngine.UI.MaskableGraphic self = (UnityEngine.UI.MaskableGraphic)checkSelf(l); pushValue(l, true); pushValue(l, self.maskable); return(2); } catch (Exception e) { return(error(l, e)); } }
static public int ParentMaskStateChanged(IntPtr l) { try { UnityEngine.UI.MaskableGraphic self = (UnityEngine.UI.MaskableGraphic)checkSelf(l); self.ParentMaskStateChanged(); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int SetMaterialDirty(IntPtr l) { try { UnityEngine.UI.MaskableGraphic self = (UnityEngine.UI.MaskableGraphic)checkSelf(l); self.SetMaterialDirty(); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int get_material(IntPtr l) { try { UnityEngine.UI.MaskableGraphic self = (UnityEngine.UI.MaskableGraphic)checkSelf(l); pushValue(l, self.material); return(1); } catch (Exception e) { LuaDLL.luaL_error(l, e.ToString()); return(0); } }
static public int SetMaterialDirty(IntPtr l) { try { UnityEngine.UI.MaskableGraphic self = (UnityEngine.UI.MaskableGraphic)checkSelf(l); self.SetMaterialDirty(); return(0); } catch (Exception e) { LuaDLL.luaL_error(l, e.ToString()); return(0); } }
static public int ParentMaskStateChanged(IntPtr l) { try { UnityEngine.UI.MaskableGraphic self = (UnityEngine.UI.MaskableGraphic)checkSelf(l); self.ParentMaskStateChanged(); return(0); } catch (Exception e) { LuaDLL.luaL_error(l, e.ToString()); return(0); } }
public static void SetSkin(this UnityEngine.UI.MaskableGraphic graphic, string skinCode) { var comp = graphic.GetComponent <UiSkinner>(); if (comp == null) { comp = graphic.gameObject.AddComponent <UiSkinner>(); } comp.SkinCode = skinCode; comp.Update(); }
static public int set_onCullStateChanged(IntPtr l) { try { UnityEngine.UI.MaskableGraphic self = (UnityEngine.UI.MaskableGraphic)checkSelf(l); UnityEngine.UI.MaskableGraphic.CullStateChangedEvent v; checkType(l, 2, out v); self.onCullStateChanged = v; return(0); } catch (Exception e) { return(error(l, e)); } }
static int QPYX_RecalculateMasking_YXQP(IntPtr L_YXQP) { try { ToLua.CheckArgsCount(L_YXQP, 1); UnityEngine.UI.MaskableGraphic QPYX_obj_YXQP = (UnityEngine.UI.MaskableGraphic)ToLua.CheckObject <UnityEngine.UI.MaskableGraphic>(L_YXQP, 1); QPYX_obj_YXQP.RecalculateMasking(); return(0); } catch (Exception e_YXQP) { return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP)); } }
static public int set_maskable(IntPtr l) { try { UnityEngine.UI.MaskableGraphic self = (UnityEngine.UI.MaskableGraphic)checkSelf(l); bool v; checkType(l, 2, out v); self.maskable = v; return(0); } catch (Exception e) { return(error(l, e)); } }
static public int set_material(IntPtr l) { try { UnityEngine.UI.MaskableGraphic self = (UnityEngine.UI.MaskableGraphic)checkSelf(l); UnityEngine.Material v; checkType(l, 2, out v); self.material = v; return(0); } catch (Exception e) { LuaDLL.luaL_error(l, e.ToString()); return(0); } }
static public int GetModifiedMaterial(IntPtr l) { try { UnityEngine.UI.MaskableGraphic self = (UnityEngine.UI.MaskableGraphic)checkSelf(l); UnityEngine.Material a1; checkType(l, 2, out a1); var ret = self.GetModifiedMaterial(a1); pushValue(l, ret); return(1); } catch (Exception e) { return(error(l, e)); } }
static int RecalculateMasking(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); UnityEngine.UI.MaskableGraphic obj = (UnityEngine.UI.MaskableGraphic)ToLua.CheckObject <UnityEngine.UI.MaskableGraphic>(L, 1); obj.RecalculateMasking(); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static public int set_material(IntPtr l) { try { UnityEngine.UI.MaskableGraphic self = (UnityEngine.UI.MaskableGraphic)checkSelf(l); UnityEngine.Material v; checkType(l, 2, out v); self.material = v; pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static int SetMaterialDirty(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); UnityEngine.UI.MaskableGraphic obj = (UnityEngine.UI.MaskableGraphic)ToLua.CheckObject(L, 1, typeof(UnityEngine.UI.MaskableGraphic)); obj.SetMaterialDirty(); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static public int SetClipRect(IntPtr l) { try { UnityEngine.UI.MaskableGraphic self = (UnityEngine.UI.MaskableGraphic)checkSelf(l); UnityEngine.Rect a1; checkValueType(l, 2, out a1); System.Boolean a2; checkType(l, 3, out a2); self.SetClipRect(a1, a2); return(0); } catch (Exception e) { return(error(l, e)); } }
static int QPYX_GetModifiedMaterial_YXQP(IntPtr L_YXQP) { try { ToLua.CheckArgsCount(L_YXQP, 2); UnityEngine.UI.MaskableGraphic QPYX_obj_YXQP = (UnityEngine.UI.MaskableGraphic)ToLua.CheckObject <UnityEngine.UI.MaskableGraphic>(L_YXQP, 1); UnityEngine.Material QPYX_arg0_YXQP = (UnityEngine.Material)ToLua.CheckObject <UnityEngine.Material>(L_YXQP, 2); UnityEngine.Material QPYX_o_YXQP = QPYX_obj_YXQP.GetModifiedMaterial(QPYX_arg0_YXQP); ToLua.Push(L_YXQP, QPYX_o_YXQP); return(1); } catch (Exception e_YXQP) { return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP)); } }
protected virtual void ApplyNewValue(MaskableGraphic graphic, bool newValue) { if(childsToIgonre.Any()) Debug.LogError(graphic.transform.parent.name); graphic.material = newValue ? _grayScaleMat : null; NguiUtils.SetSelectableEnabled (transform, !newValue, childsToIgonre); }
public void show(float duration) { graphic = GetComponent<MaskableGraphic>(); this.duration = duration; show(); }
// Use this for initialization void Awake() { graphic = GetComponent<MaskableGraphic>(); //setAlpha(0); }
// Update is called once per frame void Update () { remainingTime = remainingTime - Time.deltaTime; if (index < notification.Length && remainingTime < notification[index].time) { timer_sound.Play(); if (notification[index].imageIndex >= 0 && notification[index].imageIndex < timerImage.Length){ Image image = timerImage[notification[index].imageIndex]; timerUIObject = image.gameObject; fadeGraphic = image; tcol = Color.white; }else{ timerUIObject = timerText.gameObject; fadeGraphic = timerText; tcol = textColor; timerText.text = notification[index].text; } tcol.a = 1; fadeoutTimer = notification[index].fadeTime; timerUIObject.transform.localScale = new Vector3(1,1,1); fadeGraphic.color = tcol; index++; } if (fadeoutTimer > 0) { float scaleFactor = (Time.deltaTime / fadeoutTimer); tcol.a = tcol.a - (scaleFactor); timerUIObject.transform.localScale += new Vector3(scaleFactor, scaleFactor, 0); fadeGraphic.color = tcol; if (tcol.a <= 0) { tcol.a = 0; fadeoutTimer = 0; timerUIObject.transform.localScale = new Vector3(1,1,1); } fadeGraphic.color = tcol; } if (remainingTime <= gameStartCount && gameStarted == false){ GameStart(); } if (remainingTime < 0 && gameOver == false){ GameOver(); } // when enough time has passed, switch scene if (remainingTime < -3){ GoToScene.goToResult(stageNum); //GoToScene.sceneTransition("GameOver"); Destroy(this); } CustomizedSettingsForScene(); }
void UISetdisplay(MaskableGraphic obj, float posX, float posY, float sizeX, float sizeY) { RectTransform rectTransform = obj.transform as RectTransform; rectTransform.sizeDelta = new Vector2(sizeX, sizeY); rectTransform.position = new Vector3(posX, posY, 0f); }
private IEnumerator LerpUIColor(MaskableGraphic graphic, float alphaStart, float alphaFinish, float time) { float elapsedTime = 0; Color startColor = graphic.color, endColor = graphic.color; startColor.a = alphaStart; endColor.a = alphaFinish; graphic.color = startColor; while (elapsedTime < time) { graphic.color = Color.Lerp(startColor, endColor, (elapsedTime / time)); elapsedTime += Time.deltaTime; yield return 0; } graphic.color = endColor; }
//gets an array of the children that are tutorial images in the gameobject private MaskableGraphic[] GetChildrenTutorialComponents() { List<int> indexes = new List<int>(); int currentIndex = 0; foreach (MaskableGraphic image in GetComponentsInChildren<MaskableGraphic>()) { currentIndex++; if (image.gameObject.name.Contains(TutorialComponentName)) { indexes.Add (currentIndex); } } currentIndex = 0; int arrayIndex = 0; MaskableGraphic[] components = new MaskableGraphic[indexes.Count]; foreach (MaskableGraphic image in GetComponentsInChildren<MaskableGraphic>()) { currentIndex++; if (indexes.Contains(currentIndex)) { components[arrayIndex++] = image; } } return components; }