当前位置: 首页>>代码示例>>C#>>正文


C# SFSObject.PutBool方法代码示例

本文整理汇总了C#中SFSObject.PutBool方法的典型用法代码示例。如果您正苦于以下问题:C# SFSObject.PutBool方法的具体用法?C# SFSObject.PutBool怎么用?C# SFSObject.PutBool使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SFSObject的用法示例。


在下文中一共展示了SFSObject.PutBool方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: InviaAnimazioneControllerClick

 public static void InviaAnimazioneControllerClick(int userId, float forward, bool attacco1, bool attacco2)
 {
     SFSObject objOut = new SFSObject();
     objOut.PutFloat("f", forward);
     objOut.PutBool("a1", attacco1);
     objOut.PutBool("a2", attacco2);
     me.sfs.Send(new ExtensionRequest("SanC", objOut, me.sfs.LastJoinedRoom));
 }
开发者ID:LucaGames,项目名称:ClassPrjUnit4-5,代码行数:8,代码来源:ManagerNetwork.cs

示例2: InviaAnimazioneControllerTast

 public static void InviaAnimazioneControllerTast(int userId, float forward, float turn,bool onGround , float jump , float jumpLeg,bool attacco1,bool attacco2)
 {
     SFSObject objOut = new SFSObject();
     objOut.PutFloat("f", forward);
     objOut.PutFloat("t", turn);
     objOut.PutBool("o", onGround);
     objOut.PutFloat("j", jump);
     objOut.PutFloat("jL", jumpLeg);
     objOut.PutBool("a1", attacco1);
     objOut.PutBool("a2", attacco2);
     me.sfs.Send(new ExtensionRequest("SanT", objOut,me. sfs.LastJoinedRoom));
 }
开发者ID:LucaGames,项目名称:ClassPrjUnit4-5,代码行数:12,代码来源:ManagerNetwork.cs

示例3: Update

    void Update()
    {
        if (!theUI.GetchatTBFocus())
        {
            if (Input.GetKeyDown(KeyCode.W))
            {
                this.MecAnim.SetBool(RUN_ANIMATION, true);
                ISFSObject ObjectIn = new SFSObject();
                ObjectIn.PutFloatArray("Location", ourLPC.GetLocation());
                ObjectIn.PutBool("IsMoving", true);
                SFServer.Send(new ExtensionRequest("PositionUpdate", ObjectIn));

                // First rotation
                this.PlayerRB.transform.Rotate(0, crosshairTransform.localRotation.eulerAngles.y, 0);
                crosshairTransform.localRotation = Quaternion.Euler(crosshairTransform.localEulerAngles.x, 0, crosshairTransform.localEulerAngles.z);
                crosshairTransform.localPosition = new Vector3(1f, 2.5f, 1.0f);
                ObjectIn = new SFSObject();
                ObjectIn.PutFloat("Rotation", ourLPC.GetRotation());
                SFServer.Send(new ExtensionRequest("RotationUpdate", ObjectIn));
            }
            if (Input.GetKeyUp(KeyCode.W))
            {
                this.MecAnim.SetBool(RUN_ANIMATION, false);
                ISFSObject ObjectIn = new SFSObject();
                ObjectIn.PutFloatArray("Location", ourLPC.GetLocation());
                ObjectIn.PutBool("IsMoving", false);
                SFServer.Send(new ExtensionRequest("PositionUpdate", ObjectIn));
            }

            if (Input.GetKey(KeyCode.W))
            {
                CameraController cameraControllerObj = (CameraController)Camera.main.GetComponent("CameraController");
                cameraControllerObj.setCursorVisible(false);
                this.PlayerRB.MovePosition(transform.position + (transform.forward * Time.deltaTime * PlayerSpeed));
            }

            if (Input.GetKey(KeyCode.W) && Input.GetAxis("Mouse X") != 0)
            {
                // Take Cross Hair's rotate, and reset crosshair
                this.PlayerRB.transform.Rotate(0, crosshairTransform.localRotation.eulerAngles.y, 0);
                crosshairTransform.localRotation = Quaternion.Euler(crosshairTransform.localEulerAngles.x, 0, crosshairTransform.localEulerAngles.z);
                crosshairTransform.localPosition = new Vector3(1f, 2.5f, 1.0f);

                ISFSObject ObjectIn = new SFSObject();
                ObjectIn.PutFloat("Rotation", ourLPC.GetRotation());
                SFServer.Send(new ExtensionRequest("RotationUpdate", ObjectIn));
            }
            if (Input.GetKeyDown(KeyCode.F))
            {
                if (ourLPC.getPlayerAction() != null)
                {
                    ourLPC.getPlayerAction().performAction(GameObject.Find("SceneScriptsObject"));
                }
            }
        }
    }
