Ejemplo n.º 1
0
        public static void LoadFileLimitedPostfix(ChaFileControl __instance)
        {
            if (KK_FBIOpenUp._isenabled)
            {
                if (KK_FBIOpenUp.nowGameMode == KK_FBIOpenUp.GameMode.Studio)
                {
                    ChaControl chaCtrl = Singleton <Manager.Character> .Instance.dictEntryChara.Where((x) => x.Value.chaFile == __instance).Single().Value;

                    if (null != chaCtrl)
                    {
                        Patches.ChangeChara(chaCtrl);
                    }
                }
                else
                {
                    Patches.ChangeChara(Singleton <CustomBase> .Instance.chaCtrl);
                }
            }
        }
Ejemplo n.º 2
0
        private static void StepLightAndPlay()
        {
            if (intensityState && reflectCount < 60)
            {
                switch (KK_FBIOpenUp.nowGameMode)
                {
                case KK_FBIOpenUp.GameMode.Studio:
                    studioLightInfo.intensity += (intensityTo - intensityFrom) / 60;
                    studioLightCalc.Invoke("Reflect");
                    break;

                case KK_FBIOpenUp.GameMode.FreeH:
                    freeHLight.intensity += (intensityTo - intensityFrom) / 60;
                    break;

                case KK_FBIOpenUp.GameMode.Maker:
                    makerLight.intensity += (intensityTo - intensityFrom) / 60;
                    break;
                }
                reflectCount++;
            }
            else
            {
                Logger.LogDebug($"At Step: {step}");
                switch (step)
                {
                case 0:
                    //消滅圖片
                    if (null != shiftPicture.Transform.parent.gameObject)
                    {
                        GameObject.Destroy(shiftPicture.Transform.parent.gameObject);
                        shiftPicture.image = null;
                        shiftPicture.video = null;
                        shiftPicture       = null;
                    }
                    break;

                case 1:
                    //由中間移動到左邊
                    shiftPicture.targetPosition = new Vector3(0 - (shiftPicture.Width / 2), Screen.height / 2);
                    stepSet(0);
                    break;

                case 2:
                    //由中間移動到右邊
                    shiftPicture.targetPosition = new Vector3(Screen.width + shiftPicture.Width / 2, Screen.height / 2);
                    stepSet(0);
                    break;

                case 10:
                    //將角色全部替換
                    //加亮角色光
                    reflectCount = 0;
                    ToggleFlashLight(true);
                    stepAdd();
                    break;

                case 11:
                    intensityState = false;
                    Patches.ChangeAllCharacters(false);
                    reflectCount = 0;
                    ToggleFlashLight(false);
                    stepAdd();
                    break;

                case 12:
                    intensityState = false;
                    if (!ChangeWithoutShiftPicture)
                    {
                        stepSet(1);
                    }
                    else
                    {
                        ChangeWithoutShiftPicture = false;
                        stepSet(0);
                    }
                    break;

                case 20:
                    //將角色換回
                    //加亮角色光
                    reflectCount = 0;
                    ToggleFlashLight(true);
                    stepAdd();
                    break;

                case 21:
                    intensityState = false;
                    Patches.ChangeAllCharacters(true);
                    reflectCount = 0;
                    ToggleFlashLight(false);
                    stepAdd();
                    break;

                case 22:
                    intensityState = false;
                    if (!ChangeWithoutShiftPicture)
                    {
                        stepSet(2);
                    }
                    else
                    {
                        ChangeWithoutShiftPicture = false;
                        stepSet(0);
                    }
                    break;
                }
                void stepAdd()
                {
                    step++;
                }

                void stepSet(int st)
                {
                    step = st;
                }
            }
        }