Exemple #1
0
        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);
                }
            }
        }