using System.Collections; using System.Collections.Generic; using System.Threading.Tasks; using UnityEngine; using static UnityEditor.Experimental.GraphView.GraphView; //public class ShouXuFei : MonoBehaviour //{ // queryPlayerInfo queryPlayerInfo = new queryPlayerInfo(); // RealPlayerInfo shouXuInfo = new RealPlayerInfo(); // async void Start() // { // shouXuInfo = await queryPlayerInfo.QueryPlayerInfoPro(); // Debug.Log("===============" + shouXuInfo.data.unionId); // } //} //async void Start() //{ // shouXuInfo = await queryPlayerInfo.QueryPlayerInfoPro(); // Debug.Log("===============" + shouXuInfo.data.unionId); //} //public async Task ShouXu() //{ // // 等待 shouXuInfo 赋值完成 // while (shouXuInfo.data == null || shouXuInfo.data.unionId == 0) // { // await Task.Yield(); // Yield 控制器,等待直到 shouXuInfo 完成赋值 // } // if (shouXuInfo.data.unionId <= 0) // { // if (shouXuInfo.data.isMember) // { // return 0.08f; // } // } // else // { // return 0; // } // return 0; //} public class ShouXuFei : MonoBehaviour { //queryPlayerInfo queryPlayerInfo = new queryPlayerInfo(); //RealPlayerInfo shouXuInfo = new RealPlayerInfo(); //async void Start() //{ // shouXuInfo = await queryPlayerInfo.QueryPlayerInfoPro(); // Debug.Log("===============" + shouXuInfo.data.unionId); // Debug.Log(ShouXu()+"================="); //} public float ShouXu(int unionId,bool Member) { if (unionId <= 0) { if (Member) { return 0.08f; } else { return 0.13f; } } else { return 0; } } }