开发者ID:Gabe-Biele,项目名称:Project-Circleage,代码行数:56,代码来源:InputController.cs

示例4: deathDelay

 IEnumerator deathDelay()
 {
     yield return new WaitForSeconds(2);
     _dead = false;
     GetComponentInChildren<SkinnedMeshRenderer>().enabled = true;
     SendMessage("MakeIdle", SendMessageOptions.DontRequireReceiver);
     transform.position = startingTransform;
     var obj = new SFSObject();
     obj.PutUtfString("type", "respawned");
     obj.PutBool("isBlue", _isBlueTeam);
     smartFox.Send(new ObjectMessageRequest(obj));
 }
开发者ID:Daminvar,项目名称:Scatterblocks,代码行数:12,代码来源:PlayerNetwork.cs

示例5: GameLobbyWindow


//.........这里部分代码省略.........
        GUILayout.BeginArea(new Rect(chatBoxLeft+5, chatBoxTop, chatBoxWidth - 20, chatBoxHeight));
        GUILayout.Space(screenHeight / 24);

        //Side Scroller
        GUILayoutOption[] param = { GUILayout.Width(chatBoxWidth - 20), GUILayout.Height(chatBoxHeight - 25) };
        chatScrollPosition = GUILayout.BeginScrollView(chatScrollPosition, false, true, param);

        // Populate chat with messages
        GUILayout.BeginVertical();
        // We use lock here to ensure cross-thread safety on the messages collection
        lock (messagesLocker)
            foreach (string message in chatMessages)
                GUILayout.Label(message);

        GUILayout.EndScrollView();
        GUILayout.EndVertical();
        GUILayout.EndArea();

        // Send message
        newMessage = GUI.TextField(new Rect(chatBoxLeft+1, chatBoxTop+chatBoxHeight+5, chatBoxWidth-110, 20), newMessage, 50);
        if (GUI.Button(new Rect(chatBoxLeft + chatBoxWidth - 105, chatBoxTop+chatBoxHeight+4, 105, 22), "Send") || (Event.current.type == EventType.keyDown && Event.current.character == '\n')){
            processChatMessage(newMessage);
            newMessage = "";
        }

        //GUI.Label (new Rect(chatBoxLeft+1,chatBoxTop+chatBoxHeight+25, chatBoxWidth-110,20),"[/help][/h] shows chat commands");

        //**************//
        //   User list  //
        //**************//
        GUI.Box(new Rect(userListLeft, userListTop, userListWidth, userListHeight), "Users", "box");
        GUILayout.BeginArea(new Rect(userListLeft+5, userListTop, userListWidth-20,userListHeight-25));

        GUILayout.Space(screenHeight / 24);

        //Side Scroller
        GUILayoutOption[] paramUserList = { GUILayout.Width(chatBoxWidth - 20), GUILayout.Height(chatBoxHeight - 25) };
        userScrollPosition = GUILayout.BeginScrollView(userScrollPosition, false, true, paramUserList);
        GUILayout.BeginVertical ();

        List<User> userList = currentActiveRoom.UserList;

        foreach (User user in userList)
        {
            GUILayout.Label(user.Name);
        }

        GUILayout.EndVertical ();
        GUILayout.EndScrollView ();
        GUILayout.EndArea ();

        //**************//
        //  Buddy list  //
        //**************//

        GUI.Box(new Rect(buddyListLeft, buddyListTop, buddyListWidth, buddyListHeight), "Buddy List", "box");
        GUILayout.BeginArea(new Rect(buddyListLeft+5, buddyListTop, buddyListWidth-20, buddyListHeight-25));

        GUILayout.Space(screenHeight / 24);

        if (buddies.Count > 0) {
            GUILayoutOption[] paramBuddyList = { GUILayout.Width(buddyListWidth - 20), GUILayout.Height(buddyListHeight - 25) };
            buddiesScrollPosition = GUILayout.BeginScrollView(buddiesScrollPosition, false, true, paramBuddyList);
            //int buddiesNumber = buddies.Count;

            int j=0;
            foreach(Buddy buddy in buddies)
            {
                string online = buddy.IsOnline?" Online":" Offline";

                GUI.Label(new Rect(0, j*20, buddyListWidth-40, 20),buddy.Name+":"+online);
                j++;
            }

            GUILayout.EndScrollView();

        } else
            GUILayout.Label("No buddies");

        GUILayout.EndArea();

        if (GUI.Button(new Rect(userListLeft, buddyListTop+buddyListHeight+4, (userListWidth-10)/3, 22), "Back"))
            ExitGameLobby();

        if (GUI.Button(new Rect(userListLeft+userListWidth/3, buddyListTop+buddyListHeight+4, (userListWidth-10)/3, 22), "Logout"))
            smartFox.Send(new LogoutRequest());

        if (GUI.Button(new Rect(userListLeft+2*userListWidth/3, buddyListTop+buddyListHeight+50, (userListWidth)/3, 22), "Start Game")){
            ISFSObject gameParams = new SFSObject();
            gameParams.PutInt("roomId", currentActiveRoom.Id);
            gameParams.PutBool("isGame", false);
            smartFox.Send(new ExtensionRequest("startGame",gameParams));

            showLoadingScreen = true;
            Debug.Log("Started Game " + currentActiveRoom.Name);
        }

        if (GUI.Button(new Rect(userListLeft+2*userListWidth/3, buddyListTop+buddyListHeight+4, (userListWidth)/3, 22), "Quit"))
            CloseApplication();
    }
