public void DrawBustshot(int layer, string textureName, int x, int y, int z, int oldx, int oldy, int oldz, bool move, int priority, int type, float wait, bool isblocking) { Layer i = GetLayer(layer); while (i.FadingOut) { i.HideLayer(); i = GetLayer(layer); } if (!move) { oldx = x; oldy = y; oldz = z; } i.DrawLayer(textureName, oldx, oldy, oldz, null, 1f, /*isBustshot:*/ true, type, wait, isblocking); i.SetPriority(priority); if (move) { i.MoveLayer(x, y, z, 1f, 0, wait, isblocking, adjustAlpha: false); } iTween.Stop(i.gameObject); gameSystem.RegisterAction(delegate { if (i.UsingCrossShader() && i.gameObject.layer != GetActiveLayerMask()) { SetLayerActiveOnBothScenes(i); } else { UpdateLayerMask(i, priority); } }); }
public void MODDrawBustshot(int layer, string textureName, Texture2D tex2d, int x, int y, int z, int oldx, int oldy, int oldz, bool move, int priority, int type, float wait, bool isblocking) { Layer layer2 = GetLayer(layer); while (layer2.FadingOut) { layer2.HideLayer(); layer2 = GetLayer(layer); } if (!move) { oldx = x; oldy = y; oldz = z; } layer2.MODDrawLayer(textureName, tex2d, oldx, oldy, oldz, null, 1f, /*isBustshot:*/ true, type, wait, isblocking); layer2.SetPriority(priority); if (move) { layer2.MoveLayer(x, y, z, 1f, 0, wait, isblocking, adjustAlpha: false); } iTween.Stop(layer2.gameObject); if (Mathf.Approximately(wait, 0f)) { layer2.FinishFade(); } else { layer2.FadeInLayer(wait); if (isblocking) { GameSystem.Instance.AddWait(new Wait(wait, WaitTypes.WaitForMove, layer2.FinishFade)); } if (layer2.UsingCrossShader() && layer2.gameObject.layer != GetActiveLayerMask()) { SetLayerActiveOnBothScenes(layer2); } else { UpdateLayerMask(layer2, priority); } } }
public void DrawBustshotWithFiltering(int layer, string textureName, string mask, int x, int y, int z, int originx, int originy, int oldx, int oldy, int oldz, bool move, int priority, int type, float wait, bool isblocking) { gameSystem.RegisterAction(delegate { Layer layer2 = GetLayer(layer); while (layer2.FadingOut) { layer2.HideLayer(); layer2 = GetLayer(layer); } if (!move) { oldx = x; oldy = y; oldz = z; } Vector2?origin = null; if (originx != 0 || originy != 0) { origin = new Vector2((float)originx, (float)originy); } layer2.DrawLayerWithMask(textureName, mask, oldx, oldy, origin, /*isBustshot:*/ true, type, wait, isblocking); layer2.SetPriority(priority); if (move) { layer2.MoveLayer(x, y, z, 1f, 0, wait, isblocking, adjustAlpha: false); } iTween.Stop(layer2.gameObject); if (layer2.UsingCrossShader() && layer2.gameObject.layer != GetActiveLayerMask()) { SetLayerActiveOnBothScenes(layer2); } else { UpdateLayerMask(layer2, priority); } gameSystem.ExecuteActions(); }); }