Beispiel #1
0
        public ViewModelWindowCharacterStyleCustomization()
        {
            if (!IsDesignTime)
            {
                throw new Exception("Use another constructor in the game.");
            }

            this.faceStyleCustomizerMale    = new ViewModelFaceStyleCustomizer();
            this.currentFaceStyleCustomizer = this.faceStyleCustomizerFemale;
        }
Beispiel #2
0
        public ViewModelWindowCharacterStyleCustomization(GameWindow gameWindow)
        {
            this.gameWindow = gameWindow;

            this.CommandSave   = new ActionCommand(this.ExecuteCommandSave);
            this.CommandCancel = new ActionCommand(this.ExecuteCommandCancel);
            this.CommandRandom = new ActionCommand(this.ExecuteCommandRandom);

            this.faceStyleCustomizerMale   = new ViewModelFaceStyleCustomizer(isMale: true, onStyleSet: this.OnStyleSet);
            this.faceStyleCustomizerFemale =
                new ViewModelFaceStyleCustomizer(isMale: false,
                                                 onStyleSet: this.OnStyleSet);

            var currentPlayerCharacter = Client.Characters.CurrentPlayerCharacter;
            var publicState            = PlayerCharacter.GetPublicState(currentPlayerCharacter);

            this.isMale = publicState.IsMale;

            this.currentFaceStyleCustomizer = this.isMale
                                                  ? this.faceStyleCustomizerMale
                                                  : this.faceStyleCustomizerFemale;

            this.currentFaceStyleCustomizer.CurrentStyle = publicState.FaceStyle;
        }