开发者ID:Hargalaten,项目名称:meGAMEss,代码行数:101,代码来源:LoginLobbys.cs

示例6: SendSoundObject

 public static SFSObject SendSoundObject(string sound, bool isPlay)
 {
     SFSObject message = new SFSObject();
     message.PutUtfString("messageType", "UpdateSound");
     message.PutUtfString("sound", sound);
     message.PutBool("state", isPlay);
     Networking.SendData(message);
     return message;
 }
开发者ID:xzs424,项目名称:PunchMe,代码行数:9,代码来源:GameManager.cs

示例7: SendHackRequest

 public void SendHackRequest(String fromGateway, String toGateway, bool neutralize)
 {
     if(lost)
     {
         mg.getNotificationManager().DisplayWindow("ACTIONSDISABLED");
         return;
     }
     ISFSObject data = new SFSObject();
     data.PutUtfString("gatewayFrom", fromGateway);
     data.PutUtfString("gatewayTo", toGateway);
     data.PutBool("neutralize", neutralize);
     smartFox.Send(new ExtensionRequest("hack", data, smartFox.LastJoinedRoom));
 }
开发者ID:Hargalaten,项目名称:meGAMEss,代码行数:13,代码来源:NetworkManager.cs

示例8: toSFSObject

    public override SFSObject toSFSObject()
    {
        SFSObject sprintObject = new SFSObject();
        sprintObject.PutLong("Id_Sprint", this.getId_Sprint());
        sprintObject.PutLong("id_Proyecto", this.getId_Proyecto());
        sprintObject.PutUtfString("estado", this.getEstado());
        if(this.descripcion!=null)
            sprintObject.PutUtfString("descripcion", this.getDescripcion());
        else
            sprintObject.PutUtfString("descripcion", "");

        //usObject.PutLong ("fechaInicio", this.getFechaInicio ().toToFileTime ());
        sprintObject.PutUtfString ("fechaInicio", this.getFechaInicio().Year + "-"+this.getFechaInicio().Month+"-"+this.getFechaInicio().Day);
        //usObject.PutLong("fechaFin", this.getFechaFin().ToFileTime());
        sprintObject.PutUtfString ("fechaFin", this.getFechaFin().Year + "-"+this.getFechaFin().Month+"-"+this.getFechaFin().Day);
        sprintObject.PutUtfString("titulo",this.getTitulo());
        sprintObject.PutSFSArray("listaStories",this.getListaStoriesToSFSArray() );
        sprintObject.PutUtfString ("fecha_ultimo_cambio", this.get_fecha_ultimo_cambio ().ToString());
        sprintObject.PutBool ("cerrado", this.cerrado);
        return sprintObject;
    }
