Exemple #1
0
    private void TestSpAquisitionSerialization()
    {
        bool[,] tab = new bool[99, 3];

        int counter = 29;

        for (int i = 0; i < 99; i++)
        {
            for (int j = 0; j < 3; j++)
            {
                if (counter > 0)
                {
                    tab[i, j] = true;
                    counter--;
                }
                else
                {
                    tab[i, j] = false;
                }
            }
        }

        Debug.Log(tab);
        string serial = GlobalSerialization.SerializeSpAquisitionTable(tab);

        Debug.Log(serial);
        bool[,] deserializedTab = GlobalSerialization.DeserializeSpAquisitionTable(serial);
        Debug.Log(deserializedTab);
    }
Exemple #2
0
    public void SetupSerializedValues(SerialPlayerRpg spr)
    {
        CmdSetName(spr.cName);
        Yang  = spr.yang;
        Level = spr.level;
        RefreshMaxExp();
        Exp                = spr.exp;
        StatusPoints       = spr.sPoints;
        spAcquisitionTable = GlobalSerialization.DeserializeSpAquisitionTable(spr.sPointsTab);

        BaseVit = spr.bVit;
        BaseInt = spr.bInt;
        BaseStr = spr.bStr;
        BaseDex = spr.bDex;
        CalculateStatsDerivatives();

        CmdManipulateHealth(spr.cHp);
        Energy  = spr.cEn;
        Stamina = spr.cSt;
    }