Example #1
0
        public GameInvitationViewModel(InvitationEvent invitation)
        {
            _model   = GameAccess.Instance.GetGameInfo(invitation.HashId);
            GameName = _model.Name;
            Password = invitation.Password;
            var _player = ProfileAccess.Instance.GetUserInfoPlease(invitation.InviterId);

            InviterName = _player.Username;
        }
Example #2
0
        private void Invite()
        {
            if (!InvitationWasSent)
            {
                var invitation = new InvitationEvent()
                {
                    HashId          = GameId,
                    Password        = Password,
                    InvitedPlayerId = Player.HashId,
                    InviterId       = Profile.Instance.CurrentProfile.UserHashId
                };
                EventManager.Instance.Notice(invitation);

                InvitationWasSent = true;
            }
        }