Exemple #1
0
        private static void UpdateText()
        {
            string closest = ClosestTargetInfo();

            if (HasFlag(tasState, TASState.Enable))
            {
                currentInputLine = player.ToString() + " RNG(" + FixedRandom.FixedUpdateIndex + ")";
                nextInputLine    = player.NextInput() + (string.IsNullOrEmpty(closest) ? "" : "  [" + closest + "]");
            }
            else
            {
                currentInputLine = string.Empty;
                nextInputLine    = (string.IsNullOrEmpty(closest) ? "" : "[" + closest + "]");
            }
        }
Exemple #2
0
        public static void DrawText()
        {
            if (style == null)
            {
                style                  = new GUIStyle(DebugMenuB.DebugMenuStyle);
                style.fontStyle        = FontStyle.Bold;
                style.alignment        = TextAnchor.MiddleLeft;
                style.normal.textColor = Color.white;
            }
            if (HasFlag(tasState, TASState.Enable))
            {
                style.fontSize = (int)Mathf.Round(22f);
                string msg  = player.ToString();
                string next = player.NextInput();
                if (next.Trim() != string.Empty)
                {
                    msg += "   Next: " + next;
                }
                msg += "   FPS: " + frameRate;
                float  height = 30f;
                string extra  = string.Empty;
                if (Game.Characters.Sein != null)
                {
                    SeinCharacter sein = Game.Characters.Sein;
                    extra = (sein.IsOnGround ? "OnGround" : "InAir") + (sein.PlatformBehaviour.PlatformMovement.IsOnWall ? " OnWall" : "") + (sein.PlatformBehaviour.PlatformMovement.Falling ? " Falling" : "") + (sein.PlatformBehaviour.PlatformMovement.Jumping ? " Jumping" : "") + (sein.Abilities.Jump.CanJump ? " CanJump" : "") + (GameController.Instance.InputLocked ? " InputLocked" : "");
                    int seinsTime = GetSeinsTime();
                    extra += GetCurrentTime() == seinsTime && seinsTime > 0 ? " Saved" : "";
                }
                if (GameController.Instance.IsLoadingGame || InstantLoadScenesController.Instance.IsLoading || GameController.FreezeFixedUpdate)
                {
                    extra += " Loading";
                }
                msg += " RNG: " + FixedRandom.FixedUpdateIndex;
                msg += extra.Length > 0 ? " (" + extra.Trim() + ")" : "";

                GUI.Label(new Rect(0f, 0f, Screen.width, height), msg, style);
            }
        }