コード例 #1
0
ファイル: Client.cs プロジェクト: Ponsukeee/Vcom
        public static async void LeaveRoom()
        {
            try
            {
                await gameClient.LeaveAsync();

                Notification.Notify("ルームを退室しました");
            }
            catch (Exception e)
            {
                Notification.Notify("ルーム退室に失敗しました");
                Debug.LogError(e);
                throw;
            }
        }
コード例 #2
0
ファイル: Client.cs プロジェクト: Ponsukeee/Vcom
        public static async Task Signin(string email, string password)
        {
            try
            {
                User = await User.SigninAsync(restHN, email, password);
                await SetUpAvatar();
                await JoinRoom();

                Notification.Notify($"ようこそ{User.Name}様");
            }
            catch (Exception e)
            {
                Notification.Notify("サインインに失敗しました");
                Debug.LogError(e);
                throw;
            }
        }
コード例 #3
0
ファイル: Client.cs プロジェクト: Ponsukeee/Vcom
        public static async void CreateUser(string name, string email, string password, string passwordConfirmation)
        {
            try
            {
                User = await User.CreateAsync(restHN, name, email, password, passwordConfirmation);
                await SetUpAvatar();
                await JoinRoom();

                Notification.Notify($"{User.Name}様のアカウントを作成しました");
            }
            catch (Exception e)
            {
                Notification.Notify("サインアップに失敗しました");
                Debug.LogError(e);
                throw;
            }
        }
コード例 #4
0
ファイル: Client.cs プロジェクト: Ponsukeee/Vcom
        public static async void UploadVrm()
        {
            if (User == null)
            {
                return;
            }
            if (Avatar.AvatarData != null)
            {
                try
                {
                    await User.UploadVrmAsync(Avatar.AvatarData);

                    Notification.Notify("アバターをアップロードしました");
                }
                catch (Exception e)
                {
                    Notification.Notify("アップロードに失敗しました");
                    Debug.LogError(e);
                    throw;
                }
            }
        }