2016-09-10 16:51:34 +02:00
|
|
|
package com.rubenvandeven.emotionhero;
|
|
|
|
|
|
|
|
import android.graphics.Bitmap;
|
2016-09-21 15:58:49 +02:00
|
|
|
import android.widget.LinearLayout;
|
2016-09-10 16:51:34 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 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;
|
2016-09-16 19:04:01 +02:00
|
|
|
public AchievementListener achievementListener;
|
2016-09-10 16:51:34 +02:00
|
|
|
|
2016-09-16 19:04:01 +02:00
|
|
|
public Achievement(String title, Bitmap icon, AchievementListener lvlListener){
|
2016-09-10 16:51:34 +02:00
|
|
|
this.title = title;
|
|
|
|
this.icon = icon;
|
2016-09-16 19:04:01 +02:00
|
|
|
this.achievementListener = lvlListener;
|
2016-09-10 16:51:34 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public int getId() {
|
|
|
|
return AchievementCollection.getInstance().getId(this);
|
|
|
|
}
|
2016-09-16 19:04:01 +02:00
|
|
|
|
|
|
|
public interface AchievementListener {
|
|
|
|
boolean hasGotAchievement(Player player, Game game);
|
2016-09-21 15:58:49 +02:00
|
|
|
void setDescription(Player player, Game game, LinearLayout layout);
|
2016-09-16 19:04:01 +02:00
|
|
|
}
|
2016-09-10 16:51:34 +02:00
|
|
|
}
|