Пример #1
0
        public void PlaybackPlayer()
        {
            if (inputIndex < inputs.Count)
            {
                bool changed = false;
                if (!GameController.Instance.IsLoadingGame && !InstantLoadScenesController.Instance.IsLoading && !GameController.FreezeFixedUpdate)
                {
                    if (currentFrame == 0)
                    {
                        SeinUI.DebugHideUI = false;
                    }
                    changed = currentFrame == 0;
                    if (currentFrame >= frameToNext)
                    {
                        if (inputIndex + 1 >= inputs.Count)
                        {
                            inputIndex++;
                            return;
                        }
                        lastInput    = inputs[++inputIndex];
                        frameToNext += lastInput.Frames;
                        changed      = true;
                    }

                    currentFrame++;
                }
                FixedRandom.SetFixedUpdateIndex(fixedRandom + currentFrame);
                lastInput.UpdateInput(changed);
            }
        }
Пример #2
0
        public void PlaybackPlayer()
        {
            if (inputIndex < inputs.Count)
            {
                bool    changed    = false;
                Vector2 currentPos = Characters.Sein == null ? Core.Scenes.Manager.CurrentCameraTargetPosition : new Vector2(Characters.Sein.Position.x, Characters.Sein.Position.y);
                if (!InstantLoadScenesController.Instance.IsLoading && (!GameController.Instance.IsLoadingGame || (lastInput != null && lastInput.Restore)) && !Core.Scenes.Manager.PositionInsideSceneStillLoading(currentPos))
                {
                    if (currentFrame == 0)
                    {
                        LastMouseX         = 0;
                        LastMouseY         = 0;
                        SeinUI.DebugHideUI = false;
                    }
                    changed = currentFrame == 0;

                    if (currentFrame >= frameToNext)
                    {
                        if (inputIndex + 1 >= inputs.Count)
                        {
                            inputIndex++;
                            return;
                        }
                        lastInput    = inputs[++inputIndex];
                        frameToNext += lastInput.Frames;
                        changed      = true;
                    }

                    currentFrame++;

                    if (lastInput.Random >= 0 && changed)
                    {
                        fixedRandom = lastInput.Random - currentFrame + 1;
                    }
                    FixedRandom.SetFixedUpdateIndex(fixedRandom + currentFrame);
                    lastInput.UpdateInput(changed);

                    if (lastInput.SkillTree >= 0)
                    {
                        SkillTreeAlpha = lastInput.SkillTree;
                    }

                    if (currentFrame >= frameToNext && inputIndex + 1 < inputs.Count)
                    {
                        TASInput nextInput = inputs[inputIndex + 1];
                        if (nextInput.Line > Break && Break > 0)
                        {
                            Break       = -Break;
                            FastForward = false;
                        }
                    }
                }
                if (inputs[inputIndex].SpamAction)
                {
                    Core.Input.ActionButtonA.Update(!Core.Input.ActionButtonA.IsPressed);
                    Core.Input.AnyStart.Update(!Core.Input.AnyStart.IsPressed);
                }
                gameFrame++;
            }
        }