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(); }
public void KillersName(AnimalModel animal) { var name = businessLogic.NameofKiller(animal); if (name != "") { _whoKillMe.Text = name; _whoKillMe.Visibility = ViewStates.Visible; } }
public void AddBottomImage(AnimalModel animal) { var load = Picasso.Get() .Load(animal.URL); if (animal.IsDead) { load.Transform(new GrayscaleTransformation()); } load.Into(_animalsFoto); }