开发者ID:CristianCosta,项目名称:Kinect,代码行数:21,代码来源:Sprint.cs

示例9: sendData

    private void sendData()
    {
        ISFSObject data = new SFSObject();

        data.PutFloat("x", daCube.transform.position.x);
        data.PutFloat("y", daCube.transform.position.y);
        data.PutFloat("z", daCube.transform.position.z);

        data.PutFloat("rx", daCube.transform.localEulerAngles.x);
        data.PutFloat("ry", daCube.transform.localEulerAngles.y);
        data.PutFloat("rz", daCube.transform.localEulerAngles.z);

        data.PutFloat("vx", daCube.rigidbody.velocity.x);
        data.PutFloat("vy", daCube.rigidbody.velocity.y);
        data.PutFloat("vz", daCube.rigidbody.velocity.z);

        data.PutBool("isPhysX", isPhysX);

        smartFox.Send(new ObjectMessageRequest(data));
    }
开发者ID:Rabenvald,项目名称:Heavy-Insertion,代码行数:20,代码来源:Test1Manager.cs

示例10: sendAttack

    public void sendAttack(GameObject gO, Vector3 pos, Vector3 rot, Vector3 vel)
    {
        SFSObject myData = new SFSObject();

        myData.PutUtfString("Command", "CreateAttack");

        myData.PutUtfString("Id", gO.GetComponent<NetTag>().Id);

        myData.PutFloat("px", gO.transform.position.x);
        myData.PutFloat("py", gO.transform.position.y);
        myData.PutFloat("pz", gO.transform.position.z);

        myData.PutFloat("rx", gO.transform.rotation.eulerAngles.x);
        myData.PutFloat("ry", gO.transform.rotation.eulerAngles.y);
        myData.PutFloat("rz", gO.transform.rotation.eulerAngles.z);

        myData.PutFloat("vx", gO.rigidbody.velocity.x);
        myData.PutFloat("vy", gO.rigidbody.velocity.y);
        myData.PutFloat("vz", gO.rigidbody.velocity.z);

        myData.PutFloat("ppx", pos.x);
        myData.PutFloat("ppy", pos.y);
        myData.PutFloat("ppz", pos.z);

        myData.PutFloat("prx", pos.x);
        myData.PutFloat("pry", pos.y);
        myData.PutFloat("prz", pos.z);

        myData.PutFloat("pvx", vel.x);
        myData.PutFloat("pvy", vel.y);
        myData.PutFloat("pvz", vel.z);

        myData.PutBool("PhysMaster", isPhysAuth);

        smartFox.Send(new ObjectMessageRequest(myData));

        //Debug.Log("Type of attack: " + gO.GetComponent<NetTag>().Id);
    }
