Пример #1
0
        private async void Update()
        {
            if (!isStartGame)
            {
                // ゲーム開始前
                switch (phase)
                {
                case 0:
                case 1:
                    if (IsOk.All(b => b))
                    {
                        var ev = new ReadyEvent(PlayerNum);
                        tcpClient.Send(ev);
                        for (var i = 0; i < IsOk.Length; i++)
                        {
                            IsOk[i] = false;
                        }
                    }

                    break;

                case 2:
                    StartGame();
                    Debug.Log(PlayerNum.ToString());
                    break;
                }

                return;
            }

            await MoveToNextFrame();
        }
Пример #2
0
        public Test3ViewModel(Test3Entity test3)
        {
            Model = test3;

            if (test3 == null)
            {
                return;
            }
            Id      = test3.Id;
            Test2Id = test3.Test2Id;
            Name    = test3
                      .ToReactivePropertyAsSynchronized(x => x.Name, ignoreValidationErrorValue: true)
                      .SetValidateAttribute(() => this.Name)
                      .AddTo(CompositeDisposable);

            SendEnabled = test3
                          .ToReactivePropertyAsSynchronized(x => x.SendEnabled, ignoreValidationErrorValue: false)
                          .AddTo(CompositeDisposable);
            IsOk = test3
                   .ToReactivePropertyAsSynchronized(x => x.IsOk, ignoreValidationErrorValue: true)
                   .AddTo(CompositeDisposable);

            IsOk.Subscribe(x => { Console.WriteLine("IsOk @ VM : " + x); });
        }
Пример #3
0
    public string Register(string name, string lastName, string userName, string email, int pass, string dateOfBirth, int age, string adress)
    {
        IsOk output = DbServices.Register(name, lastName, userName, email, pass, dateOfBirth, age, adress);

        return(new JavaScriptSerializer().Serialize(output));
    }