emotionhero/app/src/main/java/com/rubenvandeven/emotionhero/Achievement.java

36 lines
891 B
Java

package com.rubenvandeven.emotionhero;
import android.graphics.Bitmap;
import android.widget.LinearLayout;
/**
* Created by ruben on 10/09/16.
*
* Achievements made in a specific game (as provided by the API)
*/
public class Achievement {
public String title;
/**
* Html string
*/
public String description;
public Bitmap icon;
public AchievementListener achievementListener;
public Achievement(String title, Bitmap icon, AchievementListener lvlListener){
this.title = title;
this.icon = icon;
this.achievementListener = lvlListener;
}
public int getId() {
return AchievementCollection.getInstance().getId(this);
}
public interface AchievementListener {
boolean hasGotAchievement(Player player, Game game);
void setDescription(Player player, Game game, LinearLayout layout);
}
}