Then I tried using XStream, I got confused <.<.
So now I need help trying to make a save & load feature using XStream.
Here's my player file if you need it
public class Player implements Serializable
{
private static final long serialVersionUID = 8495992061792087696L;
public int HP = 100;
public int FT = 50;
public int COINS = 0;
public int STR = 10;
public int STAGE;
static String SAVE_PATH = "data/saves";
public Player(int HP, int FT, int COINS, int STR, int STAGE)
{
super();
HP = this.HP;
FT = this.FT;
COINS = this.COINS;
STR = this.STR;
STAGE = this.STAGE;
}
public int getSTAGE()
{
return STAGE;
}
public int getCOINS()
{
return COINS;
}
public int getSTR()
{
return STR;
}
public int getHP()
{
return HP;
}
public int getFT()
{
return FT;
}
public int getCoins()
{
return COINS;
}
public void setCOINS(int COINS)
{
COINS = this.COINS;
}
public void setSTR(int STR)
{
STR = this.STR;
}
public void setHP(int HP)
{
HP = this.HP;
}
public void setFT(int FT)
{
FT = this.FT;
}
public void setSTAGE(int STAGE)
{
STAGE = this.STAGE;
}
}

New Topic/Question
Reply



MultiQuote








|