예제 #1
0
    private void InitFlightInfo()
    {
        int[,] airs    = AirPortData.GetAirPlanes();
        mFlightSprites = new Image[Define.AirportPlaneCount, Define.AirportPlaneCount];
        for (int i = 0; i < Define.AirportPlaneCount; ++i)
        {
            for (int j = 0; j < Define.AirportPlaneCount; ++j)
            {
                mFlightSprites[i, j] = GetChild <Image>("Content/Image_" + (i * Define.AirportPlaneCount + j) + "/Flight");

                int flightId = airs[i, j];
                if (flightId < 1)
                {
                    continue;
                }

                AssetBundleManager.Instance.Load("flightId", (AssetBundleInfo o) =>
                {
                    if (o == null)
                    {
                        return;
                    }

                    mFlightSprites[i, j].sprite = o.Require <Sprite>(this);
                });
            }
        }
    }
예제 #2
0
    private void UpdateAirportInfo()
    {
        List <int> list = AirPortData.GetAirPlanesList();

        if (list == null || list.Count < 1)
        {
            return;
        }
    }
예제 #3
0
 public void DecodeDatas()
 {
     if (string.IsNullOrEmpty(PlayerPrefsMgr.OwnerData))
     {
         info = new OwnerDataInfo();
     }
     else
     {
         info = JsonMapper.ToObject <OwnerDataInfo>(PlayerPrefsMgr.OwnerData);
         AirPortData.ParseFlights();
     }
 }
예제 #4
0
    public void SaveAllDatas()
    {
        if (info == null)
        {
            return;
        }

        AirPortData.UpdateFlights();
        string json = JsonMapper.ToJson(info);

        if (string.IsNullOrEmpty(json))
        {
            Logger.LogError("Save OwnerData Falied! OwnerData is null!");
            return;
        }

        PlayerPrefsMgr.OwnerData = json;
    }