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


C# ISFSObject.GetBool方法代码示例

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


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

示例1: eseguiAnimazioniRemoteT

 //esegue animazioni remote Tastiera
 public void eseguiAnimazioniRemoteT(ISFSObject sfsObjIn)
 {
     anim.SetFloat("Forward",sfsObjIn.GetFloat("f"));
     anim.SetFloat("Turn", sfsObjIn.GetFloat("t"));
     anim.SetBool("OnGround", sfsObjIn.GetBool("o"));
     anim.SetFloat("Jump", sfsObjIn.GetFloat("j"));
     anim.SetFloat("JumpLeg", sfsObjIn.GetFloat("jL"));
     anim.SetBool("Attacco1", sfsObjIn.GetBool("a1"));
     anim.SetBool("Attacco2", sfsObjIn.GetBool("a2"));
 }
开发者ID:LucaGames,项目名称:ClassPrjUnit4-5,代码行数:11,代码来源:AnimSyncronizeRiceiver.cs

示例2: HandleResponse

 public void HandleResponse(ISFSObject anObjectIn, GameWorldManager ourGWM)
 {
     if(anObjectIn.GetBool("Gathered"))
     {
         ourGWM.destroyObject(ourGWM.getResourceDictionary()[anObjectIn.GetInt("ID")]);
         ourGWM.getResourceDictionary().Remove(anObjectIn.GetInt("ID"));
     }
 }
开发者ID:Gabe-Biele,项目名称:Project-Circleage,代码行数:8,代码来源:GatherResourceHandler.cs

示例3: HandleResponse

        public void HandleResponse(ISFSObject anObjectIn, GameWorldManager ourGWM)
        {
            Debug.Log("Server spawning player.");
            float[] locationArray = anObjectIn.GetFloatArray("Location");
            float aRotation = anObjectIn.GetFloat("Rotation");
            string aCharacterName = anObjectIn.GetUtfString("CharacterName");

            if(anObjectIn.GetBool("IsLocal"))
            {
                GameObject aLocalPlayer = ourGWM.createObject("Prefabs/Player/PlayerBasic");
                aLocalPlayer.transform.position = new Vector3(locationArray[0], locationArray[1], locationArray[2]);
                aLocalPlayer.transform.rotation = Quaternion.identity;

                // Since this is the local player, lets add a controller and fix the camera
                aLocalPlayer.AddComponent<LocalPlayerController>();
                aLocalPlayer.AddComponent<InputController>();
                ourGWM.setLPC(aLocalPlayer.GetComponent<LocalPlayerController>());
                ourGWM.getLPC().SetName(aCharacterName);
                aLocalPlayer.GetComponentInChildren<TextMesh>().text = aCharacterName;

                GameObject cameraAttach = new GameObject();
                cameraAttach.transform.parent = aLocalPlayer.transform;
                cameraAttach.transform.localPosition = new Vector3(1f, 2.5f, 1.0f);
                cameraAttach.name = "Camera Target";
                Camera.main.transform.parent = cameraAttach.transform;
                Camera.main.GetComponent<CameraController>().setTarget(cameraAttach);
                Camera.main.GetComponent<CameraController>().setCursorVisible(false);
            }
            else if(!anObjectIn.GetBool("IsLocal"))
            {
                GameObject aRemotePlayer = ourGWM.createObject("Prefabs/Player/PlayerBasic");

                aRemotePlayer.name = "GameCharacter_" + aCharacterName;
                aRemotePlayer.AddComponent<RemotePlayerController>();
                aRemotePlayer.transform.position = new Vector3(locationArray[0], locationArray[1], locationArray[2]);
                aRemotePlayer.GetComponent<RemotePlayerController>().SetRotation(aRotation);
                aRemotePlayer.GetComponentInChildren<TextMesh>().text = aCharacterName;

                //Add Newly spawned player to Dictionary
                ourGWM.getPlayerDictionary().Add(aCharacterName, aRemotePlayer);
            }
        }
开发者ID:Gabe-Biele,项目名称:Project-Circleage,代码行数:42,代码来源:SpawnPlayerHandler.cs

示例4: GetBool

 public bool GetBool(ISFSObject data, string key)
 {
     if (receiveEncrypted)
     {
         return provider.DecryptBool(data.GetByteArray(key));
     }
     else
     {
         return data.GetBool(key);
     }
 }
开发者ID:Antaresgames,项目名称:AegisBorn,代码行数:11,代码来源:ReceivableObject.cs

示例5: HandleResponse

 public void HandleResponse(ISFSObject anObjectIn, GameWorldManager ourGWM)
 {
     string aCharacterName = anObjectIn.GetUtfString("CharacterName");
     if(aCharacterName == ourGWM.getLPC().GetName())
     {
         return;
     }
     else if(ourGWM.getPlayerDictionary().ContainsKey(aCharacterName))
     {
         float[] LocationArray = anObjectIn.GetFloatArray("Location");
         bool IsMoving = anObjectIn.GetBool("IsMoving");
         ourGWM.getPlayerDictionary()[aCharacterName].GetComponent<RemotePlayerController>().SetPlayerMoving(IsMoving);
         ourGWM.getPlayerDictionary()[aCharacterName].transform.position = new Vector3(LocationArray[0], LocationArray[1], LocationArray[2]);
     }
 }
开发者ID:Gabe-Biele,项目名称:Project-Circleage,代码行数:15,代码来源:PositionUpdateHandler.cs

