예제 #1
0
        public static int GetAnimalImage(AnimalModel model, AnimalState state)
        {
            if (model is SheepModel)
            {
                if (state == AnimalState.ALIVE)
                {
                    return(Resource.Drawable.sheep);
                }
                if (state == AnimalState.DEAD)
                {
                    return(Resource.Drawable.rip);
                }
            }

            if (model is WolfModel)
            {
                if (state == AnimalState.ALIVE)
                {
                    return(Resource.Drawable.wolf);
                }
                if (state == AnimalState.DEAD)
                {
                    return(Resource.Drawable.wolf_rip);
                }
                if (state == AnimalState.KILLER)
                {
                    return(Resource.Drawable.killer);
                }
            }

            if (model is HunterModel)
            {
                if (state == AnimalState.ALIVE)
                {
                    return(Resource.Drawable.hunter);
                }
                if (state == AnimalState.DEAD)
                {
                    return(Resource.Drawable.hunter_rip);
                }
                if (state == AnimalState.KILLER)
                {
                    return(Resource.Drawable.hunter_killer);
                }
            }

            if (model is DuckModel)
            {
                if (state == AnimalState.ALIVE)
                {
                    return(Resource.Drawable.duck);
                }
            }

            throw new Exception();
        }
예제 #2
0
        public void KillersName(AnimalModel animal)
        {
            var name = businessLogic.NameofKiller(animal);

            if (name != "")
            {
                _whoKillMe.Text       = name;
                _whoKillMe.Visibility = ViewStates.Visible;
            }
        }
예제 #3
0
        public void AddBottomImage(AnimalModel animal)
        {
            var load = Picasso.Get()
                       .Load(animal.URL);

            if (animal.IsDead)
            {
                load.Transform(new GrayscaleTransformation());
            }
            load.Into(_animalsFoto);
        }