public bool CheckCondition() { switch (type) { case 0: return(IntCompare(parameter1.ReturnInt(null), parameter2.ReturnInt(null))); case 1: return(BoolCompare(parameter1.ReturnBool(null), parameter2.ReturnBool(null))); case 2: return(StringCompare(parameter1.ReturnString(null), parameter2.ReturnString(null))); case 3: return(FloatCompare(parameter1.ReturnFloat(null), parameter2.ReturnFloat(null))); case 4: return(PlayerCompare(parameter1.ReturnPlayer(null), parameter2.ReturnPlayer(null))); case 5: return(TitanCompare(parameter1.ReturnTitan(null), parameter2.ReturnTitan(null))); default: return(false); } }
public float ReturnFloat(object sentObject) { object obj = sentObject; if (parameters != null) { obj = parameters; } switch (helperClass) { case 0: return((float)obj); case 5: switch (helperType) { case 0: { int value2 = (int)obj; return(Convert.ToSingle(value2)); } case 1: { bool value = (bool)obj; return(Convert.ToSingle(value)); } case 3: return((float)obj); case 2: { string text = (string)obj; if (float.TryParse((string)obj, out float result)) { return(result); } return(0f); } default: return((float)obj); } case 1: { RCActionHelper rCActionHelper2 = (RCActionHelper)obj; switch (helperType) { case 0: return(nextHelper.ReturnFloat(FengGameManagerMKII.IntVariables[rCActionHelper2.ReturnString(null)])); case 1: return(nextHelper.ReturnFloat(FengGameManagerMKII.BoolVariables[rCActionHelper2.ReturnString(null)])); case 2: return(nextHelper.ReturnFloat(FengGameManagerMKII.StringVariables[rCActionHelper2.ReturnString(null)])); case 3: return((float)FengGameManagerMKII.FloatVariables[rCActionHelper2.ReturnString(null)]); case 4: return(nextHelper.ReturnFloat(FengGameManagerMKII.PlayerVariables[rCActionHelper2.ReturnString(null)])); case 5: return(nextHelper.ReturnFloat(FengGameManagerMKII.TitanVariables[rCActionHelper2.ReturnString(null)])); default: return(0f); } } case 2: { PhotonPlayer photonPlayer = (PhotonPlayer)obj; if (photonPlayer != null) { switch (helperType) { case 0: return(nextHelper.ReturnFloat(photonPlayer.customProperties[PhotonPlayerProperty.Team])); case 1: return(nextHelper.ReturnFloat(photonPlayer.customProperties[PhotonPlayerProperty.RCTeam])); case 2: return(nextHelper.ReturnFloat(photonPlayer.customProperties[PhotonPlayerProperty.IsDead])); case 3: return(nextHelper.ReturnFloat(photonPlayer.customProperties[PhotonPlayerProperty.IsTitan])); case 4: return(nextHelper.ReturnFloat(photonPlayer.customProperties[PhotonPlayerProperty.Kills])); case 5: return(nextHelper.ReturnFloat(photonPlayer.customProperties[PhotonPlayerProperty.Deaths])); case 6: return(nextHelper.ReturnFloat(photonPlayer.customProperties[PhotonPlayerProperty.MaxDamage])); case 7: return(nextHelper.ReturnFloat(photonPlayer.customProperties[PhotonPlayerProperty.TotalDamage])); case 8: return(nextHelper.ReturnFloat(photonPlayer.customProperties[PhotonPlayerProperty.CustomInt])); case 9: return(nextHelper.ReturnFloat(photonPlayer.customProperties[PhotonPlayerProperty.CustomBool])); case 10: return(nextHelper.ReturnFloat(photonPlayer.customProperties[PhotonPlayerProperty.CustomString])); case 11: return((float)photonPlayer.customProperties[PhotonPlayerProperty.CustomFloat]); case 14: { int iD4 = photonPlayer.Id; if (FengGameManagerMKII.HeroHash.ContainsKey(iD4)) { HERO hERO = (HERO)FengGameManagerMKII.HeroHash[iD4]; return(hERO.transform.position.x); } return(0f); } case 15: { int iD3 = photonPlayer.Id; if (FengGameManagerMKII.HeroHash.ContainsKey(iD3)) { HERO hERO = (HERO)FengGameManagerMKII.HeroHash[iD3]; return(hERO.transform.position.y); } return(0f); } case 16: { int iD2 = photonPlayer.Id; if (FengGameManagerMKII.HeroHash.ContainsKey(iD2)) { HERO hERO = (HERO)FengGameManagerMKII.HeroHash[iD2]; return(hERO.transform.position.z); } return(0f); } case 12: return(nextHelper.ReturnFloat(photonPlayer.customProperties[PhotonPlayerProperty.Name])); case 13: return(nextHelper.ReturnFloat(photonPlayer.customProperties[PhotonPlayerProperty.Guild])); case 17: { int iD = photonPlayer.Id; if (FengGameManagerMKII.HeroHash.ContainsKey(iD)) { HERO hERO = (HERO)FengGameManagerMKII.HeroHash[iD]; return(hERO.rigidbody.velocity.magnitude); } return(0f); } } } return(0f); } case 3: { TITAN tITAN = (TITAN)obj; if (tITAN != null) { switch (helperType) { case 0: return(nextHelper.ReturnFloat(tITAN.abnormalType)); case 1: return(tITAN.myLevel); case 2: return(nextHelper.ReturnFloat(tITAN.currentHealth)); case 3: return(tITAN.transform.position.x); case 4: return(tITAN.transform.position.y); case 5: return(tITAN.transform.position.z); } } return(0f); } case 4: { RCActionHelper rCActionHelper = (RCActionHelper)obj; RCRegion rCRegion = (RCRegion)FengGameManagerMKII.RCRegions[rCActionHelper.ReturnString(null)]; switch (helperType) { case 0: return(rCRegion.GetRandomX()); case 1: return(rCRegion.GetRandomY()); case 2: return(rCRegion.GetRandomZ()); default: return(0f); } } default: return(0f); } }