コード例 #1
0
        public void DrawSpriteWithFiltering(int layer, string texture, string mask, int x, int y, int style, int priority, float wait, bool isBlocking)
        {
            Layer layer2 = GetLayer(layer);

            UpdateLayerMask(layer2, priority);
            layer2.DrawLayerWithMask(texture, mask, x, y, null, /*isBustshot:*/ false, style, wait, isBlocking);
            layer2.SetPriority(priority);
        }
コード例 #2
0
        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)
        {
            Layer i = GetLayer(layer);

            while (i.FadingOut)
            {
                i.HideLayer();
                i = 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);
            }
            i.DrawLayerWithMask(textureName, mask, oldx, oldy, origin, /*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);
                }
            });
        }