public float GetFloatData(string typeName) { if (CObjectManager.Instance.getPlayerMySelf() == null) { return(-1); } CCharacterData pCharData = CObjectManager.Instance.getPlayerMySelf().GetCharacterData(); if (typeName == "EXP") //经验 { if (pCharData.Get_Exp() < 0) { return(0); } else { return(pCharData.Get_Exp()); } } else if (typeName == "NEEDEXP") //升级经验 { return(pCharData.Get_MaxExp()); } return(0); }