Beispiel #1
0
    // Use this for initialization
    void Start()
    {
        WarpClient.initialize("ad7a9695fd69c0d124977e2753fa6d3ae73a25d006e16d2192ed3548a220d11f", "b7b5f6797bc48d54628c14b98089ef64a3592deec4df49df7e19a5ac7a47c8de");
        ServiceApi = new ServiceAPI("ad7a9695fd69c0d124977e2753fa6d3ae73a25d006e16d2192ed3548a220d11f", "b7b5f6797bc48d54628c14b98089ef64a3592deec4df49df7e19a5ac7a47c8de");

        listener = GetComponent <MultiplayerListener>();
        WarpClient.GetInstance().AddConnectionRequestListener(listener);
        WarpClient.GetInstance().AddChatRequestListener(listener);
        WarpClient.GetInstance().AddLobbyRequestListener(listener);
        WarpClient.GetInstance().AddNotificationListener(listener);
        WarpClient.GetInstance().AddRoomRequestListener(listener);
        WarpClient.GetInstance().AddUpdateRequestListener(listener);
        WarpClient.GetInstance().AddZoneRequestListener(listener);

        UserManagement.InitializeUserManagement();

        StaticPlayer = NonStaticPlayer;
    }
Beispiel #2
0
    public void Release()
    {
        GameObject scriptWrapper = GameObject.FindGameObjectWithTag("SCRIPTWRAPPER");

        if (scriptWrapper != null && !released)
        {
            released = true;
            MonoPlayer        player        = scriptWrapper.GetComponent <MonoPlayer>();
            MonoNetworkPlayer networkPlayer = scriptWrapper.GetComponent <MonoNetworkPlayer>();
            if (transform.position.y > player.splitter.transform.position.y)
            {
                //  CARD PLAYED
                this.transform.position      = new Vector3(transform.position.x, transform.position.y, 1f);
                player.playerDeck.playedCard = this;

                PlayedCardsController.PlaceCard(transform);
                UserInteraction.InputActive = false;

                // FINALLY ACTUALLY PLAY THE CARD
                if (Properties.ActiveGameType == GameType.SinglePlayer)
                {
                    player.getInternalPlayer().PlayCard(this.card);
                }
                else
                {
                    networkPlayer.GetInternalPlayer().PlayCard(this.card);
                }

                released = false;
            }
            else
            {
                ResetPosition(false);
            }
        }
    }
 public LocalNetworkPlayer(GameTable gameTable, MonoNetworkPlayer player)
     : base(gameTable, player)
 {
     unityPlayer = player;
 }