Exemple #1
0
    public static void SavePlayer(playerController pC, upgradeMaster crM, upgradeMaster caM, upgradeMaster fM, sneakerInventory sI, upgradeMaster aCM)
    {
        BinaryFormatter formatter = new BinaryFormatter();
        string          path      = Application.persistentDataPath + "/player.fun";
        FileStream      stream    = new FileStream(path, FileMode.Create);

        playerData data = new playerData(pC, crM, caM, fM, sI, aCM);

        formatter.Serialize(stream, data);
        stream.Close();
    }
    public playerData(playerController pC, upgradeMaster crM, upgradeMaster caM, upgradeMaster fM, sneakerInventory sI, upgradeMaster aCM)
    {
        cash             = pC.cash;
        cashIncrease     = pC.cashIncrease;
        followers        = pC.followers;
        followerIncrease = pC.followerIncrease;
        crateProb        = pC.crateProb;


        autoCash      = pC.autoCash;
        crateCount    = crM.count;
        cashCount     = caM.count;
        followerCount = fM.count;
        autoCashCount = aCM.count;

        nikeMagsbool    = sI.nikeMagsbool;
        tomSachsbool    = sI.tomSachsbool;
        offWhiteAF1bool = sI.offWhiteAF1bool;
        offWhiteAJ1bool = sI.offWhiteAJ1bool;
        travisAJ1bool   = sI.travisAJ1bool;
        wotherspoonbool = sI.travisAJ1bool;
        yeezy700bool    = sI.yeezy700bool;
        yeezyTurtbool   = sI.yeezyTurtbool;

        chunkyDunkybool    = sI.chunkyDunkybool;
        diorAJ1bool        = sI.diorAJ1bool;
        offWhitePrestobool = sI.offWhitePrestobool;
        yeezyQntmbool      = sI.yeezyQntmbool;
        nikeAirYeezybool   = sI.nikeAirYeezybool;
        nikeSacaibool      = sI.nikeSacaibool;
        unionAJ1bool       = sI.unionAJ1bool;
        balenciagaSbool    = sI.balenciagaSbool;

        halfEvilYellowBool = sI.halfEvilYellowBool;
        halfEvilPurpleBool = sI.halfEvilPurpleBool;
        offWhiteTeeBool    = sI.offWhiteTeeBool;
        kawsTeeBool        = sI.kawsTeeBool;
        antiSocialTeeBool  = sI.antiSocialTeeBool;
        bapeTeeBool        = sI.bapeTeeBool;
        supremeTeeBool     = sI.supremeTeeBool;
        travisTeeBool      = sI.travisTeeBool;
    }