本文整理汇总了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"));
}
示例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"));
}
}
示例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);
}
}
示例4: GetBool
public bool GetBool(ISFSObject data, string key)
{
if (receiveEncrypted)
{
return provider.DecryptBool(data.GetByteArray(key));
}
else
{
return data.GetBool(key);
}
}
示例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]);
}
}
示例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));
}
}
示例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");
}
示例8: reshowPlayer
private void reshowPlayer(ISFSObject msg)
{
var robot = msg.GetBool("isBlue") ? blueRobot : redRobot;
robot.GetComponentInChildren<SkinnedMeshRenderer>().enabled = true;
}
示例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;
}
示例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));
}
示例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");
}
示例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);
}