Exemple #1
0
        private void OnExtensionResponse(BaseEvent evt)
        {
            lock (lockOfReceiveExtensionQueue)
            {
                Debug.Log("OnExtensionResponse");

                string     cmd        = (string)evt.Params["cmd"];
                ISFSObject respParams = (SFSObject)evt.Params["params"];

                Debug.Log("Current cmd:" + cmd);

                if (CMD_GP_GAME.Equals(cmd))
                {
                    Debug.Log("RespMsg: " + respParams.GetText("data"));
                }
                else if (CMD_GP_OTHER.Equals(cmd))
                {
                    Debug.Log("RespMsg: other test");
                }


                receiveExtensionQueue.Enqueue(respParams.GetText("data"));

                // ----------------------------------------------------------------------------------------------
                // 房間變數測試
                // ----------------------------------------------------------------------------------------------
                //RoomVariable rv = sfs.getLastJoinedRoom().getVariable("CandylandRoomSubject");
                //if (rv != null && !rv.isNull())
                //	logger.info("CandylandRoomSubject: " + rv.getValue().toString());
                //// ----------------------------------------------------------------------------------------------

                //this.gameDealing();
            }
        }
Exemple #2
0
    private void OnExtensionResponse(BaseEvent e)
    {
        print((string)e.Params[CONST.CMD]);

        ISFSObject sfso = (SFSObject)e.Params[CONST.CMD_PARAMS];

        if ((string)e.Params[CONST.CMD] == "trigger")
        {
            if (sfso.ContainsKey("idTransformer"))
            {
                Vector3    pos = new Vector3(sfso.GetFloat("x"), sfso.GetFloat("y"), sfso.GetFloat("z"));
                Quaternion rot = new Quaternion(sfso.GetFloat("rx"), sfso.GetFloat("ry"), sfso.GetFloat("rz"), sfso.GetFloat("rw"));

                SetPosVacuna(sfso.GetInt("idTransformer"), sfso.GetInt("idCont"), pos, rot);
            }
            else if (sfso.ContainsKey("emoji"))
            {
                remoteInterpolations[sfso.GetText("username")].GetComponentInChildren <RemoteSpriteViewerEmoji>().Show(sfso.GetInt("emoji"));
            }
            else if (sfso.ContainsKey("poster"))
            {
                remoteInterpolations[sfso.GetText("username")].GetComponentInChildren <RemoteSpriteViewerPoster>().Show(sfso.GetInt("poster") - 1);
            }
            else if (sfso.ContainsKey("tele"))
            {
                secuencia.ParcialComplete();
            }
            else if (sfso.ContainsKey("screenshot"))
            {
                screenshotBtn.RemoteScreenshot();
            }
        }
    }
Exemple #3
0
    private void addCardToField(ISFSObject card)
    {
        GameObject cardGo = Instantiate(CardPref, PlayerField, false);

        fieldTMPInst.Add(cardGo);

        CardStruct tmpCard = new CardStruct(card.GetText("Name"),
                                            card.GetText("Description"),
                                            "Sprites/Cards/" + card.GetText("ImageId"),
                                            card.GetInt("Cost"),
                                            10, card.GetText("Type"),
                                            card.GetInt("Money"), card.GetInt("Action"), card.GetInt("Buy"));

        cardGo.GetComponent <CardInfo>().ShowCardInfo(tmpCard);
    }