public virtual void Restore(IRestoreData restoreData) { var data = restoreData as CompositeSpriteControllerBaseRestoreData; data.transformRestoreData.Restore(transform); color = data.color; RenderQueueOverrider.Ensure(gameObject).renderQueue = data.renderQueue; SetPose(data.currentImageName, false); }
static int LateUpdate(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); Nova.RenderQueueOverrider obj = (Nova.RenderQueueOverrider)ToLua.CheckObject <Nova.RenderQueueOverrider>(L, 1); obj.LateUpdate(); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int Ensure(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); UnityEngine.GameObject arg0 = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject)); Nova.RenderQueueOverrider o = Nova.RenderQueueOverrider.Ensure(arg0); ToLua.Push(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
public virtual void Restore(IRestoreData restoreData) { var data = restoreData as CompositeSpriteControllerBaseRestoreData; data.transformRestoreData.Restore(transform); color = data.color; if (spriteRenderer != null) { // Material must be RestorableMaterial or DefaultMaterial if (data.materialRestoreData != null) { MaterialFactory factory = MaterialPoolComponent.Ensure(gameObject).factory; spriteRenderer.material = RestorableMaterial.RestoreMaterialFromData(data.materialRestoreData, factory); } else { spriteRenderer.material = MaterialPoolComponent.Ensure(gameObject).defaultMaterial; } } RenderQueueOverrider.Ensure(gameObject).renderQueue = data.renderQueue; if (data.currentImageName == currentImageName) { return; } if (!string.IsNullOrEmpty(data.currentImageName)) { string[] parts = StringToPoseArray(data.currentImageName); if (parts.Length == 1) { SetImage(data.currentImageName, fade: false); } else { SetPose(parts, fade: false); } } else { ClearImage(fade: false); } }
static int set_renderQueue(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); Nova.RenderQueueOverrider obj = (Nova.RenderQueueOverrider)o; int arg0 = (int)LuaDLL.luaL_checknumber(L, 2); obj.renderQueue = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index renderQueue on a nil value")); } }
static int get_renderQueue(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); Nova.RenderQueueOverrider obj = (Nova.RenderQueueOverrider)o; int ret = obj.renderQueue; LuaDLL.lua_pushinteger(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index renderQueue on a nil value")); } }
public virtual IRestoreData GetRestoreData() { // Material must be RestorableMaterial or DefaultMaterial MaterialRestoreData materialRestoreData; if (spriteRenderer != null && spriteRenderer.sharedMaterial is RestorableMaterial) { materialRestoreData = RestorableMaterial.GetRestoreData(spriteRenderer.sharedMaterial); } else { materialRestoreData = null; } int renderQueue = RenderQueueOverrider.Ensure(gameObject).renderQueue; return(new CompositeSpriteControllerBaseRestoreData(currentImageName, transform, color, materialRestoreData, renderQueue)); }
public virtual IRestoreData GetRestoreData() { int renderQueue = RenderQueueOverrider.Ensure(gameObject).renderQueue; return(new CompositeSpriteControllerBaseRestoreData(currentImageName, transform, color, renderQueue)); }