开发者ID:Rabenvald,项目名称:Heavy-Insertion,代码行数:38,代码来源:Manager.cs

示例11: InvioDatiPlayerLocale

 /// <summary>
 /// invia i dati al server in modo che possa avvisare l'utente o gli utenti interessati.
 /// Se l'intero passato al metodo è -1, verranno avvisati tutti i client presenti nella stanza,
 /// questo deve accadere quando l'utente locale entra nella stanza di gioco per avvisare quelli già 
 /// presenti delle sue caratteristiche.
 /// Se l'id dello user è diverso da -1, il server avviserà solo quell'utente,
 /// questo accade quando un client si accorge che un nuovo utente è entrato nella sua stanza. 
 /// In questo caso lo spawnme non viene inviato a tutti perchè quelli già presenti in stanza erano stati già avvisati.
 /// </summary>
 /// <param name="userId"></param>
 private void InvioDatiPlayerLocale(int userId)
 {
     //passare tutti i dati e non solo questi
     SFSObject objOut = new SFSObject();
     objOut.PutUtfString("model", Statici.datiPersonaggio.Dati.nomeModello);
     objOut.PutUtfString("nome", Statici.datiPersonaggio.Dati.nomePersonaggio);
     objOut.PutUtfString("classe", Statici.datiPersonaggio.Dati.classe);
     objOut.PutBool("gioc", true);
     objOut.PutInt("liv", Statici.datiPersonaggio.Dati.Livello);
     objOut.PutFloat("mana", Statici.datiPersonaggio.Dati.Mana);
     objOut.PutFloat("manaM", Statici.datiPersonaggio.Dati.ManaMassimo);
     objOut.PutFloat("exp", Statici.datiPersonaggio.Dati.Xp);
     objOut.PutFloat("expM", Statici.datiPersonaggio.Dati.XPMassimo);
     objOut.PutFloat("vita", Statici.datiPersonaggio.Dati.Vita);
     objOut.PutFloat("vitaM", Statici.datiPersonaggio.Dati.VitaMassima);
     objOut.PutFloat("att", Statici.datiPersonaggio.Dati.Attacco);
     objOut.PutFloat("dif", Statici.datiPersonaggio.Dati.difesa);
     objOut.PutUtfString("scena", SceneManager.GetActiveScene().name);
     objOut.PutInt("usIn", userId);
     sfs.Send(new ExtensionRequest("spawnMe", objOut, sfs.LastJoinedRoom));
 }
开发者ID:LucaGames,项目名称:ClassPrjUnit4-5,代码行数:31,代码来源:StanzeManager.cs

示例12: toSFSObject

 public override SFSObject toSFSObject()
 {
     SFSObject storyObject = new SFSObject();
     storyObject.PutLong("id_UserStory", this.getId_UserStory());
     storyObject.PutLong ("Id_Sprint", this.id_Sprint);
     storyObject.PutInt("prioridad", this.getPrioridad());
     storyObject.PutUtfString("descripcion", this.getDescripcion());
     storyObject.PutSFSArray("listaTareas", this.getListaTareasToSFSArray());
     storyObject.PutSFSArray("listaEstimacion", this.getListaEstimacionToSFSArray());
     storyObject.PutSFSArray ("listaCriterios", this.getListaCriteriosToSFSArray ());
     storyObject.PutInt("estadoEstimacion",this.getEstadoEstimacion());
     storyObject.PutFloat("valorEstimacion",this.getValorEstimacion());
     storyObject.PutLong("id_proyecto",this.getProyecto());
     storyObject.PutUtfString("Titulo",this.getTitulo());
     storyObject.PutBool("cerrada", this.cerrada);
     storyObject.PutUtfString ("fecha_ultimo_cambio", this.get_fecha_ultimo_cambio ().ToString());
     return storyObject;
 }
