예제 #1
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);
                }
            });
        }
예제 #2
0
        public void DrawSceneWithMask(string backgroundfilename, string maskname, float time)
        {
            SwapActiveScenes();
            Scene s = GetActiveScene();

            s.UpdateRange(0f);
            s.BackgroundLayer.ReleaseTextures();
            s.BackgroundLayer.DrawLayer(backgroundfilename, 0, 0, 0, null, 0f, /*isBustshot:*/ false, 0, 0f, /*isBlocking:*/ false);
            s.SetTransitionMask(maskname);
            faceLayer.HideLayer();
            gameSystem.RegisterAction(delegate
            {
                s.StartTransition(time);
                s.BackgroundLayer.SetRange(1f);
                gameSystem.AddWait(new Wait(time, WaitTypes.WaitForScene, s.StopFadeIn));
            });
        }
예제 #3
0
        public void FadeBustshotWithFiltering(int layer, string mask, int style, float wait, bool isblocking)
        {
            Layer layer2 = GetLayer(layer);

            while (layer2.FadingOut)
            {
                layer2.HideLayer();
                layer2 = GetLayer(layer);
            }
            layer2.FadeLayerWithMask(mask, style, wait, isblocking);
            gameSystem.RegisterAction(delegate
            {
            });
        }
예제 #4
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);
                }
            }
        }
예제 #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();
     });
 }