Beispiel #1
0
        //Tentative Use Case from UI Manager
        public void SetNewCat(CatCustomisation catDescription, Texture2D catimage = null)
        {
            var food       = GetFoodSprite(catDescription._food);
            var cativities = GetToySprite(catDescription._toy);

            SetName(catDescription._catName);
            SetUIElement(_catLikes, food.Item2);
            SetUIElement(_catLikesImage, food.Item1);
            SetUIElement(_cativities, cativities.Item2);
            SetUIElement(_catActivitiesImage, cativities.Item1);
            SetUIElement(_catImage, catimage);
        }
Beispiel #2
0
 public bool GetRandomCat(out CatCustomisation cat)
 {
     _pool ??= new List<CatCustomisation>(_catCustomizationOptions);
     if (_pool.Count == 0)
     {
         // Deal with this properly later
         cat = CatCustomisation.EmptyCat();
         return false;
     }
     int index = Random.Range(0, _pool.Count);
     cat = _pool[index];
     _pool.RemoveAt(index);
     return true;
 }
Beispiel #3
0
 public void RecycleCat(CatCustomisation cat)
 {
     _pool ??= new List<CatCustomisation>(_catCustomizationOptions);
     _pool.Add(cat);
 }