Exemplo n.º 1
0
        public void MoveSprite(int layer, int x, int y, int z, int angle, int easetype, float alpha, float wait, bool isblocking)
        {
            Layer layer2 = GetLayer(layer);

            layer2.MoveLayer(x, y, z, alpha, easetype, wait, isblocking, adjustAlpha: true);
            layer2.SetAngle((float)angle, wait);
        }
Exemplo n.º 2
0
        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);
                }
            });
        }
Exemplo n.º 3
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);
                }
            }
        }
Exemplo n.º 4
0
        public void MoveBustshot(int layer, string textureName, int x, int y, int z, float wait, bool isblocking)
        {
            Layer layer2 = GetLayer(layer);
            int   x2     = (int)layer2.transform.localPosition.x;
            int   y2     = (int)layer2.transform.localPosition.y;
            int   z2     = (int)layer2.transform.localPosition.z;

            if (Mathf.Approximately(wait, 0f))
            {
                x2 = x;
                y2 = y;
                z2 = z;
            }
            if (textureName != string.Empty)
            {
                layer2.DrawLayer(textureName, x2, y2, z2, null, 1f, /*isBustshot:*/ true, 0, wait, isBlocking: false);
            }
            layer2.MoveLayer(x, y, z, 1f, 0, wait, isblocking, adjustAlpha: true);
        }
Exemplo n.º 5
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)
 {
     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();
     });
 }