Exemple #1
0
 public void UpdateUserWeatherData(UserWeatherPB userWeatherPB, WeatherPB weatherPB)
 {
     _weatherPB = weatherPB;
     foreach (var v in userWeatherPB.BlessNumMap)
     {
         BlessNumDir[v.Key] = v.Value;
     }
     _visitedTime = userWeatherPB.ChallengeCount;
 }
Exemple #2
0
        public VisitVo(UserWeatherPB userWeatherPB, WeatherPB weatherPB, int curVisitTime, VisitModel visitModel)
        {
            _visitModel = visitModel;
            NpcId       = userWeatherPB.Player;
            BlessNumDir = new Dictionary <int, int>();
            foreach (var v in userWeatherPB.BlessNumMap)
            {
                BlessNumDir[v.Key] = v.Value;
            }

            //WeatherId = userWeatherPB.WeatherId;
            _weatherPB = weatherPB;
            //_visitedTime = curVisitTime;
            _visitedTime = userWeatherPB.ChallengeCount;
        }
Exemple #3
0
    private void SetWeatherBar(WeatherPB pB)
    {
        best    = pB.Best * 10;
        better  = best + pB.Better * 10;
        invalid = better + pB.Same * 10;

        _invalid.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, invalid);
        _better.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, better);
        _best.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, best);
        _cursor.anchoredPosition = new Vector2(-invalid * 0.5f, _cursor.anchoredPosition.y);

        int min    = (int)(-invalid * 0.5f + better);
        int max    = (int)(invalid * 0.5f - better * 0.5f);
        int random = UnityEngine.Random.Range(min, max);

        _better.anchoredPosition = new Vector2(random, _better.anchoredPosition.y);
        _best.anchoredPosition   = new Vector2(random, _best.anchoredPosition.y);
    }
Exemple #4
0
 public void UpdateWeatherData(WeatherPB weatherPB)
 {
     _weatherPB = weatherPB;
 }