예제 #1
0
    public void ReadAllDataFromGDE()
    {
        SDDataManager dm = SDDataManager.Instance;

        //
        refreshNumbers();
        //
        bool teamHaveGoddess = false;

        if (dm.PlayerData.heroesTeam != null &&
            dm.PlayerData.heroesTeam.Count > 0)
        {
            GDEunitTeamData team = dm.PlayerData.heroesTeam[0];
            if (!string.IsNullOrEmpty(team.goddess))
            {
                teamHaveGoddess = true;
                GoddessInfo info = dm.getGoddessInfoById(team.goddess);
                //goddessIcon.sprite =
                player_name_text.text = info.Name;
            }
        }
        if (!teamHaveGoddess)
        {
            List <GDEgoddessData> gs = dm.getAllGoddessesUnLocked();
            if (gs.Count > 0)
            {
                GoddessInfo info = dm.getGoddessInfoById(gs[0].id);
                //goddessIcon.sprite =
                player_name_text.text = info.Name;
            }
        }
        //
        //player_name_text = dm.PlayerData
        //
    }
예제 #2
0
    public void refreshNumbers()
    {
        SDDataManager dm = SDDataManager.Instance;

        coin_num_text.text    = "" + dm.GetCoin();
        damond_num_text.text  = "" + dm.GetDamond();
        jiancai_num_text.text = "" + dm.getJiancai();
        //
        int currentDayNightId = dm.ResidentMovementData.CurrentDayNightId;

        dayNightChangeImg.sprite = ImgForChanging[currentDayNightId];
    }