Ejemplo n.º 1
0
    public IEnumerator JSONReadTest()
    {
        UpgradeSystem upgradeSystem = new UpgradeSystem();
        int           listCount     = upgradeSystem.GetUpgradeCount();

        upgradeSystem.SetUpgradeList(UpgradeSystem.LoadUpgrades(upgradeSystem.GetUpgradeList()));
        Assert.AreNotEqual(listCount, upgradeSystem.GetUpgradeCount());
        yield return(null);
    }
Ejemplo n.º 2
0
    public IEnumerator JSONWriteTest()
    {
        UpgradeSystem upgradeSystem = new UpgradeSystem();
        Upgrade       testUpgrade   = new Upgrade("Bomb Count", 1);

        upgradeSystem.AddUpgrade(testUpgrade);
        testUpgrade = new Upgrade("Speed", 2);
        upgradeSystem.AddUpgrade(testUpgrade);
        testUpgrade = new Upgrade("Range", 5);
        upgradeSystem.AddUpgrade(testUpgrade);
        UpgradeSystem.SaveUpgrades(upgradeSystem.GetUpgradeList());
        yield return(null);
    }