void OnMatchMakingMatchCompleted(Fresvii.AppSteroid.Models.Match match)
    {
        if (completeMatch == null)
        {
            completeMatch = match;
        }
        else if (completeMatch.Id == match.Id)
        {
            return;
        }
        else
        {
            completeMatch = match;
        }

        if (!(Application.platform == RuntimePlatform.Android || Application.platform == RuntimePlatform.IPhonePlayer))
        {
            Application.LoadLevel(loadSceneNameOnMatchCompleted);
        }
        else
        {
            Fresvii.AppSteroid.Util.DialogManager.Instance.SetLabel("Yes", "No", "Close");

            Fresvii.AppSteroid.Util.DialogManager.Instance.ShowSelectDialog("Match completed! Sample Game?", delegate(bool del)
            {
                if (del)
                {
                    Application.LoadLevel(loadSceneNameOnMatchCompleted);
                }
            });
        }
    }
        // Use this for initialization
        void Start()
        {
            currentMatch = FASMatchMaking.currentMatch;

            int largeLength = Mathf.Max(Screen.height, Screen.width);

            lineHeight = largeLength / 12;

            guiSkin.label.fontSize = (int)(lineHeight / 3);

            guiSkin.button.fontSize = (int)(lineHeight / 3);

            guiSkin.button.fixedHeight = lineHeight;

            guiSkin.button.fixedHeight = Screen.width / 5;

            guiSkin.textArea.fontSize = (int)(lineHeight / 3);

            guiSkin.textField.fontSize = (int)(lineHeight / 3);

            guiSkin.textField.fixedHeight = lineHeight;

            StartCoroutine(PollingGetGameContext());
        }
Ejemplo n.º 3
0
        // Use this for initialization
        void Start()
        {
            currentMatch = FASMatchMaking.currentMatch;

            mode = Mode.Game;

            if (piecies != null)
            {
                Destroy(piecies);
            }

            piecies = new GameObject("Pieces");

            board = new Players[3][];

            for (int i = 0; i < 3; i++)
            {
                board[i] = new Players[3];
            }

            for (int x = 0; x < 3; x++)
                for (int y = 0; y < 3; y++)
                    board[x][y] = Players.None;

            gameCount = 0;

            ChangeTurn();

            if (!polling)
                StartCoroutine(PollingGetGameContext());

            tmPlayer1.text = currentMatch.Players[0].User.Name + ((currentMatch.Players[0].User.Id == FAS.CurrentUser.Id) ? " (You)" : "");

            tmPlayer2.text = currentMatch.Players[1].User.Name + ((currentMatch.Players[1].User.Id == FAS.CurrentUser.Id) ? " (You)" : "");
        }
        // Use this for initialization
        void Start()
        {
            currentMatch = FASMatchMaking.currentMatch;

            Debug.Log("Match " + currentMatch.Id);

            if (currentMatch.Players[0].User.Id == FAS.CurrentUser.Id)
            {
                Debug.Log("#### This is Server ####");

                logText.text += "\n#### This is Server ####\n";

                LaunchServer();
            }
            else
            {
                Debug.Log("#### This is Client ####");

                logText.text += "\n#### This is Client ####\n";
            }

            StartCoroutine("PollingGetGameContext");
        }