Exemplo n.º 1
0
        public override bool UpdateGame()
        {
            if (_AvatarsChanged)
            {
                _LoadAvatars(true);
            }

            if (_ProfilesChanged)
            {
                _LoadProfiles(true);
            }

            if (_SelectSlides[_SelectSlideProfiles].Selection > -1)
            {
                _Buttons[_ButtonPlayerName].Text.Text = CProfiles.GetPlayerName(_SelectSlides[_SelectSlideProfiles].SelectedTag);
                if (_EditMode == EEditMode.PlayerName)
                {
                    _Buttons[_ButtonPlayerName].Text.Text += "|";
                }

                _SelectSlides[_SelectSlideDifficulty].Selection = (int)CProfiles.GetDifficulty(_SelectSlides[_SelectSlideProfiles].SelectedTag);
                _SelectSlides[_SelectSlideUserRole].Selection   = (int)CProfiles.GetUserRoleProfile(_SelectSlides[_SelectSlideProfiles].SelectedTag);
                _SelectSlides[_SelectSlideActive].Selection     = (int)CProfiles.GetActive(_SelectSlides[_SelectSlideProfiles].SelectedTag);

                int avatarID = CProfiles.GetAvatarID(_SelectSlides[_SelectSlideProfiles].SelectedTag);
                _SelectSlides[_SelectSlideAvatars].SelectedTag = avatarID;
                if (_Snapshot == null)
                {
                    if (CWebcam.IsCapturing())
                    {
                        if (CWebcam.GetFrame(ref _WebcamTexture))
                        {
                            _Statics[_StaticAvatar].Texture = _WebcamTexture;
                        }
                    }
                    else
                    {
                        _Statics[_StaticAvatar].Texture = CProfiles.GetAvatarTexture(avatarID);
                    }
                }
            }

            return(true);
        }