开发者ID:CristianCosta,项目名称:Kinect,代码行数:18,代码来源:UserStory.cs

示例13: OnUserEnterRoom

    private void OnUserEnterRoom(BaseEvent evt)
    {
        SFSObject dataObject = new SFSObject();
        dataObject.PutUtfString("type", "setup");
        dataObject.PutInt("playerID", myPlayer.ID);
        dataObject.PutInt("seed", epoch);
        dataObject.PutInt("decks", numberOfDecks);
        dataObject.PutBool("start", startState);
        dataObject.PutBool("bet", betState);
        dataObject.PutBool("deal", dealState);
        dataObject.PutBool("decision", decisionState);
        dataObject.PutBool("end", endState);
        dataObject.PutInt("remaining", decks.Count);
        dataObject.PutInt("free", FindSeat());

        SendCurrentRequest();
        smartFox.Send(new ObjectMessageRequest(dataObject));
    }
开发者ID:haly,项目名称:Blackjack,代码行数:18,代码来源:BlackjackScript.cs

示例14: OnObjectMessageReceived

    private void OnObjectMessageReceived(BaseEvent evt)
    {
        User sender = (User)evt.Params["sender"];
        ISFSObject data = (SFSObject)evt.Params["message"];

        Debug.Log("here ib ob mess");

        if (GameValues.isHost)
        {

            if (data.ContainsKey("RequestTeamID"))
            {
                int passedPlayerTeamRequest = data.GetInt("RequestTeamID");

                //add if there is room on team; not invalid index
                if (!(currentTeams[passedPlayerTeamRequest] + 1 > playerPerTeam) || !(passedPlayerTeamRequest < 0) || !(passedPlayerTeamRequest > numberOfTeams - 1))
                {
                    int passedPlayerTeam = data.GetInt("CurrentTeamID");
                    currentTeams[passedPlayerTeamRequest]++;
                    currentTeams[passedPlayerTeam]--;

                    Debug.Log("Left team has: " + passedPlayerTeam);
                    Debug.Log("Joined team has: " + passedPlayerTeamRequest);
                    SFSObject returnData = new SFSObject();
                    returnData.PutUtfString("name", data.GetUtfString("name"));
                    returnData.PutBool("teamRequest", true);
                    returnData.PutInt("team", passedPlayerTeamRequest);
                    smartFox.Send(new ObjectMessageRequest(returnData));
                }
            }
        }
        else //client
        {
            if (data.ContainsKey("name"))
            {
                if (data.GetUtfString("name") == username)
                {
                    //store player id and team as user data
                    List<UserVariable> uData = new List<UserVariable>();
                    if (data.ContainsKey("id"))
                    {
                        //get player id
                        GameValues.playerID = data.GetInt("id");
                        Debug.Log("Player ID: " + GameValues.playerID);
                        uData.Add(new SFSUserVariable("playerID", GameValues.playerID));
                    }

                    GameValues.teamNum = data.GetInt("team");
                    Debug.Log("Player is joining team #" + GameValues.teamNum);

                    uData.Add(new SFSUserVariable("playerTeam", GameValues.teamNum));
                    smartFox.Send(new SetUserVariablesRequest(uData));
                }

            }
        }

        /***/
    }
开发者ID:eric-kansas,项目名称:Cubes-in-Space,代码行数:59,代码来源:GameLobby.cs

示例15: UpdatePlayerInfo

 public void UpdatePlayerInfo()
 {
     SFSObject message = new SFSObject ();
     message.PutUtfString ("messageType", "UpdatePlayerInfo");
     message.PutBool ("tetrisPlayer", TetrisPlayer);
     message.PutBool ("breakoutPlayer", BreakoutPlayer);
     message.PutBool ("platformPlayer", PlatformPlayer);
     Networking.SendData (message);
 }
开发者ID:xzs424,项目名称:PunchMe,代码行数:9,代码来源:GameManager.cs


注:本文中的SFSObject.PutBool方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。