示例6: OnResponseGetAssetsInfo

    private void OnResponseGetAssetsInfo(ISFSObject a_infoData)
    {
        //assetsinfo
        if(a_infoData.GetBool(Keys.SUCCESS))
        {
            ISFSArray l_tempSfsArray = a_infoData.GetSFSArray(Keys.ASSETS_INFO);
            List<AssetsInfo> l_allCurrentInfoList = new List<AssetsInfo>();
            for (int indexAssetInfo = 0; indexAssetInfo < l_tempSfsArray.Count; indexAssetInfo++)
            {
                AssetsInfo l_temp = new AssetsInfo();
                l_temp.AssetID = (int)(l_tempSfsArray.GetSFSObject(indexAssetInfo)).GetLong("assetsid");
                l_temp.ImageTargetID = (l_tempSfsArray.GetSFSObject(indexAssetInfo)).GetUtfString("imagetargetid");
                l_temp.URL = (l_tempSfsArray.GetSFSObject(indexAssetInfo)).GetUtfString("assetsurl");
                l_temp.AssetName = (l_tempSfsArray.GetSFSObject(indexAssetInfo)).GetUtfString("assetname");
                l_allCurrentInfoList.Add(l_temp);

            }
            GameBaseEvent l_assetsInfoEvent = new GameBaseEvent(eGameEvents.getAssetsInfo.ToString());
            GameEventArgs l_eventArg = new GameEventArgs();
            l_eventArg.EventData  = (object)l_allCurrentInfoList;
            l_assetsInfoEvent.Args = l_eventArg;
            dispatchEvent(this, l_assetsInfoEvent);
        }
        else
        {
            Debug.Log(a_infoData.GetUtfString(Keys.ERROR));
        }
    }
开发者ID:SillyGames,项目名称:T_r_e_a_s_u_r_e_H_u_n_t,代码行数:28,代码来源:NetworkManager.cs

示例7: eseguiAnimazioniRemoteC

 //esegue animazioni remote Punta e clicca
 public void eseguiAnimazioniRemoteC(ISFSObject sfsObjIn)
 {
     forward= sfsObjIn.GetFloat("f");
     attacco1=sfsObjIn.GetBool("a1");
     attacco2=sfsObjIn.GetBool("a2");
 }
开发者ID:LucaGames,项目名称:ClassPrjUnit4-5,代码行数:7,代码来源:AnimSyncronizeRiceiver.cs

示例8: reshowPlayer

 private void reshowPlayer(ISFSObject msg)
 {
     var robot = msg.GetBool("isBlue") ? blueRobot : redRobot;
     robot.GetComponentInChildren<SkinnedMeshRenderer>().enabled = true;
 }
开发者ID:Daminvar,项目名称:Scatterblocks,代码行数:5,代码来源:GameManager.cs

示例9: generateExplosion

 private void generateExplosion(ISFSObject msg)
 {
     var robot = msg.GetBool("isBlue") ? blueRobot : redRobot;
     Instantiate(ExplosionPF, robot.transform.position, Quaternion.identity);
     robot.GetComponentInChildren<SkinnedMeshRenderer>().enabled = false;
 }
开发者ID:Daminvar,项目名称:Scatterblocks,代码行数:6,代码来源:GameManager.cs

示例10: InstallItem

    private void InstallItem(ISFSObject data)
    {
        if(data.GetBool("success"))
            mg.getNotificationManager().DisplayWindow("INSTALLED");

        gameObject.GetComponent<InventoryManager>().UpdatePlayerInventory(data.GetSFSArray("inventory"));

        ISFSObject data2 = new SFSObject();
        Gateway gtw = gameObject.GetComponent<TextManager>().gtw;
        data2.PutUtfString("selctedGateway", gtw.getState());
        smartFox.Send(new  ExtensionRequest("refreshGtw", data2, smartFox.LastJoinedRoom));
    }
开发者ID:Hargalaten,项目名称:meGAMEss,代码行数:12,代码来源:NetworkManager.cs

示例11: Hack

 private void Hack(ISFSObject data)
 {
     foreach(GameObject g in GameObject.FindGameObjectsWithTag("ray"))
         Destroy(g);
     if (data.GetBool ("success"))
     {
         ISFSObject data2 = new SFSObject();
         Gateway gtw = gameObject.GetComponent<TextManager>().gtw;
         data2.PutUtfString("selctedGateway", gtw.getState());
         smartFox.Send(new  ExtensionRequest("refreshGtw", data2, smartFox.LastJoinedRoom));
     }
     if(data.GetBool("victoryReached") == true)
         mg.getNotificationManager().DisplayWindow("YOUWON");
 }
开发者ID:Hargalaten,项目名称:meGAMEss,代码行数:14,代码来源:NetworkManager.cs

示例12: OnCircleAndPlayer

 void OnCircleAndPlayer(ISFSObject data)
 {
     PlayerTeam circleTeam = (PlayerTeam) System.Enum.Parse(typeof(PlayerTeam), data.GetUtfString("team"));
     if(circleTeam != team)
         return;
     Circle circle = Circles.Instance.GetCircle(data.GetInt("circleId"));
     ServerPlayer serverPlayer = ServerPlayers.GetPlayer(data.GetUtfString("userName"));
     bool isSucceed = data.GetBool("isSucceed");
     if (isSucceed)
         serverPlayer.TruePress(circle);
     else
         serverPlayer.FailPress(circle);
 }
开发者ID:PanCrucian,项目名称:IOL,代码行数:13,代码来源:Game.cs


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