Some new stuff.
This commit is contained in:
@@ -10,6 +10,7 @@ public class GamePlay implements Serializable {
|
|||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
public static final GamePlay DEFAULT_PROFILE = new GamePlay();
|
public static final GamePlay DEFAULT_PROFILE = new GamePlay();
|
||||||
|
public boolean isDefault = false;
|
||||||
|
|
||||||
public int completionTime; // counts only the current run on the level,
|
public int completionTime; // counts only the current run on the level,
|
||||||
// excluding death games
|
// excluding death games
|
||||||
@@ -96,8 +97,10 @@ public class GamePlay implements Serializable {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// TODO Auto-generated catch block
|
// TODO Auto-generated catch block
|
||||||
// e.printStackTrace();
|
// e.printStackTrace();
|
||||||
System.out.println("Unable to read from GamePlay file: " + fileName + ", initializing a new GamePlay instance.");
|
System.out.println("Unable to read from GamePlay file: " + fileName
|
||||||
|
+ ", initializing a new GamePlay instance.");
|
||||||
gp = GamePlay.DEFAULT_PROFILE;
|
gp = GamePlay.DEFAULT_PROFILE;
|
||||||
|
gp.isDefault = true;
|
||||||
}
|
}
|
||||||
return gp;
|
return gp;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,18 +55,23 @@ public class PlayerProfile {
|
|||||||
public int getBumpSkill() {
|
public int getBumpSkill() {
|
||||||
return skillVector.get(SKILL.BUMP);
|
return skillVector.get(SKILL.BUMP);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getCollectSkill() {
|
public int getCollectSkill() {
|
||||||
return skillVector.get(SKILL.COLLECT);
|
return skillVector.get(SKILL.COLLECT);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getJumpSkill() {
|
public int getJumpSkill() {
|
||||||
return skillVector.get(SKILL.JUMP);
|
return skillVector.get(SKILL.JUMP);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getRunSkill() {
|
public int getRunSkill() {
|
||||||
return skillVector.get(SKILL.RUN);
|
return skillVector.get(SKILL.RUN);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getShootSkill() {
|
public int getShootSkill() {
|
||||||
return skillVector.get(SKILL.SHOOT);
|
return skillVector.get(SKILL.SHOOT);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getStompSkill() {
|
public int getStompSkill() {
|
||||||
return skillVector.get(SKILL.STOMP);
|
return skillVector.get(SKILL.STOMP);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,6 +81,21 @@ public class ProfileMatcher {
|
|||||||
TYPE type = null;
|
TYPE type = null;
|
||||||
HashMap<SKILL, Integer> skillVector = new HashMap<SKILL, Integer>();
|
HashMap<SKILL, Integer> skillVector = new HashMap<SKILL, Integer>();
|
||||||
|
|
||||||
|
if (playerMetrics.isDefault) {
|
||||||
|
skillLevel = SKILL_LEVEL.BEGINNER;
|
||||||
|
type = TYPE.RUNNER;
|
||||||
|
|
||||||
|
skillVector.put(SKILL.BUMP, new Integer(25));
|
||||||
|
skillVector.put(SKILL.COLLECT, new Integer(25));
|
||||||
|
skillVector.put(SKILL.JUMP, new Integer(25));
|
||||||
|
skillVector.put(SKILL.RUN, new Integer(25));
|
||||||
|
skillVector.put(SKILL.SHOOT, new Integer(25));
|
||||||
|
skillVector.put(SKILL.STOMP, new Integer(25));
|
||||||
|
|
||||||
|
PlayerProfile ret = new PlayerProfile(skillLevel, type, skillVector);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
int skillHolder;
|
int skillHolder;
|
||||||
|
|
||||||
// Get bump skills.
|
// Get bump skills.
|
||||||
|
|||||||
Reference in New Issue
Block a user