Exemple #1
0
    void Save()
    {
        SerializeSoil soil = new SerializeSoil(
            IsPlanted,
            seconds,
            saveSeconds,
            interval,
            stages,
            i,
            isDroplets,
            plant_trigger,
            harvestTime,
            plant
            );

        SaveLoad.Save <SerializeSoil>(soil, uniqueName);
    }
Exemple #2
0
    void LoadSave()
    {
        if (SaveLoad.SaveExist(uniqueName))
        {
            SerializeSoil soil = SaveLoad.Load <SerializeSoil>(uniqueName);

            this.IsPlanted     = soil.IsPlanted;
            this.seconds       = soil.seconds;
            this.saveSeconds   = soil.saveSeconds;
            this.interval      = soil.interval;
            this.stages        = soil.stages;
            this.i             = soil.i;
            this.isDroplets    = soil.isDroplets;
            this.plant_trigger = soil.plant_trigger;
            this.harvestTime   = soil.harvestTime;
            this.plant         = soil.plant;
            anim.SetTrigger(plant_trigger[i]);
            droplets.SetActive(isDroplets);
        }
    }