Exemplo n.º 1
0
 // Use this for initialization
 void Start()
 {
     PlayerInfo     = XMLObjectDeserializer.Deserialize <List <XMLCharacterInfo> >(Application.dataPath + "/XMLPlayerInfo/" + "PlayerCreated.xml");
     CharOne.text   = PlayerInfo [0].name;
     CharTwo.text   = PlayerInfo [1].name;
     CharThree.text = PlayerInfo [2].name;
     CharFour.text  = PlayerInfo [3].name;
 }
Exemplo n.º 2
0
    public void SaveNewChar()
    {
        PlayerInfo = XMLObjectDeserializer.Deserialize <List <XMLCharacterInfo> > (Application.dataPath + "/XMLPlayerInfo/" + "PlayerCreated.xml");

        PlayerInfo[SelectedButton].name         = CharName.text;
        PlayerInfo [SelectedButton].avatarIndex = PCSScript.imageIndex;

        XMLObjectSerializer.Serialize(PlayerInfo, Application.dataPath + "/XMLPlayerInfo/" + "PlayerCreated.xml");
        //Debug.Log ("File is saved as " + CharName.text);
        Debug.Log(Application.persistentDataPath);
    }
Exemplo n.º 3
0
    public void SavePlayerSession(float xpAmount)
    {
        selectedPlayer = PIScript.playerSelected;

        PlayerInfo = XMLObjectDeserializer.Deserialize <List <XMLCharacterInfo> >(Application.dataPath + "/XMLPlayerInfo/" + "PlayerCreated.xml");

        currentAmount  = (float)PlayerInfo [selectedPlayer].addXp;
        currentAmount += xpAmount;

        XPCalculator();

        XMLObjectSerializer.Serialize(PlayerInfo, Application.dataPath + "/XMLPlayerInfo/" + "PlayerCreated.xml");
    }
Exemplo n.º 4
0
 // Use this for initialization
 void Start()
 {
     PlayerInfo = XMLObjectDeserializer.Deserialize <List <XMLCharacterInfo> >(Application.dataPath + "/XMLPlayerInfo/" + "PlayerCreated.xml");
     //SetPlayerInfo (playerSelected);
 }