/// <summary>
            /// Initializes a new instance of the <see cref="DialogScreen"/> class.
            /// </summary>
            /// <param name="dialog">The dialog that owns this screen.</param>
            /// <param name="globalContent">The screen's global content manager.</param>
            public DialogScreen(EscMenuDialog dialog, ContentManager globalContent)
                : base("Content/UI/Dialogs/EscMenuDialog", "EscMenuDialog", globalContent)
            {
                Contract.Require(dialog, "dialog");

                View.SetViewModel(new DialogScreenVM(dialog));
            }
            /// <summary>
            /// Initializes a new instance of the <see cref="DialogScreen"/> class.
            /// </summary>
            /// <param name="dialog">The dialog that owns this screen.</param>
            /// <param name="globalContent">The screen's global content manager.</param>
            public DialogScreen(EscMenuDialog dialog, ContentManager globalContent)
                : base("Content/UI/Dialogs/EscMenuDialog", "EscMenuDialog", globalContent)
            {
                Contract.Require(dialog, nameof(dialog));

                this.dialog = dialog;
            }
            /// <summary>
            /// Initializes a new instance of the <see cref="DialogScreen"/> class.
            /// </summary>
            /// <param name="dialog">The dialog that owns this screen.</param>
            /// <param name="globalContent">The screen's global content manager.</param>
            public DialogScreen(EscMenuDialog dialog, ContentManager globalContent)
                : base("Content/UI/Dialogs/EscMenuDialog", "EscMenuDialog", globalContent)
            {
                Contract.Require(dialog, nameof(dialog));

                this.dialog = dialog;
            }
        /// <summary>
        /// Initializes a new instance of the <see cref="GamePlayViewModel"/> class.
        /// </summary>
        /// <param name="owner">The <see cref="GameMenuScreen"/> that owns this view model.</param>
        /// <param name="escMenuDialog">The escape menu dialog box used by this screen.</param>
        public GamePlayViewModel(GamePlayScreen owner, EscMenuDialog escMenuDialog)
        {
            Contract.Require(owner, "owner");

            this.owner = owner;
            this.escMenuDialog = escMenuDialog;

            this.V1Color = Color.Red;
            this.V2Color = Color.Lime;
            this.V3Color = Color.Blue;
        }
            /// <summary>
            /// Initializes a new instance of the <see cref="DialogScreenVM"/> class.
            /// </summary>
            /// <param name="dialog">The dialog box that owns the screen.</param>
            internal DialogScreenVM(EscMenuDialog dialog)
            {
                Contract.Require(dialog, "dialog");

                this.dialog = dialog;
            }
Beispiel #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GamePlayScreen"/> class.
 /// </summary>
 /// <param name="globalContent">The content manager with which to load globally-available assets.</param>
 /// <param name="uiScreenService">The screen service which created this screen.</param>
 public GamePlayScreen(ContentManager globalContent, UIScreenService uiScreenService)
     : base("Content/UI/Screens/GamePlayScreen", "GamePlayScreen", globalContent, uiScreenService)
 {
     this.escMenuDialog = new EscMenuDialog(this);
 }