Bounce.LevelEditor.Editor.verifyInvariants C# (CSharp) Метод

verifyInvariants() приватный Метод

The start of the invariant checking process.
private verifyInvariants ( bool displayIfOK ) : void
displayIfOK bool Whether or not to display a message if no invariants are broken. True /// means display.
Результат void
        private void verifyInvariants(bool displayIfOK)
        {
            string errors = "";

            if (currentState != State.NO_EDITS)
            {
                if (currentState == State.EDITING_WORLD && world.player == null)
                {
                    errors += "There is no player in the world! The game will not run without a player. \n\n";
                }

                //Check for badly linked doors.
                errors += verifyDoors();

                //Display the errors if they exist
                if (errors != "")
                {
                    showMessage("Invariants broken!", errors);

                }
                else if (displayIfOK)
                {
                    showMessage("No broken invariants!", "No broken invariants!");
                }
            }
        }